Advertisement
42n4

XENLOCALVM

Feb 6th, 2016
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. #USE IT IN COMMAND LINE (without #):
  2. #curl http://pastebin.com/raw/tiveLRh6 > xenuselocalsr.sh
  3. #tr -d "\015" < xenuselocalsr.sh > xenuselocalsrnew.sh
  4. #sh xenuselocalsrnew.sh
  5. #
  6. #for host with small letters use: http://pastebin.com/raw/Gq4waMBc
  7. #uuid pbd http://blog.gluster.org/2012/
  8. sed -i -e "s/metadata_read_only = 1/metadata_read_only = 0/" /etc/lvm/lvm.conf
  9. hname=`hostname`
  10. hname=`echo $hname | tr [:lower:] [:upper:]`
  11. vgname=`vgdisplay | grep "VG Name" | cut -f19 -d" "`
  12. lvcreate -L 500G -n xen $vgname
  13. mkfs.ext4 -m 0 -j /dev/$vgname/xen
  14. mkdir -p /export/$hname-vol0
  15. #echo "/dev/$vgname/xen /export/$hname-vol0   ext4  rw,noatime,nodiratime,journal_checksum,data=journal,errors=panic,nodelalloc 1 2" >> /etc/fstab
  16. echo "/dev/$vgname/xen /export/$hname-vol0   ext4  rw,noatime,nodiratime,user_xattr,barrier=0,data=ordered 1 2" >> /etc/fstab
  17. mount -a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement