Logical Volume Manager :
Volume Group
To create a vg on hdisk1 :# mkvg -vg newvg hdisk1
To drain I/O's for a vg and suspends future I/O's :
# chvg -suspend vg03
To resume normal I/O operations for a vg :
# chvg -resume vg03
Unlock a VG if left in a locked state by abnormal termination of another lvm operation :
# chvg -unlock vg03
To add a physical volume to a volume group :
# extendvg vg3 hdisk3
To remove a PV from a VG :
# reducevg vg01 hdisk1
To remove a PV and all residing LVs from a VG with no confirmation :
# reducevg –rmlv –f vg01
To activate a vg :
# activatevg vg03
To deactivate a vg :
# deactivatevg vg03
To mirror the VIO Server’s rootvg to hdisk4 and reboots VIO Server :
# mirrorios –force hdisk4
To mirror the VIO Server’s rootvg to hdisk4 but don’t reboot the server :
# mirrorios –defer hdisk4
To remove the rootvg mirror from hdisk4 :
# unmirrorios hdisk4
To import a VG from hdisk07 :
# importvg –vg vg001 hdisk07
To export a VG :
# exportvg vg3
Note: Volume Group containing a paging space can’t be exported
To sync a VG :
# syncvg –vg vg01
To sync a LV :
# syncvg –lv lv001
To sync a PV :
# syncvg –pv hdisk4 hdisk5
To redefine a VG based on the VGDA from hdisk04 :
# redefvg –dev hdisk04
Logical Volume :
To create a logical volume of size 1MB in vg01 :
# mklv –lv lv001 vg01 1M hdisk1
To create a logical volume with mirror in place in vg01 of size 1GB :
# mklv –mirror vg01 1G
To extend an LV by 3MB :
# extendlv lv01 3M
To extend an LV by 1GB with space taken from hdisk5 :
# extendlv lv01 1G hdisk5
To remove a logical volume :
# rmlv lv05
To display the properties of a logical volume :
# lslv lv03
To display info about LV by Physical volume :
# lslv –pv lv03
To display LVs that can be used as backing devices :
# lslv –free
To make a copy for lv01 in hdisk03 :
# mklvcopy lv01 hdisk03
To remove lv01’s copy from hdisk03 :
# rmlvcopy lv01 hdisk03
To copy the contents of lv01 to lv02 :
# cplv lv01 lv02
To copy the contents of lv01 to a new lv in vg01 :
# cplv –vg vg01 lv01
To change the name of oldlv to newlv :
# chlv –lv newlv oldlv
Physical Volume
To display all physical volumes in the system :
# lspv
To display the status and characteristics of hdisk03 :
# lspv hdisk03
To list all the available PVs used as virtual SCSI backing devices :
# lspv –avail
To list PVs that can be used as virtual SCSI backing devices and are not currently a backing device :
# lspv –free
To move physical partitions from hdisk1 to hdisk2 :
# migratepv hdisk1 hdisk2
To move physical partitions in lv01 from hdisk1 to hdisk2 :
# migratepv –lv lv01 hdisk1 hdisk2
Storage Pool Management:
To create storage pool “client_data” using hdisk3 hdisk4 hdisk3 and hdisk4 :
# mksp -f client_data
To set client_data storage pool as default :
# chsp –default client_data
To list all storage pools :
# lssp
To list the default storage pool :
# lssp –default
To list the backing device in rootvg storage pool :
# lssp –bd –sp rootvg
To attach a storage from a storage pool to a Virtual SCSI adapter:
# mkbdsp -bd lv001 -vadapter vthost2 -tn vtscsi9
To removes storage from a Virtual SCSI adapter, and removes the backing device :
# rmbdsp –bd lv001
To remove storage from a Virtual SCSI adapter, And makes sure backing device is not deleted :
# rmbdsp –bd lv001 -savebd
To removes storage from a Virtual SCSI adapter, and removes the backing device :
# rmbdsp –vtd vtscsi9
To removes storage from a Virtual SCSI adapter. and makes sure backing device is not deleted :
# rmbdsp –vtd vtscsi8 -savebd
0 blogger-disqus:
Post a Comment