Pages

Friday, 10 February 2012

LVM Management

LVM Management


lspv


hdisk0 contains a rootvg Now i have added a hdisk1

cfgmgr

mkvg -y datavg -s 128 hdisk1  ---> on hdisk1 datavg volume group is created

lsvg     ---> shows all the avaliable VG in system

lsvg -o   ----> show all the active VG in system

lsvg datavg  

varyoffvg datavg

lsvg -o

lsvg -l rootvg  

varyonvg datavg

lsvg -o

lsvg -l datavg   ----> shows all LV that reside in datavg

lsvg -p datavg   ---> shows all PVs in the VG

mklv -t jfs2 -y oralv datavg 2 hdisk1    ------> created oralv in datavg

lsvg -l datavg

mklv -t jfs2log -y loglv datavg 1   ---> log device for oralv 

lsvg -l datavg

logform /dev/loglv   ---> to initialize the log device

lsvg -l datavg

crfs -v jfs2 -d oralv -A y -m /opt/oracle

lsvg -l datavg

grep -p /opt/oracle /etc/filesystems

mount /opt/oracle

lsvg -l datavg

mount

date

df -g

umount /opt/oracle

mount

lsvg -l datavg

mount /opt/oracle

df -g

cd /opt/oracle

lmktemp /opt/oracle/file1 200M

ls -ltr

df -h

chfs -a size=+200M /opt/oracle

df -g

umount /opt/oracle

lsvg -l datavg

rmfs /opt/oracle

lsvg -l datavg

rmlv loglv

lsvg -l datavg

reducevg datavg hdisk1

lsvg -o

chdev -l hdisk1 -a pv=clear

rmdev -dl hdisk1

lspv

No comments:

Post a Comment

Twitter Bird Gadget