List LVM volumes with lvs
In this step, you will learn how to list Logical Volume Management (LVM) volumes using the lvs
command. LVM provides a more flexible way to manage disk storage compared to traditional partitioning. It allows you to create logical volumes that can span across multiple physical disks and be easily resized.
First, let's open the terminal. If you closed it, click the Xfce Terminal icon on the left side of the desktop.
The lvs
command is used to display information about logical volumes. It provides details such as the logical volume name, the volume group it belongs to, its size, and its attributes.
Type the following command in your terminal and press Enter:
lvs
You should see output similar to this:
LV VG Attr LSize Pool Origin Data% Meta% Cpy%Sync Convert
root ubuntu -wi-ao---- <...>g
swap ubuntu -wi-ao---- <...>g
Let's break down the output:
LV
: The name of the Logical Volume. In this example, you see root
and swap
.
VG
: The Volume Group the Logical Volume belongs to. Here, both belong to the ubuntu
volume group.
Attr
: Attributes of the Logical Volume. -wi-ao----
indicates the volume is writable, active, open, etc.
LSize
: The size of the Logical Volume. The exact size will vary depending on the system configuration.
- Other columns like
Pool
, Origin
, Data%
, Meta%
, Cpy%Sync
, and Convert
are related to more advanced LVM features like thin provisioning and snapshots, which you don't need to worry about for now.
The lvs
command is a fundamental tool for understanding your LVM setup. It gives you a quick overview of the logical volumes available on your system.
Click Continue to proceed to the next step.