• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

lvs Command Examples in Linux

by admin

A logical volume (LV) is created using the LVM’s lvcreate command. This is the final object in logical volume creation. An LV consists of storage space chunks from a VG pool. It can be formatted with a filesystem, mounted, and used just like a typical disk partition.

After creating a logical volume, you can display its properties using lvdisplay. or lvs if you just want to see a short summary. To do this, you need to use the complete device name of the logical volume. In this device name, you’ll first use the name of the device directory /dev, followed by the name of the volume group, which in turn is followed by the name of the logical volume. For instance, the logical volume data in volume group volgroup would use the device name /dev/volgroup/data.

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 

Filed Under: Linux

Some more articles you might also be interested in …

  1. findmnt Command Examples in Linux
  2. How to uninstall ssh software package from Ubuntu
  3. SSHFS (Secure SHell FileSystem) – Securely Mount remote filesystem over ssh
  4. extrace: command not found
  5. Understanding rsyslog Actions
  6. lslogins: command not found
  7. View files using – cat, more, tail, head and wc commands
  8. How to extend an LVM swap partition in Linux
  9. How to Audit File Access on Linux
  10. How to use compress, zip, gzip commands under Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright