Monday, December 13, 2010

Volume Management - VxVM

Points to Remember on Mirroring:


1. A volume name can contain upto 31 characters.
2. A volume can have upto 32 plexes or mirrors.
3. Each mirror must reside on separate disks
4. We can mirror only concatenated or striped volumes.

Here are few commands for your reference,


1. To create a 10GB volume in datadg :
# vxasist -g datadg make myvol 10g

2. To create a 10GB concatenated volume in datadg using disks datadg01 and datadg02 :
# vxasist -g datadg make myvol 10g datadg01 datadg02

3. To create a 3GB striped volume in datadg with 3 columns using any disk except datadg02 :
# vxasist -g datadg make myvol 3g layout=stripe ncol=3 !datadg02

4. To create a 3GB striped volume in datadg with 3 columns with ordered allocation on datadg06 (column 1), datadg05 (column 2) and datadg02: (column 3)

# vxasist -g datadg -o ordered make myvol 3g layout=stripe ncol=3 datadg06 datadg05 datadg02


5. To create a 2GB striped volume in datadg with 2 columns using disks datadg01 and datadg04 with stripe stize of 256k :

# vxassist -g datadg make myvol 2g layout=stripe ncol=2 stripeunit=256k datadg01 datadg04

6. To create a 3GB RAID5 volume in datadg :
# vxassist -g datadg make oravol 3g layout=raid5

7. To create a 2 mirror volume of size 1g in datadg :
# vxassist -g datadg make db2vol 1g layout=mirror

8. To create a 3 mirror volume of size 1g in datadg :
# vxassist -g datadg make db2vol 1g layout=mirror nmirror=3

9. To create a 2 mirror volume of size 1g in datadg mirrored across controllers :
# vxassist -g datadg make db2vol 1g layout=mirror mirror=ctlr

Note: You can mirror across controllers (ctlr), enclosures (enclr) and targets (target).

10. To create a 2 mirror volume of size 1g in datadg with dirty region logging ::
# vxassist -g datadg make db2vol 1g layout=mirror logtype=drt

11. To determine the largest posible size for a new volume in datadg :
# vxassist -g datadg maxsize layout=raid5

12. To determine how much an existing volume can grow :
# vxassist -d datadg maxgrow dbvol

13. To display volumes in datadg :
# vxprint -g datadg -vt

14. To add a mirror to an existing concatenated volume :
# vxassist -g datadg mirror datavol datadg01

15. To remove a mirror(plex from datadg02) from a volume :
# vxassist -g datadg remove mirror datavol !datadg02

16. To add a DRL log to an existing volume :
# vxassist -g datadg addlog datavol logtype=drl

17. To remove a DRL from an existing volume :
# vxassist -g datadg remove log datavol

18. To set read policy to round robin for an existing volume :
# vxvol -g datadg readpol round datavol

Note: round, prefer, select are the different types of read log policies.

19. To resize a dynamic LUN :
# vxdisk -g datadg resize datadg05 length=100GB

20. To relayout a concat volume to stripe,

# vxassist -g datadg relayout datavol layout=stripe stripeunit=32k ncol=2

21: To create a volume using a detached plex,

# vxmake -g datadg -U fsgen vol datavoltemp plex=datavol02

22. To start a volume on datadg,

# vxvol -g datadg start datavol

23. To stop a volume on datadg,

# vxvol -g datadg stop datavol

24. To start all the volumes on datadg,

# vxvol -g datadg startall

25. To stop all the volumes in datadg,

# vxvol -g datadg stopall

26. To remove a volume and its children (plexes and sub disks),
# vxedit -g datadg -rf rm datavol

27. To remove a volume,
# vxassist -g datadg remove volume datavol

28. To add log to an existing volume,

#  vxassist -g datadg addlog testvol nlog=1

29. To remove all the logs of a volume,
# vxassist -g testdg remove log testvol nlog=0

30. To move a volume between disks,
# vxassist -g testdg move testvol !disk01 disk02
where disk01 is the soruce disk and  disk02 is the target.

No comments:

Post a Comment