Vxrootadm on VxVM.

On Vxvm 6.0, Vxrootadm command has been Enhanced. So, we  can do the root mirror/split thru vxrootadm without manual task so far we followed in earlier versions.

Please find the below steps :


bash-3.2# vxdisk -oalldgs -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR       
disk_0       auto:sliced    rootdgnew01  rootdgnew   online               c1t0d0s2         -           
disk_1       auto:sliced    -            -           online               c1t3d0s2         -           
disk_2       auto:sliced    -            -           online               c1t1d0s2         -           

     
bash-3.2#

bash-3.2# ./vxrootadm  addmirror  disk_2
[20:52:44]  VxVM vxrootadm INFO V-5-2-5571 Initialize disk disk_2 rootdgnew ...
[20:52:54]  VxVM vxrootadm INFO V-5-2-5569 Adding disk rootdgnew01-s0=disk_2 to group rootdgnew ...
[20:53:10]  VxVM vxrootadm INFO V-5-2-5575

        You have selected to add mirror volumes to disk group rootdgnew

        on new disk disk_2/rootdgnew01-s0, from volumes on disk_0/rootdgnew01.

        If you continue this operation, mirror volumes will be added on disk_2.

Do you wish to continue [y,n,q,?]  (default: n) y
[20:55:01]  VxVM vxrootadm INFO V-5-2-5570 Creating mirror rootdgnew rootdgnew01-s0 rootvol
[21:01:42]  VxVM vxrootadm INFO V-5-2-5570 Creating mirror rootdgnew rootdgnew01-s0 swapvol
[21:37:07]  VxVM vxrootadm INFO V-5-2-5570 Creating mirror rootdgnew rootdgnew01-s0 var
[21:49:14]  VxVM vxrootadm INFO V-5-2-4829 Bootsetup rootdgnew  ...
[21:49:51]  VxVM vxrootadm INFO V-5-2-4894 New boot disk created successfully.
[21:49:51]  VxVM vxrootadm INFO V-5-2-4893 Devalias for the new boot disk: vx-rootdgnew01-s0
bash-3.2# vxprint -g rootdgnew
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdgnew    rootdgnew    -        -        -        -        -       -

dm rootdgnew01  disk_0       -        286617216 -       -        -       -
dm rootdgnew01-s0 disk_2     -        286617216 -       -        -       -

v  rootvol      root         ENABLED  41945472 -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  41945472 -        ACTIVE   -       -
sd rootdgnew01-B0 rootvol-01 ENABLED  1        0        -        -       Block0
sd rootdgnew01-02 rootvol-01 ENABLED  41945471 1        -        -       -
pl rootvol-02   rootvol      ENABLED  41945472 -        ACTIVE   -       -
sd rootdgnew01-s0-01 rootvol-02 ENABLED 41945472 0      -        -       -

v  swapvol      swap         ENABLED  188744448 -       ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  188744448 -       ACTIVE   -       -
sd rootdgnew01-01 swapvol-01 ENABLED  188744448 0       -        -       -
pl swapvol-02   swapvol      ENABLED  188744448 -       ACTIVE   -       -
sd rootdgnew01-s0-02 swapvol-02 ENABLED 188744448 0     -        -       -

v  var          fsgen        ENABLED  52447104 -        ACTIVE   -       -
pl var-01       var          ENABLED  52447104 -        ACTIVE   -       -
sd rootdgnew01-03 var-01     ENABLED  52447104 0        -        -       -
pl var-02       var          ENABLED  52447104 -        ACTIVE   -       -
sd rootdgnew01-s0-03 var-02  ENABLED  52447104 0        -        -       -
bash-3.2#
bash-3.2#



bash-3.2# ./vxrootadm -vY split mirrordg rootdgnew01-s0
[21:52:17]  VxVM vxrootadm INFO V-5-2-5537 Move mirrors from rootdgnew to mirrordg
[21:52:21]  VxVM vxrootadm INFO V-5-2-5543 Remove rootdgnew01-s0 plexes: rootvol-02
swapvol-02
var-02 from rootdgnew
[21:52:24]# vxplex -f -g rootdgnew -o norestr dis rootvol-02 swapvol-02 var-02
[21:52:28]# vxedit -g rootdgnew -rfn rm rootvol-02 swapvol-02 var-02
[21:52:28]  VxVM vxrootadm INFO V-5-2-5542 Remove rootdgnew01-s0 from rootdgnew
[21:52:28]# vxdg -g rootdgnew rmdisk rootdgnew01-s0
.......
....... (outputs removed intentionally)
.........
[21:56:41]# umount /rda_altboot
[21:56:42]  VxVM vxrootadm INFO V-5-2-5550 Split boot disk successfully.
[21:56:42]  VxVM vxrootadm INFO V-5-2-5538 New Devalias for the boot disk: vx-rootdgnew01-s0
bash-3.2#
bash-3.2#

bash-3.2# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:sliced     rootdgnew01  rootdgnew    online
disk_1       auto:sliced     -            -            online
disk_2       auto:sliced     rootdgnew01-s0  mirrordg     online  ß root mirror disk in separate DG now.

bash-3.2# 

Now we can able to boot using "disk_2".

No comments: