man lvmdiskscan says

lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch of other block devices in the system looking for LVM PVs. The size reported is the real device size. Define a filter in lvm.conf(5) to restrict the scan to avoid a CD ROM, for example. This command is deprecated, use pvs instead.

man pvs says

pvs produces formatted output about PVs.

The two commands list different kinds of things. In what sense, is lvmdiskscan deprecated,and we should use pvs instead? Thanks.

  • What do you look for besides the man page itself saying so? – Jeff Schaller Feb 25 at 16:07

Both commands are intended to list PVs. pvs can be configured to list the same information as lvmdiskscan does by default:

pvs -a -o+dev_size

will list all devices with their size. Likewise, lvmdiskscan can be configured similarly to pvs’ defaults:

lvmdiskscan -l

will only list devices containing PVs.

lvmdiskscan is deprecated in favour of pvs because the latter can do everything lvmdiskscan can do and is far more flexible (see man lvmreport for details). lvmdiskscan also outputs some incorrect information in some circumstances (check its summary, in particular the count of “physical volume whole disks”).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.