List logical volumes with devices
Build a paste-ready command, then review its compatibility and effects before running it.
lvs -o lv_name,vg_name,lv_size,lv_attr,devicesread-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementslvslvs must be installed and available on PATH.
Version supportlvs Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsLV VG LSize Attr DevicesRepresentative successful output; values vary with the selected target and system state.
Known errorslvs: command not foundlvs is missing or is not available on PATH.
Verifylvs -o lv_name,vg_name,lv_size,lv_attr,devicesThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01lvsCommandRuns the lvs stage of this one-liner.
02-oOptionSelects an output file or output format for this command.
03lv_name,vg_name,lv_size,lv_attr,devicesArgumentPasses lv_name,vg_name,lv_size,lv_attr,devices to lvs.
Example input
lvs -o lv_name,vg_name,lv_size,lv_attr,devices
Example output
LV VG LSize Attr Devices
data vg0 80.00g -wi-ao---- /dev/sdb1(0)
root vg0 20.00g -wi-ao---- /dev/sda2(0)
Illustrative output — exact values vary by system and data.
Official sources