Skip to content

Instantly share code, notes, and snippets.

@circa10a
Last active October 25, 2018 22:24
Show Gist options
  • Save circa10a/f0cbb784da7929dfff8c0975e9d7242b to your computer and use it in GitHub Desktop.
Save circa10a/f0cbb784da7929dfff8c0975e9d7242b to your computer and use it in GitHub Desktop.
Create XFS (pv, vg, lv, mount)
#!/usr/bin/env bash
#choose device
pvcreate /dev/sdb
#choose vg name or number (vg01)
vgcreate vg01 /dev/sdb
#volume group show
vgs
#create lv
lvcreate -L 50G -n lv_varwhatever vg01
#format as xfs
mkfs.xfs /dev/mapper/vg01-lv_varwhatever
#place to mount
mkdir /var/whatever
#aaaaaand mount
mount /dev/mapper/vg01-lv_varwhatever /var/whatever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment