主机评测
专注VPS评测和优惠码发布
#!/bin/bash
VGName=$(vgdisplay | grep "VG Name" | awk '{print $3}')
read -p "请输入ISO大小,比如30G:" disk
lvcreate -L $disk -n iso $VGName --config global{metadata_read_only=0}
mkfs.ext3 /dev/$VGName/iso
mkdir /iso
xe sr-create name-label=iso type=iso device-config:location=/iso device-config:legacy_mode=true content-type=iso
mount /dev/$VGName/iso /iso
echo "lvchange -ay /dev/$VGName/iso --config global{metadata_read_only=0}" >> /etc/rc.local
echo "mount /dev/$VGName/iso /iso" >> /etc/rc.local