Bug 199778 - lvmdiskscan lists LVs when it should be confined to disks/PVs
lvmdiskscan lists LVs when it should be confined to disks/PVs
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-21 17:38 EDT by Mike Snitzer
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-21 18:18:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Snitzer 2006-07-21 17:38:53 EDT
Description of problem:
Using:  filter = [ "r/dev/mapper*.*/", "r/dev/dm*.*/", "a/.*/" ] will cause
Logical volumes to be displayed in the lvmdiskscan output

Version-Release number of selected component (if applicable):
  LVM version:     2.02.01 (2005-11-23)
  Library version: 1.02.02 (2006-01-04)
  Driver version:  4.5.0

How reproducible:
Always

Steps to Reproduce:
1. create an LV
2. use lvm.conf filter: filter = [ "r/dev/mapper*.*/", "r/dev/dm*.*/", "a/.*/" ] 
3. run lvmdiskscan
  
Actual results:
will display LVs as if they were PVs

Expected results:
lvmdiskscan shouldn't _ever_ display an LV (or associated DM devices) as if it
were a disk/PV.

Additional info:

All of the following variants cause lvmdiskscan to display none disks
(/dev/mapper*, /dev/dm-*, /dev/<VG>/<LV>) as disks:

using above filter:
# lvmdiskscan
  /dev/sdq                 [       10.00 GB] LVM physical volume
  /dev/root                [       65.66 GB]
  /dev/sda1                [      101.94 MB]
  /dev/VolGroup00/LogVol01 [        1.94 GB]
  /dev/sda2                [       33.81 GB] LVM physical volume
  /dev/vg01/lvol0          [        9.00 GB]
  /dev/vg1/lvg1            [        9.97 GB]
  /dev/vg2/lvg2            [        9.97 GB]
  /dev/vg3/lvg3            [        9.97 GB]
  /dev/vg4/lvg4            [        9.97 GB]
  /dev/sdr                 [       10.00 GB] LVM physical volume
  /dev/sdb1                [       33.91 GB] LVM physical volume
  /dev/sdc                 [       10.00 GB] LVM physical volume
  /dev/sdd                 [       10.00 GB] LVM physical volume
  1 disk
  7 partitions
  4 LVM physical volume whole disks
  2 LVM physical volumes

using: filter = [ "r/dev/mapper*.*/", "a/.*/" ]
# lvmdiskscan
  /dev/sdq  [       10.00 GB] LVM physical volume
  /dev/root [       65.66 GB]
  /dev/sda1 [      101.94 MB]
  /dev/dm-1 [        1.94 GB]
  /dev/sda2 [       33.81 GB] LVM physical volume
  /dev/dm-2 [        9.00 GB]
  /dev/dm-3 [        9.97 GB]
  /dev/dm-4 [        9.97 GB]
  /dev/dm-5 [        9.97 GB]
  /dev/dm-6 [        9.97 GB]
  /dev/sdr  [       10.00 GB] LVM physical volume
  /dev/sdb1 [       33.91 GB] LVM physical volume
  /dev/sdc  [       10.00 GB] LVM physical volume
  /dev/sdd  [       10.00 GB] LVM physical volume
  1 disk
  7 partitions
  4 LVM physical volume whole disks
  2 LVM physical volumes

using: filter = [ "r/dev/dm*.*/", "a/.*/" ]
# lvmdiskscan
  /dev/sdq                        [       10.00 GB] LVM physical volume
  /dev/root                       [       65.66 GB]
  /dev/sda1                       [      101.94 MB]
  /dev/mapper/VolGroup00-LogVol01 [        1.94 GB]
  /dev/sda2                       [       33.81 GB] LVM physical volume
  /dev/mapper/vg01-lvol0          [        9.00 GB]
  /dev/mapper/vg1-lvg1            [        9.97 GB]
  /dev/mapper/vg2-lvg2            [        9.97 GB]
  /dev/mapper/vg3-lvg3            [        9.97 GB]
  /dev/mapper/vg4-lvg4            [        9.97 GB]
  /dev/sdr                        [       10.00 GB] LVM physical volume
  /dev/sdb1                       [       33.91 GB] LVM physical volume
  /dev/sdc                        [       10.00 GB] LVM physical volume
  /dev/sdd                        [       10.00 GB] LVM physical volume
  1 disk
  7 partitions
  4 LVM physical volume whole disks
  2 LVM physical volumes

This filter at least masks all none disks/PVs; its unfortunate lvmdiskscan
doesn't report this without help.

using: filter = [ "r/dev/mapper*.*/", "r/dev/dm*.*/" ]
# lvmdiskscan
  /dev/sdq  [       10.00 GB] LVM physical volume
  /dev/sda1 [      101.94 MB]
  /dev/sda2 [       33.81 GB] LVM physical volume
  /dev/sdr  [       10.00 GB] LVM physical volume
  /dev/sdb1 [       33.91 GB] LVM physical volume
  /dev/sdc  [       10.00 GB] LVM physical volume
  /dev/sdd  [       10.00 GB] LVM physical volume
  0 disks
  1 partition
  4 LVM physical volume whole disks
  2 LVM physical volumes
Comment 1 Alasdair Kergon 2006-07-21 18:18:46 EDT
You are allowed to stack devices: LVs *can* be used as PVs.
Comment 2 Alasdair Kergon 2006-07-21 18:26:24 EDT
Consider for example creating a VG containing striped (or eventually mirrored)
LVs, then creating PVs on the LVs and putting them into a new VG in which all
the storage, whatever it is allocated to subsequently, is automatically striped
(or mirrored).

Note You need to log in before you can comment on or make changes to this bug.