1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 09:02:08 +02:00
tldr/pages/linux/lvm.md
Vitor Henrique 46a054215a
pages*: make help and version commands comply with the style guide (#12107)
* pages*: use generic word for help

* git: add newline to the end

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* pages*: make help and version commands comply with the style guide

* java: fix Java name

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-30 12:55:24 +08:00

860 B

lvm

Manage physical volumes, volume groups, and logical volumes using the Logical Volume Manager (LVM) interactive shell. More information: https://man7.org/linux/man-pages/man8/lvm.8.html.

  • Start the Logical Volume Manager interactive shell:

sudo lvm

  • Initialize a drive or partition to be used as a physical volume:

sudo lvm pvcreate {{/dev/sdXY}}

  • Display information about physical 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

  • Display help for a specific command:

lvm help {{command}}