LinuxCommandLibrary

lvs

List logical volume information

TLDR

Display information about logical volumes

$ lvs
copy

Display all logical volumes
$ lvs [[-a|--all]]
copy

Change default display to show more details
$ lvs [[-v|--verbose]]
copy

Display only specific fields
$ lvs [[-o|--options]] [field_name_1],[field_name_2]
copy

Append field to default display
$ lvs [[-o|--options]] +[field_name]
copy

Suppress heading line
$ lvs --noheadings
copy

Use a separator to separate fields
$ lvs --separator [=]
copy

SYNOPSIS

lvs [options] [lvpath...]

PARAMETERS

-a, --all
    Show all LVs, including those that are not active.

-o, --options Fields
    Specify which fields to display in the output. Use 'lvs --help' to see the available fields. Fields can be listed comma-separated.

-t, --tree
    Show LVs in a tree format.

-v, --verbose
    Run in verbose mode.

-s, --segments
    Show segment information.

-S, --select Condition
    Select LVs matching the given condition.

-h, --help
    Display help text and exit.

--version
    Display version information and exit.

lvpath...
    Restrict the output to the specified logical volumes. Can use LV names or paths like /dev/vgname/lvname.

DESCRIPTION

The `lvs` command provides detailed information about Logical Volumes (LVs) within a Linux Logical Volume Manager (LVM) setup. It retrieves and displays attributes such as LV name, LV size, associated Volume Group (VG), allocation policy, current state, and other related properties. This command is essential for administrators managing storage, allowing them to monitor LV status, identify potential issues, and verify configuration. Output can be customized using various options to filter and display specific data points. The command is part of the `lvm2` package, and it relies on the LVM metadata stored in the system to provide accurate information. It is used for monitoring and basic administration. By default `lvs` shows a single line per LV, but various options can be used to customize the output in different ways, for example, showing a tree view of all LVs.

UNITS

Size units are interpreted according to suffixes used, which can be specified in lowercase or uppercase. The suffixes supported are: 'b' (bytes), 'k' (kilobytes), 'm' (megabytes), 'g' (gigabytes), 't' (terabytes), 'p' (petabytes), 'e' (exabytes). The default is megabytes if no suffix is used. Capitalized sizes are power of 10, small sizes are power of 2.

HISTORY

The `lvs` command is part of the `lvm2` suite of tools, which replaced the original LVM implementation. It was developed to provide a more flexible and robust storage management system compared to traditional partitioning schemes. LVM and `lvs` are integral to many Linux distributions' enterprise storage solutions. It has been continuously improved and updated over the years to support new features and hardware.

SEE ALSO

pvdisplay(8), vgdisplay(8), lvdisplay(8), lvm(8)

Copied to clipboard