[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

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다