Please perform the following before executing the solution:
A. Take the Full data backup of home volume,(i.e. /umount point) (It is always recommended to have a full system backup if possible)
B. Make a copy of /etc/vfstab, /etc/system files
C. Take a backup the volume configuration by #vxprint -ht > /vx
D. Check the partition table by...
#prtvtoc/dev/dsk/c#t#d#s2 (rootdisk)
#prtvtoc/dev/dsk/c#t#d#s2 (rootmirror disk)
From partition table, note down the available slices which are free that to be used to create underlined partition (In this example, slices 5,7 and 3,7 were free on rootdisk and root mirror disk respectively.)
Steps to recreate the volume and underlined partitions :
1.Remove the old "home" volume from rootdg with Volume Manager Storage Administrator or CLI
# umount /u
#vxedit -g rootdg -rf rm home
2. Before creating the volume check the available space on each disk......
#vxassist -g rootdg maxsize rootdg02 ---------This will give you maximum space on the disk rootdg02
# vxassist-g rootdg maxsize rootdg01 --------- This will give you maximum space onthe disk rootdg01
Create the volumes as follows :
Now, Create the volumes as per your requirement......
e.g. # vxassist -g rootdg make home(volumename) 50g(size) layout=concatrootdg02
# vxassist -g rootdg make archvol(volumename) 50g(size) layout=concatrootdg02
3. Mirror the volumes .........
#vxassist -g rootdg -b mirror home rootdg01(destination disk)
# vxassist -g rootdg -b mirror archvol rootdg01(destination disk)
Here check the output of following command......
# vxprint -htgrootdg
Make a note of sub-disks used for home volume and arch volume.
4. Make the appropriate slices on both the internal disks for volumes using a utility......
· Please note here in below commands that XX represents the appropriate sub-disks which was noted from vxprint output in previous step(step 3) ......
· The syntax of command is ............
#/usr/lib/vxvm/bin/vxmksdpart -g
In your case : it would belike...
#/usr/lib/vxvm/bin/vxmksdpart -g rootdgrootdg02-XX 7 0x080x00 (Slice for home volume on root disk)
#/usr/lib/vxvm/bin/vxmksdpart -g rootdgrootdg01-XX 7 0x08 0x00 (Slice for home volume on rootmirror disk)
#/usr/lib/vxvm/bin/vxmksdpart -g rootdgrootdg01-XX 3 0x08 0x00 (Slice for arch volume on rootmirror disk)
#/usr/lib/vxvm/bin/vxmksdpart -g rootdgrootdg02-XX 5 0x08 0x00 (Slice for arch volume on rootdisk)
Also, in the above example, the slice mentioned in Orange color are very important. If we miss to specify the correct slice then it would mess up all the configuration as we are making changes to slice level for root disk as well as root mirror.
Here check the output of following command:
# vxprint -htg rootdg
5. Make the filesystem and mount the volumes.....
#mkfs -F vxfs/dev/vx/rdsk/rootdg/home (Please select the filesystem type as per the requirement)
#mkfs -F ufs/vxfs/dev/vx/rdsk/rootdg/arch
#mount -F vxfs/dev/vx/dsk/rootdg/home /u
#mount-F ufs/vxfs /dev/vx/dsk/rootdg/archvol /newarch
6.Restore the backup of home volume and verify.