Last active
October 25, 2018 22:24
-
-
Save circa10a/f0cbb784da7929dfff8c0975e9d7242b to your computer and use it in GitHub Desktop.
Create XFS (pv, vg, lv, mount)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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