Tuesday, November 11, 2008

AIX Commands – Part I

Volume Group Commands

Display all VGs:

# lsvg

 

Display all active VGs:

# lsvg –o

 

Display info about rootvg,

# lsvg rootvg

 

Display info about all LVs in all VGs,

# lsvg -o |lsvg –il

 

Display info about all PVs in rootvg

# lsvg -p rootvg

 

Create VG with name vgxx on hdisk1 with partition size 8MB,

# mkvg -s 8 hdisk1

 

Create VG with name sivg on hdisk1 with partition size 8MB,

# mkvg -s 8 -y sivg hdisk1

 

Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016,

# mkvg -s 4 -t 2 -y sivg hdisk1

 

To make VG newvg automatically activated at startup,

# chvg -a y newvg

 

To deactivate the automatic activation at startup,

# chvg -a n newvg

 

To change maximum no. of PP to 2032 on vg newvg,

# chvg -t 2 newvg

 

To disable quorum on VG newvg,

# chvg -Q n newvg

 

Reorganises PP allocation of VG newvg,

# reorgvg newvg

 

Add PV hdisk3 and hdisk4 to VG newvg,

# extendvg newvg hdisk3 hdisk4

 

Exports the VG newvg,

# exportvg newvg

 

Import the hdisk2 with name newvg, and assign major number 44,

# importvg -V 44 -y newvg hdisk2

 

Remove PV hdisk3 from VG newvg,

# reducevg newvg hdisk3

 

To deactviate VG newvg,

# varyoffvg newvg

 

To activate VG newvg,

# varyonvg newvg

 

To sync the mirrored LV in the VG sivg,

# syncvg -v sivg

 

To mirror LVs of sivg with hdisk2 (-m for exact mirror, -S forbackground mirror),

# mirrorvg -S -m sivg hdisk2

 

To remove the mirrored PV from the set,

# unmirrorvg sivg hdisk2

 

To synchronize ODM with LVM(VGDA) for datavg,

# synclvodm datavg

 

File System  Commands … In next part

No comments: