Link to home
Start Free TrialLog in
Avatar of ars21292
ars21292

asked on

Repartition swap space for metadb

I need to reallocated swap space to be used for metadb's.  How do I repartition swap space while not affecting the rest of the disk to allow for the creation of new, unassigned slices/partitions?  Partition 4 is a mounted file system.  I would like to use partitions 5 and 6 for the metadb requirements. I am looking for step-by-step instructions.

Part     Tag                Flag       Cylinders               Size                Blocks
0          root               wm        0 - 5671               7.81GB            (5672/0/0)     16386408
1          swap              wu         5672 - 6380         1000.15MB      (709/0/0)       2048301
2          backup          wm      0 - 24619              33.92GB          (24620/0/0)   71127180
3          home             wm       6381 - 15497        12.56GB          (9117/0/0)     26339013  
4          unassigned     wm      15498 - 24614      12.56GB          (9117/0/0)     26339013  
5          unassigned     wm      0                           0                       (0/0/0)           0
6          unassigned     wm      0                           0                       (0/0/0)           0  
7          unassigned     wm      0                           0                       (0/0/0)           0

I have referenced the Solstice DiskSuite 4.2.1 User's Guide pages 51-52 but there are no specific instructions for the repartitioning (step 4).  I am concerned about affecting other partitions with the format process!
Avatar of liddler
liddler
Flag of Ireland image

Yes you will have to affect one of the current partitions!

Basically you need to decide which partition (0, 3 or 4) you want to resize.  Once you have decided this do the following (I am assuming you choose slice 4, we are controller 0 and you want 2Gb of swap)
Back the data on slice 4 up, either to another partition or a tape / CD / DVD
umount /dev/dsk/c0t0d0s4  (you may have to stop some application to allow this)
use format to decrease the size of slice 4, say by 4 Gb + 50 Mb
increase size slice 5 to 2GB
increase size slice 6 to 2GB
increase size slice 7 to 50 Mb

newfs /dev/dsk/cot0d0s4
mount /dev/dsk/cot0d0s4 /old_mount_point (onto wherever)
metadb  -a  -f  -c  2  c0t0d0s7
metainit -f d11 1 1 c0t0d0s5
metainit d12 1 1 c0t0d0s6
metainit d10 -m d11
metattach d10 d12
swap -a /dev/dsk/md/d10

make sure to manually edit the /etc/vfstab, add a line
/dev/md/dsk/d10 -       -       swap    -       no      -


Backup is REALLY important
ASKER CERTIFIED SOLUTION
Avatar of Nukfror
Nukfror
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of glassd
glassd

Usually you can't modify a partition which is in use. You should disable swap first:

Check out what the swap partition is:
   swap -l
Disable the swap partition (for example):
   swap -d /dev/dsk/c0t0d0s1
Now use format to squish the swap partition and assign the free space to a new partition.
Add swap back when complete:
   swap -a /dev/dsk/c0t0d0s1
Sorry my mistake, I thought ars21292 was looking to add a second swap partition and put it under sds