Veritas VXVM commands (v4.0)
Some general commands:
/usr/lib/vxvm/bin/vxdisksetup -i c0t12d0 <- definitately not s2
vxdg init bob_dg disk01=c0t12d0
vxdisksetup -i c0t0d0 publen=2048000 <- (in sectors) defined because the disk is only 2G big (default priv is 2G)
vxdg -g bob_dg adddisk c0t0d0=c0t0d0
vxdg -g bob_dg rmdisk c0t0d0
vxdg destroy bob_dg
Copy a disk to another disk via
mirroring:
Create the initial disk, plex, volume, and filesystem:
test1[root]182: vxdg init bob_dg c0t12d0=c0t12d0
test1[root]183: vxassist -g bob_dg make bob_vol 1000m
test1[root]184: mkfs -F vxfs /dev/vx/rdsk/bob_dg/bob_vol
version 6 layout
2048000 sectors, 1024000 blocks of size 1024, log size 16384 blocks
largefiles supported
test1[root]203: mount -F vxfs /dev/vx/dsk/bob_dg/bob_vol /vxd
Create new disk for mirror:
test1[root]204: vxdisksetup -i c0t0d0 publen=2048
test1[root]205: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-01 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t12d0-01 bob_vol-01 ENABLED 2048000 0 - - -
Add disk to dg:
test1[root]206: vxdg -g bob_dg adddisk c0t0d0=c0t0d0
test1[root]207: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048 - - - -
dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-01 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t12d0-01 bob_vol-01 ENABLED 2048000 0 - - -
Oops, too small, remove and recreate c0t0d0, this time defining public size (this is a 2G disk): test1[root]208: vxdg -g bob_dg rmdisk c0t0d0 test1[root]209: vxdisksetup -i c0t0d0 publen=2048000 test1[root]210: vxdg -g bob_dg adddisk c0t0d0=c0t0d0 test1[root]211: vxprint Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048000 - - - - dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - - pl bob_vol-01 bob_vol ENABLED 2048000 - ACTIVE - - sd c0t12d0-01 bob_vol-01 ENABLED 2048000 0 - -
|
Add subdisk and plex and then attach:
test1[root]212: vxmake -g bob_dg sd c0t0d0-02 c0t0d0,0,2048000
test1[root]213: vxmake -g bob_dg plex bob_vol-02 sd=c0t0d0-02
test1[root]214: vxplex -g bob_dg att bob_vol bob_vol-02
test1[root]215: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048000 - - - -
dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-01 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t12d0-01 bob_vol-01 ENABLED 2048000 0 - - -
pl bob_vol-02 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t0d0-02 bob_vol-02 ENABLED 2048000 0 - - -
Mirror is complete, now detach original plex (1G took about 5 minutes to mirror):
test1[root]217: vxplex -g bob_dg det bob_vol-01
test1[root]218: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048000 - - - -
dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-01 bob_vol DETACHED 2048000 - IOFAIL - -
sd c0t12d0-01 bob_vol-01 ENABLED 2048000 0 - - -
pl bob_vol-02 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t0d0-02 bob_vol-02 ENABLED 2048000 0 - - -
Remove and disassociate plex:
test1[root]219: vxplex -g bob_dg -o rm dis bob_vol-01
test1[root]220: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048000 - - - -
dm c0t12d0 c0t12d0s2 - 8378496 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-02 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t0d0-02 bob_vol-02 ENABLED 2048000 0 - - -
Remove disk:
test1[root]226: vxdg -g bob_dg rmdisk c0t12d0
test1[root]227: vxprint
Disk group: bob_dg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg bob_dg bob_dg - - - - - -
dm c0t0d0 c0t0d0s2 - 2048000 - - - -
v bob_vol fsgen ENABLED 2048000 - ACTIVE - -
pl bob_vol-02 bob_vol ENABLED 2048000 - ACTIVE - -
sd c0t0d0-02 bob_vol-02 ENABLED 2048000 0 - - -
Copyright © 1993-Present by Robert Barnes
ALL RIGHTS RESERVED