For the users who deal with Solaris and Veritas VxVM, I believe this is important to know of and lots of people will miss out this steps. For miror the OS disk under VxVM control, we will first encapsulate the boot disk and this will preserve the Sun partition as it is then create the private & public region accordingly.
Consequently, we will initialize another disk using VxVM then use vxrootmir to mirror the root (/) partition. Then use vxassist mirror to mirror the rest of OS partition (var, usr, opt, etc).
Looks perfect? but it actually misses out one steps. Where?
When you use vxassist mirror, VxVM will only create the respective subdisk in public region and update the records in private region. Hence no Sun partition will actually be created (E.g. slice 5, 6, 7). This will prevent the Solaris to mount back the original OS partition when disaster happen and you can't boot up the OS with VxVM startup. Even you revert back the /etc/vfstab.prevm & old /etc/system, it still unbootable because the SUN partition slices are not exists. For the primary copy of OS disk, it doesn't have this problem because we run it using encapsulation.
vxmksdpart [-f] [-g diskgroup] subdisk sliceno [tags flags]
According to the fmthard manual, the tags and flas are as below:
tag description
0x00 UNASSIGNED
0x01 BOOT
0x02 ROOT
0x03 SWAP
0x04 USR
0x05 BACKUP
0x06 STAND
0x07 VAR
0x08 HOME
flag description
0x00 MOUNTABLE
0x01 UNMOUNTABLE
0x10 READ-ONLY
Assume we have below config, root partition at s0, swap at s1 and var at s4. No need to run for root partition because vxrootmir will create the slice 0.
dg rootdg default default 0 1036078650.1025.pegasus
dm rootdisk c0t0d0s2 sliced 6463 17683680 -
dm rootmirror c0t1d0s2 sliced 6463 17683680 -
v rootvol - ENABLED ACTIVE 13423200 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 13423200 CONCAT - RW
sd rootdisk-01 rootvol-01 rootdisk 0 13423200 0 c0t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 13423200 CONCAT - RW
sd rootmirror-01 rootvol-02 rootmirror 0 13423200 0 c0t1d0 ENA
v swapvol - ENABLED ACTIVE 2100000 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 2100000 CONCAT - RW
sd rootdisk-02 swapvol-01 rootdisk 13423200 2100000 0 c0t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 2100000 CONCAT - RW
sd rootmirror-02 swapvol-02 rootmirror 13423200 2100000 0 c0t1d0 ENA
v var - ENABLED ACTIVE 2100000 ROUND - fsgen
pl var-01 var ENABLED ACTIVE 2100000 CONCAT - RW
sd rootdisk-03 var-01 rootdisk 15523200 2100000 0 c0t0d0 ENA
pl var-02 var ENABLED ACTIVE 2100000 CONCAT - RW
sd rootmirror-03 var-02 rootmirror 15523200 2100000 0 c0t1d0 ENA
First create the swap on the secondary disk (e.g. c0t1d0),
# /usr/lib/vxvm/bin/vxmksdpart rootmirror-02 1 0x03 0x01
Then create the var on the secondary disk,
# /usr/lib/vxvm/bin/vxmksdpart rootmirror-03 4 0x07 0x00
At this point of time, you have the slices created. You may also want to update the changes on /etc/vfstab and /etc/vfstab.prevm.
# /usr/lib/vxvm/bin/vxprtvtoc -f /tmp/v1 /dev/rdsk/c0t1d0s2
# cat /tmp/v1 > /etc/vtoc
No comments:
Post a Comment