* [linux-lvm] can't create a PV
@ 2006-02-06 21:51 Gunther Clasen
2006-02-08 9:33 ` Gunther Clasen
2006-02-14 9:19 ` Gunther Clasen
0 siblings, 2 replies; 10+ messages in thread
From: Gunther Clasen @ 2006-02-06 21:51 UTC (permalink / raw)
To: linux-lvm
Hi,
I have the following problem: I have a VG which sits on two partitions.
This VG has been created with SuSE 7.2, that is version 1 of LVM. (I
don't know exactly which one.) I wish to extend that VG and I have tried
to do that from SuSE 9.2, which runs
LVM version: 2.00.25 (2004-09-29)
Library version: 1.00.19-ioctl (2004-07-03)
Driver version: 4.1.0
The type of the partition is set to Linux LVM, like the others, but it
does not work. I get this error:
# pvcreate -vv /dev/hdg9
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Locking /var/lock/lvm/P_orphans WB
Getting size of /dev/hdg9
metadata/pvmetadatasize not found in config: defaulting to 255
metadata/pvmetadatacopies not found in config: defaulting to 1
/dev/hdg9: Couldn't find device. Check your filters?
Unlocking /var/lock/lvm/P_orphans
I can't see that the filters are a problem. The entry in
/etc/lvm/lvm.conf is:
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/" ]
I understand now that I should use -M1 to add this PV to an old V1 VG,
but that is not the problem. I still get the same error.
What am I doing wrong?
Any help would be appreciated.
Gunther
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-06 21:51 Gunther Clasen
@ 2006-02-08 9:33 ` Gunther Clasen
2006-02-09 0:51 ` Marcin Struzak
2006-02-14 9:19 ` Gunther Clasen
1 sibling, 1 reply; 10+ messages in thread
From: Gunther Clasen @ 2006-02-08 9:33 UTC (permalink / raw)
To: LVM general discussion and development
On Mon, Feb 06, 2006, Gunther Clasen wrote:
> Hi,
>
> I have the following problem: I have a VG which sits on two partitions.
> This VG has been created with SuSE 7.2, that is version 1 of LVM. (I
> don't know exactly which one.) I wish to extend that VG and I have tried
> to do that from SuSE 9.2, which runs
> LVM version: 2.00.25 (2004-09-29)
> Library version: 1.00.19-ioctl (2004-07-03)
> Driver version: 4.1.0
>
> The type of the partition is set to Linux LVM, like the others, but it
> does not work. I get this error:
>
> # pvcreate -vv /dev/hdg9
> Setting global/locking_type to 1
> Setting global/locking_dir to /var/lock/lvm
> File-based locking enabled.
> Locking /var/lock/lvm/P_orphans WB
> Getting size of /dev/hdg9
> metadata/pvmetadatasize not found in config: defaulting to 255
> metadata/pvmetadatacopies not found in config: defaulting to 1
> /dev/hdg9: Couldn't find device. Check your filters?
> Unlocking /var/lock/lvm/P_orphans
>
> I can't see that the filters are a problem. The entry in
> /etc/lvm/lvm.conf is:
> filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/" ]
>
> I understand now that I should use -M1 to add this PV to an old V1 VG,
> but that is not the problem. I still get the same error.
>
> What am I doing wrong?
>
> Any help would be appreciated.
>
> Gunther
I have investigated this a bit further. I have booted SuSE 9.0 and done
a pvcreate /dev/hdg9 from there. It worked fine. I have then added this
PV to VG vg7, which worked fine, too.
When I then boot SuSE 9.2 again, I get the following in
/var/log/boot.msg:
<notice>run boot scripts (boot.lvm)
Scanning for LVM volume groups...
Reading all physical volumes. This may take a while...
1 PV(s) found for VG vg1: expected 2
Volume group "vg1" not found
Found volume group "vg0" using metadata type lvm1
2 PV(s) found for VG vg7: expected 3
Volume group "vg7" not found
Found volume group "vg4" using metadata type lvm1
Activating LVM volume groups...
1 PV(s) found for VG vg1: expected 2
Unable to find volume group "vg1"
11 logical volume(s) in volume group "vg0" now active
2 PV(s) found for VG vg7: expected 3
Unable to find volume group "vg7"
VG vg1 is dead. I have no clue why it still finds traces of it on the
system. VG vg0 and vg4 are up and running. The problem is vg7, to which
I have just added /dev/hdg9. Why can't lvm find it??? /dev/hdg9 has
previously been used as part of an md device (soft raid).
Is this a bug in lvm? Or is my harddisk dying? Or what could it be?
I hope I haven't actually killed my vg7 yet... (All I did was adding the
PV, no data on it yet.)
Gunther
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-08 9:33 ` Gunther Clasen
@ 2006-02-09 0:51 ` Marcin Struzak
2006-02-12 18:00 ` Gunther Clasen
0 siblings, 1 reply; 10+ messages in thread
From: Marcin Struzak @ 2006-02-09 0:51 UTC (permalink / raw)
To: LVM general discussion and development
Gunther Clasen wrote:
> [...] Or is my harddisk dying?
Take a look at smartmontools (http://smartmontools.sourceforge.net/);
they can accurately pinpoint existing or imminent hard-disk failures.
--Marcin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-09 0:51 ` Marcin Struzak
@ 2006-02-12 18:00 ` Gunther Clasen
0 siblings, 0 replies; 10+ messages in thread
From: Gunther Clasen @ 2006-02-12 18:00 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, Feb 08, 2006, Marcin Struzak wrote:
> Gunther Clasen wrote:
> >[...] Or is my harddisk dying?
>
> Take a look at smartmontools (http://smartmontools.sourceforge.net/);
> they can accurately pinpoint existing or imminent hard-disk failures.
Well, that is the reason for my wish to extend that VG. So that I can
copy data from my failing disk:
Feb 12 16:12:55 tui smartd[5958]: Device: /dev/hde, 4 Currently unreadable (pending) sectors
Feb 12 16:12:55 tui smartd[5958]: Device: /dev/hde, 1 Offline uncorrectable sectors
/dev/hda and /dev/hdg only report changes in attributes 8 and 209
(Seek_Time_Performance and Offline_Seek_Performnce). I don't thik that
is a problem.
I'm still quite puzzled as to why I can't crate physical volumes on
/dev/hdg9 and /dev/hdg10, when /dev/hdg7 and /dev/hdg8 work fine...
It can't possibly be down to the filters, as the program suggested?
Regards,
Gunther
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
@ 2006-02-12 22:30 Jim Ford
0 siblings, 0 replies; 10+ messages in thread
From: Jim Ford @ 2006-02-12 22:30 UTC (permalink / raw)
To: LVM general discussion and development
> Take a look at smartmontools (http://smartmontools.sourceforge.net/);
> they can accurately pinpoint existing or imminent hard-disk failures.
I only get a handy 404 page with the above link 8^{
Jim Ford
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
@ 2006-02-13 9:24 Jim Ford
0 siblings, 0 replies; 10+ messages in thread
From: Jim Ford @ 2006-02-13 9:24 UTC (permalink / raw)
To: jaford, LVM general discussion and development
> Take a look at smartmontools (http://smartmontools.sourceforge.net/);
> they can accurately pinpoint existing or imminent hard-disk failures.
I only get a handy 404 page with the above link 8^{
Jim Ford
Just spotted the ); in the URL - ok NOW 8^}
Jim Ford
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-06 21:51 Gunther Clasen
2006-02-08 9:33 ` Gunther Clasen
@ 2006-02-14 9:19 ` Gunther Clasen
2006-02-14 14:38 ` Luca Berra
2006-02-14 14:46 ` Alasdair G Kergon
1 sibling, 2 replies; 10+ messages in thread
From: Gunther Clasen @ 2006-02-14 9:19 UTC (permalink / raw)
To: LVM general discussion and development
On Mon, Feb 06, 2006, Gunther Clasen wrote:
> Hi,
>
> I have the following problem: I have a VG which sits on two partitions.
> This VG has been created with SuSE 7.2, that is version 1 of LVM. (I
> don't know exactly which one.) I wish to extend that VG and I have tried
> to do that from SuSE 9.2, which runs
> LVM version: 2.00.25 (2004-09-29)
> Library version: 1.00.19-ioctl (2004-07-03)
> Driver version: 4.1.0
>
> The type of the partition is set to Linux LVM, like the others, but it
> does not work. I get this error:
>
> # pvcreate -vv /dev/hdg9
> Setting global/locking_type to 1
> Setting global/locking_dir to /var/lock/lvm
> File-based locking enabled.
> Locking /var/lock/lvm/P_orphans WB
> Getting size of /dev/hdg9
> metadata/pvmetadatasize not found in config: defaulting to 255
> metadata/pvmetadatacopies not found in config: defaulting to 1
> /dev/hdg9: Couldn't find device. Check your filters?
> Unlocking /var/lock/lvm/P_orphans
>
> I can't see that the filters are a problem. The entry in
> /etc/lvm/lvm.conf is:
> filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/" ]
>
> I understand now that I should use -M1 to add this PV to an old V1 VG,
> but that is not the problem. I still get the same error.
>
> What am I doing wrong?
Well, I tried a few more things, thought about it, and concluded:
Nothing. I believe the program gets it wrong. The reason for this:
I had 4 partitions on my system which lvm would not detect. These were
hde9, hde10, hdg9 and hdg10. Like so:
# vgdisplay -vv vg0 | grep hde
/dev/hde: No label detected
/dev/hde1: No label detected
/dev/hde3: No label detected
/dev/hde4: No label detected
/dev/hde5: lvm1 label detected
/dev/hde6: lvm1 label detected
/dev/hde7: lvm1 label detected
/dev/hde8: lvm1 label detected
# fdisk /dev/hde
Command (m for help): p
Device Boot Start End Blocks Id System
/dev/hde1 1 50 25168+ 83 Linux
/dev/hde2 2151 158816 78959664 5 Extended
/dev/hde3 51 1100 529200 83 Linux
/dev/hde4 1101 2150 529200 83 Linux
/dev/hde5 2151 8466 3183232+ 8e Linux LVM
/dev/hde6 8467 25216 8441968+ 8e Linux LVM
/dev/hde7 25217 58616 16833568+ 8e Linux LVM
/dev/hde8 58617 92016 16833568+ 8e Linux LVM
/dev/hde9 92017 125416 16833568+ 83 Linux
/dev/hde10 125417 158816 16833568+ 83 Linux
So hde9 and 10 do exist, but lvm does not even try to detect anything on
them. (No, doesn't work with partition type LVM either, I tried that.)
Partitions hdg9 and 10 did look exactly the same. I then formatted them
(hdg9/10), one with ext2, the other with reiserfs and banged them full
with data, mostly from /dev/zero, until 100% full. I then changed the
type to Linux LVM and everything works fine:
# vgdisplay -vv vg0 | grep hdg
/dev/hdg: No label detected
/dev/hdg1: No label detected
/dev/hdg5: No label detected
/dev/hdg6: No label detected
/dev/hdg7: lvm1 label detected
/dev/hdg8: lvm1 label detected
/dev/hdg9: lvm2 label detected
/dev/hdg10: No label detected
Curiously, these 4 partitions had all been used in a software-RAID
volume. So I reckon that lvm somehow picked up the metadata of the
MD-device and refused to work.
There must be some sort of bug-tracking system for lvm. Could somebody
please point me at that so that I can check this out and possibly enter
this as a bug? (Provided that the public has write access...)
Thanks!
Gunther
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-14 9:19 ` Gunther Clasen
@ 2006-02-14 14:38 ` Luca Berra
2006-02-14 18:55 ` Gunther Clasen
2006-02-14 14:46 ` Alasdair G Kergon
1 sibling, 1 reply; 10+ messages in thread
From: Luca Berra @ 2006-02-14 14:38 UTC (permalink / raw)
To: LVM general discussion and development
On Tue, Feb 14, 2006 at 09:19:46AM +0000, Gunther Clasen wrote:
>
>Curiously, these 4 partitions had all been used in a software-RAID
>volume. So I reckon that lvm somehow picked up the metadata of the
>MD-device and refused to work.
this is documented in the manpage for lvm.conf
- snip -
md_component_detection (If set to 1, LVM2 will ignore devices
used as components of software RAID (md) devices by looking for
md superblocks. This doesn't always work satisfactorily e.g. if
a device has been reused without wiping the md superblocks
first.
- end snip -
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-14 9:19 ` Gunther Clasen
2006-02-14 14:38 ` Luca Berra
@ 2006-02-14 14:46 ` Alasdair G Kergon
1 sibling, 0 replies; 10+ messages in thread
From: Alasdair G Kergon @ 2006-02-14 14:46 UTC (permalink / raw)
To: LVM general discussion and development
> > LVM version: 2.00.25 (2004-09-29)
> > Library version: 1.00.19-ioctl (2004-07-03)
Not a good version to use.
The md/partition detection was improved in 2.00.32.
Remember to run 'vgscan' after adding partitions;
and to reboot if fdisk fails to reload the partition table.
Newer versions let you add -vvvv and see exactly why any
device was ignored. For older versions like your you
need to turn on debug logging to a file to get that information.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't create a PV
2006-02-14 14:38 ` Luca Berra
@ 2006-02-14 18:55 ` Gunther Clasen
0 siblings, 0 replies; 10+ messages in thread
From: Gunther Clasen @ 2006-02-14 18:55 UTC (permalink / raw)
To: LVM general discussion and development
On Tue, Feb 14, 2006, Luca Berra wrote:
> On Tue, Feb 14, 2006 at 09:19:46AM +0000, Gunther Clasen wrote:
> >
> >Curiously, these 4 partitions had all been used in a software-RAID
> >volume. So I reckon that lvm somehow picked up the metadata of the
> >MD-device and refused to work.
>
> this is documented in the manpage for lvm.conf
>
> - snip -
> md_component_detection (If set to 1, LVM2 will ignore devices
> used as components of software RAID (md) devices by looking for
> md superblocks. This doesn't always work satisfactorily e.g. if
> a device has been reused without wiping the md superblocks
> first.
> - end snip -
On Tue, Feb 14, 2006, Alasdair G Kergon wrote:
> Not a good version to use.
> The md/partition detection was improved in 2.00.32.
Thank you for your help! So it is a squashed bug... ;-)
I must admit that I hadn't read man lvm.conf, although it hadn't helped:
above snip is not included in my version of it. :-(
Anyway, seems to work fine now...
Gunther
P.S.: Would have liked to use SuSE 10.0 instead of 9.2, but with support
for my modem broken, it's a non-starter :-(((
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-02-14 19:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 9:24 [linux-lvm] can't create a PV Jim Ford
-- strict thread matches above, loose matches on Subject: below --
2006-02-12 22:30 Jim Ford
2006-02-06 21:51 Gunther Clasen
2006-02-08 9:33 ` Gunther Clasen
2006-02-09 0:51 ` Marcin Struzak
2006-02-12 18:00 ` Gunther Clasen
2006-02-14 9:19 ` Gunther Clasen
2006-02-14 14:38 ` Luca Berra
2006-02-14 18:55 ` Gunther Clasen
2006-02-14 14:46 ` Alasdair G Kergon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).