Saturday, February 4, 2012

2 .Create the FS using LVM method (Through script)


[root@cmptrn-wc-31p home]# cat lvm_unix
pvcreate /dev/sdam
pvcreate /dev/sdan
pvcreate /dev/sdal
pvcreate /dev/sdai
pvcreate /dev/sdah
pvcreate /dev/sdag
pvcreate /dev/sdaf
sleep 3
#
vgextend  RootVolGroup00  /dev/sdam  /dev/sdan  /dev/sdal  /dev/sdai  /dev/sdah  /dev/sdag /dev/sdaf
sleep2
#
lvcreate -L 20G /dev/RootVolGroup00 -n lv_home_uc4
lvcreate -L 250G /dev/RootVolGroup00 -n lv_var_archive
lvcreate -L 20G /dev/RootVolGroup00 -n lv_var_cemp
lvcreate -L 150G /dev/RootVolGroup00 -n lv_var_cemp_data1
lvcreate -L 150G /dev/RootVolGroup00 -n lv_var_cemp_data2
lvcreate -L 100G /dev/RootVolGroup00 -n lv_var_cemp_logs
sleep2
#
mkfs -t ext3 /dev/RootVolGroup00/lv_home_uc4
mkfs -t ext3 /dev/RootVolGroup00/lv_var_archive
mkfs -t ext3 /dev/RootVolGroup00/lv_var_cemp
mkfs -t ext3 /dev/RootVolGroup00/lv_var_cemp_data1
mkfs -t ext3 /dev/RootVolGroup00/lv_var_cemp_data2
mkfs -t ext3 /dev/RootVolGroup00/lv_var_cemp_logs
sleep5
#
mkdir /home/uc4
mkdir /var/cemp
mkdir /var/cemp/data1
mkdir /var/cemp/data2
mkdir /var/cemp/logs
mkdir /var/archive
[root@cmptrn-wc-31p home]#  sh -x lvm_unix

No comments:

Post a Comment