From 0efcf0f12eb18230443d8a7097308d56c5c74f72 Mon Sep 17 00:00:00 2001 From: Adam Herst Date: Wed, 24 Mar 2021 16:44:01 -0400 Subject: [PATCH] lvm: add page (#5328) --- pages/linux/lvm.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/linux/lvm.md diff --git a/pages/linux/lvm.md b/pages/linux/lvm.md new file mode 100644 index 0000000000..3d424ff15c --- /dev/null +++ b/pages/linux/lvm.md @@ -0,0 +1,36 @@ +# lvm + +> Manage physical volumes, volume groups, and logical volumes using the Logical Volume Manager (LVM) interactive shell. +> More information: . + +- Start the Logical Volume Manager interactive shell: + +`sudo lvm` + +- List the Logical Volume Manager commands: + +`sudo lvm help` + +- Initialize a drive or partition to be used as a physical volume: + +`sudo lvm pvcreate {{/dev/sdXY}}` + +- Display information about physcial volumes: + +`sudo lvm pvdisplay` + +- Create a volume group called vg1 from the physical volume on `/dev/sdXY`: + +`sudo lvm vgcreate {{vg1}} {{/dev/sdXY}}` + +- Display information about volume groups: + +`sudo lvm vgdisplay` + +- Create a logical volume with size 10G from volume group vg1: + +`sudo lvm lvcreate -L {{10G}} {{vg1}}` + +- Display information about logical volumes: + +`sudo lvm lvdisplay`