Friday, January 1, 2010

Veritas Volume Manager FAQ 1

Note that the first 28 questions have answers related to using the command line. Sun do not normally support this method of bottom up creation of volumes. An explanation of why can be seen in Q97. The questions are designed to give you an idea of what goes on in the background. However, if at all possible, use the GUI.

----

1. How do I create a disk group ?

2. How do I create a a subdisk ?

3. How do I split a subdisk into 2 or more subdisks ?

4. How do I create a concat plex from two subdisks ?

5. How do I create a volume from a plex ?

6. What this volume looks like from a vxprint -Ath output

7. How do I start this volume ?

8. What this volume looks like from a vxprint -Ath output

9. How do I make this a mirrored volume ?

10. What this volume looks like from a vxprint -Ath output during mirror sync ?

11. What this volume looks like from a vxprint -Ath output after mirror ?

12. How do I blow away a mirrored volume ?

13. How do I blow away the subdisks ?

14. How do I attaching a plex to another plex in a volume ?

15. What this volume looks like from a vxprint -Ath output during attach ?

16. What does this volume look like from a vxprint -Ath output after attach ?

17. How do I detach a plex from a volume ?

18. What does this volume look like from a vxprint -Ath output after attach ?

19. How do I disassociate a plex from a volume ?

20. How do I add a disk into my disk group ?

21. How do I create a RAID5 volume ?

22. How does the vxprint -Ath for a RAID 5 volume look during the build ?

23. How does the vxprint -Ath for a RAID 5 volume look after the build ?

24. How do I get information about a RAID5 volume ?

25. How do I build a hot-spare ?

26. How does a hot spare look in vxprint -Ath

27. How do I make this volume a filesystem and mount it ?

28. How does a RAID 5 volume look if we loose a sub-disk ?


----1. How do I create a disk group ?

/usr/sbin/vxdg init disk01=c2t0d0s2

2. How do I create a a subdisk ?

/usr/sbin/vxmake -g sd disk01-01 dm_name=disk01 dm_offset=0 len=4152640

3. How do I split a subdisk into 2 or more subdisks ?

/usr/sbin/vxsd -g -s 152640 split disk02-01 disk02-02

4. How do I create a concat plex from two subdisks ?

/usr/sbin/vxmake -g plex pl-01 sd=disk01-01,disk02-01

5. How do I create a volume from a plex ?

/usr/sbin/vxmake -U fsgen -g vol vol01 read_pol=SELECT user=root group=other mode=0644 log_type=NONE len=4305279 plex=pl-01

6. What this volume looks like from a vxprint -Ath output

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenDISABLEDCLEAN4305279SELECT-
plpl-01vol01DISABLEDCLEAN4305279CONCAT-RW
sddisk01-01pl-01disk01041526390c1t5d0ENA
sddisk02-01pl-01disk0201526404152639c1t3d0ENA


7. How do I start this volume ?

/usr/sbin/vxvol -g -f start vol01

8. What this volume looks like from a vxprint -Ath output

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE4305279SELECT-
plpl-01vol01ENABLEDACTIVE4305279CONCAT-RW
sddisk01-01pl-01disk01041526390c1t5d0ENA
sddisk02-01pl-01disk0201526404152639c1t3d0ENA


9. How do I make this a mirrored volume ?

/usr/sbin/vxassist -g mirror vol01 layout=nostripe

10. What this volume looks like from a vxprint -Ath output during mirror sync ?

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE4305279SELECT-
plvol01-01vol01ENABLEDTEMPRMSD4306160CONCAT-WO
sddisk04-01vol01-01disk0401535200c1t1d0ENA
sddisk03-01vol01-01disk0304152640153520c1t4d0ENA
plpl-01vol01ENABLEDACTIVE4305279CONCAT-RW
sddisk01-01pl-01disk01041526390c1t5d0ENA
sddisk02-01pl-01disk0201526404152639c1t3d0ENA


11. What this volume looks like from a vxprint -Ath output after mirror ?

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE4305279SELECT-
plvol01-01vol01ENABLEDACTIVE4306160CONCAT-RW
sddisk04-01vol01-01disk0401535200c1t1d0ENA
sddisk03-01vol01-01disk0304152640153520c1t4d0ENA
plpl-01vol01ENABLEDACTIVE4305279CONCAT-RW
sddisk01-01pl-01disk01041526390c1t5d0ENA
sddisk02-01pl-01disk0201526404152639c1t3d0ENA


12. How do I blow away a mirrored volume ?

/usr/sbin/vxedit -g -fr rm vol01

13. How do I blow away the subdisks ?

/usr/sbin/vxedit -g rm disk02-02 disk01-02

14. How do I attaching a plex to another plex in a volume ?

/usr/sbin/vxplex -g att vol01 Cor-Plex-2

15. What this volume looks like from a vxprint -Ath output during attach ?

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE2000000SELECT-
plCor-Plexvol01ENABLEDACTIVE2000000CONCAT-RW
sddisk-01Cor-Plexdisk01010000000c1t5d0ENA
sddisk-02Cor-Plexdisk02010000001000000c1t3d0ENA
plCor-Plex-2vol01ENABLEDTEMP2000000CONCAT-WO
sddisk-01-2Cor-Plex-2disk01100000010000000c1t5d0ENA
sddisk-02-2Cor-Plex-2disk02100000010000001000000c1t3d0ENA


16. What does this volume look like from a vxprint -Ath output after attach ?

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE2000000SELECT-
plCor-Plexvol01ENABLEDACTIVE2000000CONCAT-RW
sddisk-01Cor-Plexdisk01010000000c1t5d0ENA
sddisk-02Cor-Plexdisk02010000001000000c1t3d0ENA
plCor-Plex-2vol01ENABLEDACTIVE2000000CONCAT-RW
sddisk-01-2Cor-Plex-2disk01100000010000000c1t5d0ENA
sddisk-02-2Cor-Plex-2disk02100000010000001000000c1t3d0ENA


17. How do I detach a plex from a volume ?

usr/sbin/vxplex -g det Cor-Plex-2

18. What does this volume look like from a vxprint -Ath output after attach ?

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vvol01fsgenENABLEDACTIVE2000000SELECT-
plCor-Plexvol01ENABLEDACTIVE2000000CONCAT-RW
sddisk-01Cor-Plexdisk01010000000c1t5d0ENA
sddisk-02Cor-Plexdisk02010000001000000c1t3d0ENA
plCor-Plex-2vol01DETACHEDSTALE2000000CONCAT-RW
sddisk-01-2Cor-Plex-2disk01100000010000000c1t5d0ENA
sddisk-02-2Cor-Plex-2disk02100000010000001000000c1t3d0ENA


19. How do I disassociate a plex from a volume ?

usr/sbin/vxplex -g dis Cor-Plex-2| pl | Cor-Plex-2 | - | DISABLED | - | 2000000 | CONCAT | - | RW |

sddisk-01-2Cor-Plex-2disk01100000010000000c1t5d0ENA
sddisk-02-2Cor-Plex-2disk02100000010000001000000c1t3d0ENA


20. How do I add a disk into my disk group ?

/usr/sbin/vxdg -g adddisk disk05=c1t5d2s2

21. How do I create a RAID5 volume ?

/usr/sbin/vxassist -g -p maxsize layout=raid5,log nstripe=3 stripeunit=32 disk01 disk02 disk03 disk04

This returns the maximum size (8304640) of the volume which can be used in the following command.

/usr/sbin/vxassist -g make vol01 8304640 layout=raid5,log nstripe=3 stripeunit=32 disk01 disk02 disk03 disk04

22. How does the vxprint -Ath for a RAID 5 volume look during the build ?

vvol-r5raid5DETACHEDEMPTY12456192RAID-
plvol-r5-01vol-r5ENABLEDEMPTY12457728RAID4/128RW
sddisk04-01vol-r5-01disk04041526400/0c1t1d0ENA
sddisk02-01vol-r5-01disk02041526401/0c1t3d0ENA
sddisk03-01vol-r5-01disk03041526402/0c1t4d0ENA
sddisk01-01vol-r5-01disk01041526403/0c1t5d0ENA
plvol-r5-02vol-r5ENABLEDEMPTY5600CONCAT-RW
sddisk05-01vol-r5-02disk05056000c1t2d2ENA


23. How does the vxprint -Ath for a RAID 5 volume look after the build ?

vvol-r5raid5ENABLEDACTIVE12456192RAID-
plvol-r5-01vol-r5ENABLEDACTIVE12457728RAID4/128RW
sddisk04-01vol-r5-01disk04041526400/0c1t1d0ENA
sddisk02-01vol-r5-01disk02041526401/0c1t3d0ENA
sddisk03-01vol-r5-01disk03041526402/0c1t4d0ENA
sddisk01-01vol-r5-01disk01041526403/0c1t5d0ENA
plvol-r5-02vol-r5ENABLEDLOG5600CONCAT-RW
sddisk05-01vol-r5-02disk05056000c1t2d2ENA


24. How do I get information about a RAID5 volume ?

/usr/sbin/vxinfo -U raid5 -g vol-r5

25. How do I build a hot-spare ?

/usr/sbin/vxedit -g set spare=on subdisk

26. How does a hot spare look in vxprint -Ath

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm disk06 c1t5d1s2 sliced 66079 978880 SPARE

27. How do I make this volume a filesystem and mount it ?

/usr/sbin/mkfs /dev/vx/rdsk//vol-01 12456192

/usr/sbin/mount /dev/vx/dsk//vol-01 /mnt

28. How does a RAID 5 volume look if we loose a sub-disk ?

vvol-r5raid5ENABLEDACTIVE12456192RAID-
plvol-r5-01vol-r5ENABLEDACTIVE12457728RAID4/128RW
sddisk04-01vol-r5-01disk04041526400/0c1t1d0ENA
sddisk02-01vol-r5-01disk02041526401/0-NDEV
sddisk03-01vol-r5-01disk03041526402/0c1t4d0ENA
sddisk01-01vol-r5-01disk01041526403/0c1t5d0ENA
plvol-r5-02vol-r5ENABLEDLOG5600CONCAT-RW
sddisk05-01vol-r5-02disk05056000c1t2d2ENA


No comments:

Post a Comment