比如我有一个文件file.txt。
cat file.txt
testlv01
testlv02
userlv01
costlv02
costlv03
如何用脚本一次性创建这个file.txt里面的所有lv。
!/bin/sh
a=$(cat /test.txt)
for b in $a
do
mklv -t raw -y $a Testvg 4G
done
用这个创建报错。0516-306 getlvodm: Unable to find volume group testlv02 in the Device
Configuration Database.
0516-822 mklv: Unable to create logical volume.
0516-306 getlvodm: Unable to find volume group testlv02 in the Device
Configuration Database.
0516-822 mklv: Unable to create logical volume.
0516-306 getlvodm: Unable to find volume group testlv02 in the Device
Configuration Database.
……这里省略多个类似报错
0516-822 mklv: Unable to create logical volume.
请问下要如何调整下脚本?
收起