• 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

lvdisplay Command Examples in Linux

by admin

If you want to see the details of the volume in a Volume Group, you can use the lvdisplay command. Below is an example of lvdisplay command. Here, Vol1 is the Volume Group name.

$ sudo lvdisplay Vol1
  --- Logical volume ---
  LV Path                 /dev/Vol1/lvtest
  LV Name                 lvtest
  VG Name                 Vol1
  LV UUID                 4W2369-pLXy-jWmb-lIFN-SMNX-xZnN-3KN208
  LV Write Access         read/write
  LV Creation host, time  … -0400
  LV Status               available
  # open                  0
  LV Size                 2.00 GiB
  Current LE              513
  Segments                1
  Allocation              inherit
  Read ahead sectors      auto
  - currently set to      256
  Block device            253:2

In the lvdisplay command about, below information is displayed:

  • LV Name: The name of the logical volume.
  • VG Name: The name of the volume group.
  • LV UUID: A unique ID that is given to the volume.
  • LV Write Access: The read/write status of the volume. As you can see, users who have enough file system permissions can write to this volume.
  • LV Status: The current status of the volume. This should read available; otherwise, the volume cannot be used.
  • open: The number of files that are open on the volume.
  • LV Size: The size of the volume.
  • Current LE: The number of logical extents. A logical extent is the logical representation of the physical extent in the volume.
  • Segments: The number of physical devices on which this volume is contained.
  • Allocation: The current allocation status. This parameter should be set to inherit.
  • Read Ahead Sectors: The number of sectors the operating system should read ahead on a volume. For performance optimization, you can set this number. That is, if the operating system asks for the information in section 13 and the Read Ahead Sectors parameter is set to 4, it would read sectors 13 to 17. Although this sounds like something you would want to do, on modern hardware the controller of the storage device takes care of this, so there is no need to set this parameter.
  • Block Device: The address that the kernel uses to find this volume.

lvdisplay Command Examples

1. To display all the logical volumes information:

# lvdisplay

2. To view/print all the information:

# lvdisplay --all

3. To generate colon seperated output

# lvdisplay -c
# lvdisplay --colon

4. To display the mapping of logical extents to physical volumes and physical extents

# lvdisplay -m
# lvdisplay --mpas

5. To Display output in columns

# lvdisplay -C
# lvdisplay --columns

Filed Under: Linux

Some more articles you might also be interested in …

  1. Understanding rsyslog Filter Options
  2. fstrim Command Examples in Linux
  3. How to Log dropped packets using firewalld in CentOS/RHEL 7
  4. How to verify if NX/XD is Enabled or Disabled in CentOS/RHEL 7 and 8
  5. nslookup: command not found
  6. sudoedit: command not found
  7. How to use wget to download file via proxy
  8. btm: An alternative to top
  9. lshw: command not found
  10. whoami: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • csslint: A linter for CSS code
  • csh: The shell (command interpreter) with C-like syntax (Command Examples)
  • csc: The Microsoft C# Compiler (Command Examples)
  • crystal: Tool for managing Crystal source code

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright