[root@Sample-local ~]# cat pv.sh
#!/bin/bash
pv="
emcpowerXX
emcpowerXX
"
for i in $pv
do
pvcreate /dev/$i
done
[root@Sample-local ~]# cat vg.sh
#!/bin/bash
vgcreate vg01 /dev/emcpowerXX
sleep 1;
vg="
emcpowerXX
emcpowerXX
"
for i in $vg
do
vgextend vg01 /dev/$i
done
[root@Sample-local ~]# cat lv.sh
#!/bin/bash
lv="
lv001
lv002
lv003
lv004
lv005
"
for i in $lv
do
lvcreate -L 1G -n $i vg01
done
LVM - multiple pv, vg, lv create script