Advertisement
42n4

XENLOCALVMSMALLETTERS

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