Show logical volume segment mapping
Build a paste-ready command, then review its compatibility and effects before running it.
lvs --segments -o lv_name,segtype,stripes,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 Type #Str 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 --segments -o lv_name,segtype,stripes,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--segmentsOptionConfigures lvs with the --segments option.
03-oOptionSelects an output file or output format for this command.
04lv_name,segtype,stripes,devicesArgumentPasses lv_name,segtype,stripes,devices to lvs.
Example input
lvs --segments -o lv_name,segtype,stripes,devices
Example output
LV Type #Str Devices
data linear 1 /dev/sdb1(0)
Illustrative output — exact values vary by system and data.
Official sources