Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday, 20 June 2011

Logical Volume Manager :

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

No comments:

Post a Comment