Skip to content

Instantly share code, notes, and snippets.

@shearluck
Created January 18, 2019 09:54
Show Gist options
  • Save shearluck/5ad6c328cdeb9f81b82fbb2cb27fb365 to your computer and use it in GitHub Desktop.
Save shearluck/5ad6c328cdeb9f81b82fbb2cb27fb365 to your computer and use it in GitHub Desktop.
Make XFS LVM
#!/bin/bash
set -xe
DEVICE=/dev/xvdb
parted -s $DEVICE mklabel gpt
parted -s $DEVICE unit %
parted -s $DEVICE mkpart primary xfs 1 100%
pvcreate "$DEVICE"1
vgcreate vg_xfs "$DEVICE"1
lvcreate -L +30G -n data vg_xfs
mkfs.xfs /dev/vg_xfs/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment