Monday, February 18, 2008

VERITAS: How to move a disk from diskgroup A to diskgroup B and create a new volume

tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk1 sparedg online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2

tzddvf$ vxdg destroy sparedg <- because disk1 is the only/last disk of sparedg
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk - - online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$ vxdg -g lp1dg1 adddisk disk01=emcpower7
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk01 lp1dg1 online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$
tzddvf$ vxassist -g lp1dg1 maxsize
Maximum volume size: 52422656 (25597Mb)
tzddvf$ vxassist -g lp1dg1 make autologvol 16g layout=concat disk01
tzddvf$
tzddvf$ ls -l /dev/vx/rdsk/lp1dg1
total 0
crw------- 1 root root 277,9005 Nov 24 03:11 autologvol
crw------- 1 root root 277,9000 Aug 5 02:23 v_home_ap1adm
crw------- 1 root root 277,9001 Aug 5 02:23 v_home_lp1adm
crw------- 1 root root 277,9004 Aug 5 02:23 v_sapdb_LP1_sapbackup
crw------- 1 root root 277,9002 Aug 5 02:23 v_scratch
crw------- 1 root root 277,9003 Aug 12 13:11 v_usr_sap_AP1
tzddvf$ newfs /dev/vx/rdsk/lp1dg1/autologvol
newfs: construct a new file system /dev/vx/rdsk/lp1dg1/autologvol: (y/n)? y
/dev/vx/rdsk/lp1dg1/autologvol: 33554432 sectors in 16384 cylinders of 32 tracks, 64 sectors
16384.0MB in 335 cyl groups (49 c/g, 49.00MB/g, 6144 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 100448, 200864, 301280, 401696, 502112, 602528, 702944, 803360, 903776,
Initializing cylinder groups:
......
super-block backups for last 10 cylinder groups at:
32614752, 32715168, 32815584, 32916000, 33016416, 33116832, 33217248,
33317664, 33418080, 33518496,