lvs: command not found

lvs is a command in Linux used to display information about Logical Volumes (LVs) in a Linux Logical Volume Manager (LVM) system. The lvs command outputs a table of information about each LV in a system, including LV name, volume group (VG) name, size, status, and more. The lvs command can also be used with various options to display specific information about LVs, such as device paths, UUIDs, or to format the output in a custom way. The lvs command is a useful tool for viewing information about LVs and verifying the status of LVM storage configurations.

If you encounter the below error while running the command lvs:

lvs: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install lvm2
Ubuntu apt-get install lvm2
Alpine apk add lvm2
Arch Linux pacman -S lvm2
Kali Linux apt-get install lvm2
CentOS yum install lvm2
Fedora dnf install lvm2
Raspbian apt-get install lvm2

lvs Command Examples in Linux

1. To report logical volume info:

# lvs 

2. To report all logical volume:

# lvs --all 

3. To Use with –separator to align the output columns:

# lvs --aligned 

4. To Add an “LVM2_” prefix plus the field name to the output:

# lvs --nameprefixes 

5. To Suppress the headings line that is normally the first line of output:

# lvs --noheadings 

6. To suppress the suffix on output sizes:

# lvs --nosuffix 

7. To comma-separated ordered list of columns:

# lvc -o
# lvc --options 

8. To use default columns that emphasize segment information:

# lvs --segments 

9. To comma-separated ordered list of columns to sort by:

# lvs -O
# lvs --sort 

10. To output columns as rows:

# lvs --rows 

11. To string to use to separate each column:

# lvs --separator Separator 

12. To produce output immediately without sorting or aligning the columns properly:

# lvs --unbuffered 

13. To all sizes are output in these units:

# lvs --units hHbBsSkKmMgGtTpPeE 

14. To when used with –nameprefixes, output values in the field=value pairs are not quoted:

# lvs --unquoted 
Related Post