Editing Logical Volume Manager (Linux)

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Logical Volume Manager ([[wikipedia:Logical_Volume_Manager_(Linux)|LVM]])<ref>http://man7.org/linux/man-pages/man8/lvm.8.html</ref> available in Linux allows manage multiple physical volumes or entire hard disks. It supports among other functionalities:
+
[[wikipedia:Logical_Volume_Manager_(Linux)|LVM]]<ref>http://man7.org/linux/man-pages/man8/lvm.8.html</ref> available in Linux allows manage multiple physical volumes or entire hard disks. It supports among other functionalities:
 
* Create single logical volumes of multiple physical volumes or entire hard disks
 
* Create single logical volumes of multiple physical volumes or entire hard disks
 
* Add or remove volumes/disk dynamically  
 
* Add or remove volumes/disk dynamically  
Line 5: Line 5:
 
* Create snapshots
 
* Create snapshots
  
LVM introduces the concept of [[Volume Group]]s (VGs) and [[Logical Volume]]s (LVs).
+
LVM introduces the concept of Volume Groups (VGs) and Logical Volumes (LVs).
  
* Configuration file: <code>/etc/lvm/[[lvm.conf]]</code>
+
Configuration file: <code>/etc/lvm/[[lvm.conf]]</code>
  
  
Line 16: Line 16:
 
* List Volume Groups:<code>[[vgs]]</code><ref>http://man7.org/linux/man-pages/man8/vgs.8.html</ref>
 
* List Volume Groups:<code>[[vgs]]</code><ref>http://man7.org/linux/man-pages/man8/vgs.8.html</ref>
 
** <code>[[vgscan]]</code>, <code>[[vgextend]]</code>, <code>[[vgdisplay]]</code>
 
** <code>[[vgscan]]</code>, <code>[[vgextend]]</code>, <code>[[vgdisplay]]</code>
* List logical volumes: <code>[[lvs]]</code><ref>http://man7.org/linux/man-pages/man8/lvs.8.html</ref>, [[lvdisplay]]
+
* List logical volumes: <code>[[lvs]]</code><ref>http://man7.org/linux/man-pages/man8/lvs.8.html</ref>, [[/lvdisplay/]]
 
* Resize LV:  
 
* Resize LV:  
 
** <code>[[lvresize]]</code>
 
** <code>[[lvresize]]</code>
Line 35: Line 35:
 
* Ls commands: <code>[[pvs]]</code>, <code>[[lvs]]</code><ref>http://man7.org/linux/man-pages/man8/lvs.8.html</ref>, <code>[[vgs]]</code>
 
* Ls commands: <code>[[pvs]]</code>, <code>[[lvs]]</code><ref>http://man7.org/linux/man-pages/man8/lvs.8.html</ref>, <code>[[vgs]]</code>
 
* Scan commands: <code>[[pvscan]]</code><ref>http://man7.org/linux/man-pages/man8/pvscan.8.html</ref>, <code>[[vgscan]]</code>
 
* Scan commands: <code>[[pvscan]]</code><ref>http://man7.org/linux/man-pages/man8/pvscan.8.html</ref>, <code>[[vgscan]]</code>
* PV commands: <code>[[pvdisplay]]</code><ref>http://man7.org/linux/man-pages/man8/pvdisplay.8.html</ref>, <code>pvresize</code>, <code>[[pvscan]]</code>, <code>[[pvcreate]]</code> or <code>[[pvcreate]] -vv</code>
+
* PV commands: <code>[[pvdisplay]]</code><ref>http://man7.org/linux/man-pages/man8/pvdisplay.8.html</ref>, <code>pvresize</code>, <code>[[/pvscan/]]</code>, <code>[[pvcreate]]</code> or <code>[[pvcreate]] -vv</code>
 
* LV commands: <code>[[lvcreate]]</code><ref>http://man7.org/linux/man-pages/man8/lvcreate.8.html</ref>, [[lvconvert]]
 
* LV commands: <code>[[lvcreate]]</code><ref>http://man7.org/linux/man-pages/man8/lvcreate.8.html</ref>, [[lvconvert]]
* VG commands: <code>[[vgdisplay]]</code>, <code>[[vgcreate]]</code>, <code>[[vgcfgbackup]]</code>, <code>[[vgscan]]</code>
+
* VG commands: <code>[[vgdisplay]]</code>, <code>[[vgcreate]]</code>, <code>vgcfgbackup</code>, <code>[[vgscan]]</code>
 
* LVM commands: <code>[[lvm dumpconfig]]</code>
 
* LVM commands: <code>[[lvm dumpconfig]]</code>
  
 
=== Advanced commands ===
 
=== Advanced commands ===
 
* <code>lvchange</code><ref>http://man7.org/linux/man-pages/man8/lvchange.8.html</ref> — Change attributes of the Logical Volume Manager.
 
* <code>lvchange</code><ref>http://man7.org/linux/man-pages/man8/lvchange.8.html</ref> — Change attributes of the Logical Volume Manager.
* <code>[[lvmdiskscan]]</code>. Deprecated: used <code>[[pvs]]</code>. Scan for all devices visible to LVM2.
+
* <code>[[lvmdiskscan]]</code>. Deprecated: used <code>[[lvs]]</code>. Scan for all devices visible to LVM2.
* <code>[[lvmdump]]</code> — Create lvm2 information dumps for diagnostic purposes.
+
* <code>lvmdump</code> — Create lvm2 information dumps for diagnostic purposes.
  
 
== Activities ==
 
== Activities ==
Line 59: Line 59:
 
* {{LVM}}
 
* {{LVM}}
 
* [[linux/mdadm|mdadm]] and [[Linux Administration/Devices and Filesystems/ZFS|ZFS]]
 
* [[linux/mdadm|mdadm]] and [[Linux Administration/Devices and Filesystems/ZFS|ZFS]]
* [[resize2fs]]<ref>https://manpages.debian.org/stretch/e2fsprogs/resize2fs.8.en.html</ref> file system resizer  for ext2/ext3/ext4 (resize2fs /dev/mapper/VolGroup-lv_root) (for ext4 only).<ref>https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/</ref>. Code: https://github.com/tytso/e2fsprogs/blob/master/resize/resize2fs.c
+
* resize2fs<ref>https://manpages.debian.org/stretch/e2fsprogs/resize2fs.8.en.html</ref> file system resizer  for ext2/ext3/ext4 (resize2fs /dev/mapper/VolGroup-lv_root) (for ext4 only).<ref>https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/</ref>. Code: https://github.com/tytso/e2fsprogs/blob/master/resize/resize2fs.c
* [[Ansible]] LV module: https://docs.ansible.com/ansible/latest/modules/lvol_module.html#lvol-module
+
* [[DevOps/Ansible|Ansible]] LV module: https://docs.ansible.com/ansible/latest/modules/lvol_module.html#lvol-module
* {{dmsetup}}
+
* [[dmsetup]]
 
* [[UUID]]
 
* [[UUID]]
* {{kpartx}}
+
 
  
  

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: