Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Last active July 18, 2017 04:27
Show Gist options
  • Select an option

  • Save j-griffith/9d76406cd9d94e2ad5fec4f43ec86ff2 to your computer and use it in GitHub Desktop.

Select an option

Save j-griffith/9d76406cd9d94e2ad5fec4f43ec86ff2 to your computer and use it in GitHub Desktop.
setup loopback device for LVM testing
sudo truncate --size=10G cinder-volumes.img
# Get next available loop device
LD=$(sudo losetup -f)
sudo losetup $LD cinder-volumes.img
sudo sfdisk $LD << EOF
,,8e,,
EOF
sudo pvcreate $LD
sudo vgcreate cinder-volumes $LD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment