• 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

lvmdiskscan Command Examples in Linux

by admin

The lvmdiskscan command scans all available drives for LVM-configured partitions. lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices, and a bunch of other block devices in the system looking for LVM physical volumes. The size reported is the real device size.

The lvmdiskscan only has one option “-l” or “–lvmpartition” which reports only the physical volume. To scan all the devices, do not provide any argument to the command.

lvmdiskscan Command Examples

1. The lvmdiskscan command can be used to view a list of the LVM devices on your system. Invoking the program using the -l argument, it will list only the LVM devices that are present on your system:

# lvmdiskscan -l
  WARNING: only considering LVM devices
  /dev/hdc1    [       24.41 GB] LVM physical volume
  /dev/hda2    [       74.43 GB] LVM physical volume
  0 LVM physical volume whole disks
  2 LVM physical volumes

2. The lvmdiskscan command can also list all partitions that could be used as physical volumes for logical volume groups:

# lvmdiskscan
  /dev/hda1    [      101.94 MB]
  /dev/myflash [      124.98 MB]
  /dev/hdc1    [       24.41 GB] LVM physical volume
  /dev/hda2    [       74.43 GB] LVM physical volume
  /dev/hdc2    [       24.41 GB]
  /dev/hdc3    [       24.41 GB]
  /dev/hdc4    [       24.41 GB]
  1 disk
  4 partitions
  0 LVM physical volume whole disks
  2 LVM physical volumes

Filed Under: Linux

Some more articles you might also be interested in …

  1. ttyrec – Record Terminal Session in Linux
  2. CentOS / RHEL 6 : How to boot into rescue mode
  3. How to calculate recommended value of vm.min_free_kbytes Kernel Tuning Parameter
  4. Configure MySQL Router to Auto Restart of Failure using systemd
  5. How systemd-tmpfiles cleans up /tmp/ or /var/tmp (replacement of tmpwatch) in CentOS / RHEL 7
  6. How to mount and umount a file system in Linux
  7. CentOS / RHEL 6,7 : How to delete an iSCSI Target on the initiator (iSCSI client)
  8. How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8
  9. lvdisplay error: “Failed to create directory /var/lock/lvm. File-based locking initilisation failed.”
  10. CentOS / RHEL : How to delete LVM volume

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright