Bug 134879 - pvcreate can't see disks
pvcreate can't see disks
Status: CLOSED DUPLICATE of bug 130713
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-06 19:00 EDT by Jesse Barnes
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-27 12:37:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of /proc/partitions (3.55 KB, text/plain)
2004-10-07 11:51 EDT, Jesse Barnes
no flags Details
/proc/devices (382 bytes, text/plain)
2004-10-08 11:55 EDT, Jesse Barnes
no flags Details

  None (edit)
Description Jesse Barnes 2004-10-06 19:00:38 EDT
I see two problems with pvcreate in the latest rawhide bits: 
  1) pvcreate doesn't see all the disks on my system 
     I have a system with quite a few disks attached to fibre channel 
cards in the system (>128) and the lvmtools only see a few of them.  
If I manually add them to /etc/lvm/.cache, I'm able to use pvcreate 
and other tools on them, which leads to (2) 
 
  2) when I use pvcreate in script to loop over all of the devices I 
want to run it on, I get lots of messages like this: 
 
  Found duplicate PV AwQix3KWcd0M65hiNOXW7OPHV9B2CYAp: 
using /dev/sdca not /dev/sdg 
  Found duplicate PV DIl1iYl8uu50LSHy7wmiA3hC0GTcpjav: 
using /dev/sdcq not /dev/ 
 
This happens even if I specify a uuid on the command line with --uuid 
(I scripted it to increment the uuid for every device so that they're 
unique). 
 
Are these known problems?  What other info do you need? 
 
Thanks, 
Jesse
Comment 1 Alasdair Kergon 2004-10-07 07:04:49 EDT
1) What sorts of disks are they?  What name/major number in
/proc/devices?  May need to add this to lvm.conf if it isn't built-in.

2) --uuid is only meant to be used in recovery situations - I don't
understand the reason for using it here.  Seeing duplicate uuids
suggests either a bug in the script (e.g. multiple runs using the same
uuid) or you have multiple paths to the disk or are using raid or
similar?  You should edit filters in lvm.conf so that only one path to
each PV is seen.
Comment 2 Jesse Barnes 2004-10-07 11:47:19 EDT
> 1) What sorts of disks are they? 
 
Fibre channel mostly, they appear as /dev/sd* 
 
> What name/major number in /proc/devices? 
 
I've attached the output of /proc/partitions, which includes the 
device numbers. 
 
> May need to add this to lvm.conf if it isn't built-in. 
 
The filter settings of my lvm.conf don't seem like they'd 
exclude /dev/sd* devices. 
 
> 2) --uuid is only meant to be used in recovery situations - I don't 
> understand the reason for using it here.  Seeing duplicate uuids 
> suggests either a bug in the script (e.g. multiple runs using the 
> same uuid) 
 
Running pvcreate on all the disks created duplicate uuids by default, 
so I though I'd try explicitly passing unique IDs. 
 
> or you have multiple paths to the disk or are using raid or 
> similar?  You should edit filters in lvm.conf so that only one path 
> to each PV is seen. 
 
This could definitely be it.  I'm an idiot.  Number (1) is still a 
problem though... 
 
Thanks, 
Jesse 
 
Comment 3 Jesse Barnes 2004-10-07 11:51:32 EDT
Created attachment 104904 [details]
output of /proc/partitions
Comment 4 Alasdair Kergon 2004-10-08 09:30:29 EDT
I asked for /proc/devices not /proc/partitions :-)
Comment 5 Jesse Barnes 2004-10-08 11:54:36 EDT
Here's /proc/devices.  Sorry, I figured /proc/partitions would be 
even better since it includes the major/minor as well as all of the 
disks on the system. 
 
Jesse 
Comment 6 Jesse Barnes 2004-10-08 11:55:20 EDT
Created attachment 104944 [details]
/proc/devices
Comment 7 Alasdair Kergon 2004-10-08 12:29:01 EDT
OK.  For problem 1, your devices are all of type 'sd' which lvm2
already recognises; there should be no need to update lvm.conf for that.

Try adding the verbose flags to your vgscan and grep for the missing
devices to see if it tells you why it's ignoring your devices when you
run it to update your .cache file.  (vgscan -vvv)
Comment 8 Jesse Barnes 2004-10-08 13:01:10 EDT
Ahh, vgscan -vvv says that most of the devices are md components: 
 
      Getting size of /dev/sdcr 
        Opened /dev/sdcr 
        /dev/sdcr: Skipping md component device 
        Closed /dev/sdcr 
        /dev/sdcr: Skipping (cached) 
      Getting size of /dev/sddh 
        Opened /dev/sddh 
        /dev/sddh: Skipping md component device 
        Closed /dev/sddh 
        /dev/sddh: Skipping (cached) 
 
If I disable md detection in /etc/lvm/lvm.conf it seems to see 
everything.  I'll double check to see if they actually had md 
superblocks (they shouldn't have). 
 
Thanks, 
Jesse 
Comment 9 Alasdair Kergon 2004-10-08 13:08:40 EDT
See also #130713.
Comment 10 Jesse Barnes 2004-10-08 13:16:03 EDT
Thanks for your help Alasdair, is it obvious that I've never used 
these tools before? :) 
 
Jesse 
Comment 11 Jesse Barnes 2004-10-14 13:41:12 EDT
Marking as a duplicate of 130713.  Once the md superblocks and gpt 
labels are automatically zeroed by pvcreate, everything should be 
peachy. 

*** This bug has been marked as a duplicate of 130713 ***

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