Skip to content

Instantly share code, notes, and snippets.

@svs14
Created June 10, 2015 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svs14/baf8c238c12d615b79ad to your computer and use it in GitHub Desktop.
Save svs14/baf8c238c12d615b79ad to your computer and use it in GitHub Desktop.
Creates LVM volume from ephemeral disks on EC2.
#!/bin/sh
# Creates LVM volume from ephemeral disks on EC2.
sudo umount /mnt
sudo aptitude -y install lvm2
sudo pvcreate /dev/xvdb /dev/xvdc
sudo vgcreate vol_eph /dev/xvdb /dev/xvdc
sudo lvcreate -l 100%FREE -n log_eph vol_eph
sudo mkfs.ext4 /dev/vol_eph/log_eph
sudo mount /dev/vol_eph/log_eph /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment