Adding a Drive to a Veritas Disk Group
Last time I showed you how to add a new drive to make a new disk group. Well, what if you already have a disk group, with just one drive on it and you want to mirror that data across another drive? The process is easy and here’s how:
Let’s start off with a simple disk group:
# vxprint
Disk group: tempdg-tmpTY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg tempdg-tmp tempdg-tmp – – – – – -dm tempdg-tmp02 emcpower1s2 – 733975296 – – – -
v templv-tmp fsgen ENABLED 733975296 – ACTIVE – -
pl templv-tmp-02 templv-tmp ENABLED 733975296 – ACTIVE – -
sd tempdg-tmp02-01 templv-tmp-02 ENABLED 733975296 0 – – -
This shows the disk group’s name is tempdg-tmp, the original disk in the group is called tempdg-tmp02, the logical volume is called templv-tmp, which is made up of one plex called templv-tmp-02, which has one subdisk called tempdg-tmp02-01.
So, let’s add an additional disk tempdg-tmp01 and use it to mirror the data on tempdg-tmp02. If we look first at how the device is setup for the original drive we see that it is using cdsdisk format:
# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emcpower1s2 auto:cdsdisk tempdg-tmp02 tempdg-tmp online
So let’s make our new device cdsdisk formatted as well:
# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emcpower6s2 auto:none – – online invalid# /etc/vx/bin/vxdisksetup -i emcpower6 format=cdsdisk
# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emcpower6s2 auto:cdsdisk – – online
Now to add the new disk to the disk group. Note that since the original drive was called 02, the one we are adding is 01:
# vxdg -g tempdg-tmp adddisk tempdg-tmp01=emcpower6
Now we can see the new drive in the disk group (and that it isn’t currently doing anything):
# vxprint
Disk group: tempdg-tmpTY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg tempdg-tmp tempdg-tmp – – – – – -dm tempdg-tmp01 emcpower6s2 – 733975296 – – – -
dm tempdg-tmp02 emcpower1s2 – 733975296 – – – -v templv-tmp fsgen ENABLED 733975296 – ACTIVE – -
pl templv-tmp-02 templv-tmp ENABLED 733975296 – ACTIVE – -
sd tempdg-tmp02-01 templv-tmp-02 ENABLED 733975296 0 – – -
So let’s tell the disk group to set tempdg-tmp01 up as a mirror of tempdg-tmp02:
# vxassist -g tempdg-tmp mirror templv-tmp tempdg-tmp01 &
I ran it in the background because it can take a long time depending on how big it is (about 2 hours for 350 GB). To watch the mirroring process, use vxtask. (You can also use vxprint to see what it is doing.)
# vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
177 ATCOPY/R 04.89% 0/733975296/35921920 PLXATT templv-tmp templv-tmp-01 tempdg-tmp
Once it completes, you will see your new drive setup as a mirror:
# vxprint
Disk group: tempdg-tmpTY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg tempdg-tmp tempdg-tmp – – – – – -dm tempdg-tmp01 emcpower6s2 – 733975296 – – – -
dm tempdg-tmp02 emcpower1s2 – 733975296 – – – -v templv-tmp fsgen ENABLED 733975296 – ACTIVE – -
pl templv-tmp-02 templv-tmp ENABLED 733975296 – ACTIVE – -
sd tempdg-tmp02-01 templv-tmp-02 ENABLED 733975296 0 – – -
pl templv-tmp-01 templv-tmp ENABLED 733975296 – ACTIVE – -
sd tempdg-tmp01-01 templv-tmp-01 ENABLED 733975296 0 – – -
|
|
|
|
|
|
|
|
|
|
|
|
[...] the right drive in Veritas, you can set it up anyway you want – add it to an existing disk group, mirror a disk group for some added redundancy, create a new disk group, etc. In upcoming posts, I’ll detail how to create a new disk group [...]
Posted May 25, 2009, 9:30 am