[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

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다