Skip to content

Instantly share code, notes, and snippets.

@hotohoto
Created July 19, 2018 04:30
Show Gist options
  • Save hotohoto/ff2177ba0b23e9e739cbe8ae364d54fb to your computer and use it in GitHub Desktop.
Save hotohoto/ff2177ba0b23e9e739cbe8ae364d54fb to your computer and use it in GitHub Desktop.
Storage management with volumes in linux
# list
fdisk -l
pvs
pvdisplay
vgs
vgdisplay
lvs
lvdisplay
# create
fdisk /dev/sdb
pvcreate /dev/sdb1
vgcreate vg01ext /dev/sdb1
lvcreate -L 890G -n apps vg01ext
# remove
lvremove /dev/mapper/vg01ext-apps
vgremove vg01ext
pvremove /dev/sdb1
fdisk /dev/sdb
# Regarding fdisk refer to - https://www.walkernews.net/2007/07/02/how-to-create-linux-lvm-in-3-minutes/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment