Find it

Tuesday, October 22, 2013

Split & Migrate VERITAS Sub-disks from one array to another.

Hi All, I’m still breathing and alive! Yes again, it’s been a long time that I haven’t posted any new investigational post since past few months. Anyways, it’s just that I was bit busy and got mangled in my daily routine.

Today I'll be writing about subject "Sub Disks". Split and migrate sub disks from one array to another.

I'm having a situation wherein I've to migrate the sub disk of size 45Gb from its existing array to another new array. From new array I got storage disks assigned each of size 17Gb and the sub disk which needs to be migrated is of size 45Gb. The limitation here is that the disk size is inelastic to 17Gb by Storage for new array, now with non-contiguous space we can't join the sub disks as a one sub disk so ONLY option available in here to split the existing 45Gb sub disks into three sub disks of equal sizes and then move the split subdisks to the newly created sub disks from the disks coming from new array.

So let's do it.

The first step would be to initializing the new disks and take those disks into VERITAS control and then add them to disk group. well, after doing so start splitting the sub disk -

root:XXXXXXXXXXX:/root # vxsd -g GAPRMANdg -s 33554432 split EMC0_4-05 EMC0_4-06 EMC0_4-07

BEFORE:

sd EMC0_4-05    db_GAPRMAN-01 EMC0_4  48234496 94371840 52428800  UNIX177_4 ENA

AFTER:

sd EMC0_4-06    db_GAPRMAN-01 EMC0_4  48234496 33554432 52428800  UNIX177_4 ENA
sd EMC0_4-07    db_GAPRMAN-01 EMC0_4  81788928 60817408 85983232  UNIX177_4 ENA


Now we will split sub disk EMC0_4-07 into another 2 sub disk each of size 14.5Gb.

root:XXXXXXXXXXX:/root # vxsd -g GAPRMANdg -s 30408704 split EMC0_4-07 EMC0_4-08 EMC0_4-09

BEFORE:

sd EMC0_4-06    db_GAPRMAN-01 EMC0_4  48234496 33554432 52428800  UNIX177_4 ENA
sd EMC0_4-07    db_GAPRMAN-01 EMC0_4  81788928 60817408 85983232  UNIX177_4 ENA


AFTER:

sd EMC0_4-06    db_GAPRMAN-01 EMC0_4  48234496 33554432 52428800  UNIX177_4 ENA
sd EMC0_4-08    db_GAPRMAN-01 EMC0_4  81788928 30408704 85983232  UNIX177_4 ENA
sd EMC0_4-09    db_GAPRMAN-01 EMC0_4  112197632 30408704 116391936 UNIX177_4 ENA


Create sub disks from newly allocated disks -

root:XXXXXXXXXXX:/root # vxmake -g GAPRMANdg sd EMC2_24-01 EMC2_24,0,33554432
root:XXXXXXXXXXX:/root # vxmake -g GAPRMANdg sd EMC2_25-01 EMC2_25,0,30408704
root:XXXXXXXXXXX:/root # vxmake -g GAPRMANdg sd EMC2_26-01 EMC2_26,0,30408704

Now move data off the old sub disk to new sub disk -

root:XXXXXXXXXXX:/root # vxsd -g GAPRMANdg -o rm mv EMC0_4-06 EMC2_24-01
root:XXXXXXXXXXX:/root # vxsd -g GAPRMANdg -o rm mv EMC0_4-08 EMC2_25-01
root:XXXXXXXXXXX:/root # vxsd -g GAPRMANdg -o rm mv EMC0_4-09 EMC2_26-01


So now the migration has been completed.

BEFORE:

sd EMC0_4-06    db_GAPRMAN-01 EMC0_4  48234496 33554432 52428800  UNIX177_4 ENA
sd EMC0_4-08    db_GAPRMAN-01 EMC0_4  81788928 30408704 85983232  UNIX177_4 ENA
sd EMC0_4-09    db_GAPRMAN-01 EMC0_4  112197632 30408704 116391936 UNIX177_4 ENA


AFTER:

sd EMC2_24-01   db_GAPRMAN-01 EMC2_24 0        33554432 52428800  UNIX168_23 ENA
sd EMC2_25-01   db_GAPRMAN-01 EMC2_25 0        30408704 85983232  UNIX168_24 ENA
sd EMC2_26-01   db_GAPRMAN-01 EMC2_26 0        30408704 116391936 UNIX168_25 ENA


Final task would be to free up the old disk from disk group and taking it out of VERITAS control.

root:XXXXXXXXXXX:/root # vxdg -g GAPRMANdg rmdisk EMC0_4
root:XXXXXXXXXXX:/root # vxdiskunsetup -C UNIX177_4
root:XXXXXXXXXXX:/root # vxdisk rm UNIX177_4

Isn't it such a flexible feature from VERITAS. Hope this helps someone, some day!

2 comments:

  1. Nilesh, please clear the confusion regarding the subdisk split size mentioned.
    When you split the first subdisk, whats this size mentioned by you " -s 33554432". Is it 33554432/(1024*1024*2)=16 GB
    vxsd -g GAPRMANdg -s 33554432 split EMC0_4-05 EMC0_4-06 EMC0_4-07
    If yes, then how did you split a 16GB subdisk into two 14.5 GB disks.
    30408704/(1024*1024*2)= 14.5 GB
    vxsd -g GAPRMANdg -s 30408704 split EMC0_4-07 EMC0_4-08 EMC0_4-09

    ReplyDelete