DiskSuite4.2.1 and resizing swap
I have a box running Solaris8 patch-29, and I need to mirror the internal drives using DiskSuite. The system is already configured and operational. Since the person who build the box didn't forsee DiskSuite I have the following partition table for disk 0 (c0t0d0):
0 root 0 - 16107.82gb
1 swap1611 - 32217.82gb
2 backup0 - 1408668.35gb
7 unassigned3222-1408552.7gb
From my understanding, I need a small slice to store the DiskSuite database replicas. If this is true, what I would like to do is resize swap and build slice 3 to hold the replicas. I could create addiditonal swap on the other internal drive, delete/unmount the active swap, then resize it, but not sure what the issues would be. My question is what is the best way to accomplish this?
Thanks,
Bert
[821 byte] By [
bmfukuda] at [2007-11-25 23:13:39]

# 1
Hello Bert,
from the "screenshot" you posted I don't see the reason why you need to steal space from swap partition :
Root partition starts from cylinder 0 and ends at cylinder 1610
Swap partition starts from cylinder 1611 (i.e. right after root slice) and continues until cylinder 3221
I see a plenty of unused space starting from cylinder 3222 till 14085. You could create new slice based on portion of this space and use it for metadevice db.
!! do not remove/touch slice number 2 - many utilities in Solaris assume that slice 2 covers all disk. So, consider slice 2 to be common convention to cover all disk
Slava R.
# 2
I assume the 'unasssigned' partition is just named unassigned as opposed to root usr opt etc and is really a mounted partition :-)
You can resisze swap before you mirror your disk quite simply.
First of all shut as much down on the system as possible. For preference do it in single user mode.
You can list all the existing swap partitions using the 'swap -l' command. Output should be something like:
swapfile dev swaplo blocksfree
/dev/dsk/c0t0d0s132,116 1052144 1052144
With nothing running on the system (or in single user mode) you can tell the system to stop using this partition as swap:
swap -d /dev/dsk/c0t0d0s1
You can now use your format command. Since the swap partition is no longer used you can 'remake' it with the same starting cylinder but with a few less total cylinders and then create two new small partitions for the disksuite to use. (PS. Make sure you remake swap using the same slice as it currently is on, slice 1 in your case).
Disk Suite requires at least 3 slices in total. So for simple boot disk mirroring I normally create two 40Mb slices on each disk (although this setup has its own problems if you only have two disks on one controller you dont have a lot of options).
Anyway once you have resized swap and created you small slices for DiskSuite, you can either reboot your machine or add the swap back in with the command:
swap -a /dev/dsk/c0t0d0s1
Sean