public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Missing LVM2 drive after upgrade/reboot
@ 2005-12-10 22:40 Peter Kelly
  2005-12-10 22:59 ` Richard Fish
  2005-12-11  1:43 ` Thomas Harold
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Kelly @ 2005-12-10 22:40 UTC (permalink / raw
  To: gentoo-user

Holas,

After a week or so of upgrading gcc, emerge -e world/system, watching hal/dbus 
toggle between +/- 0.5 versions, and having gentoo upgrade udev while I'm 
doing all this, I've finally got a clean, rebuilt system.
revdep-rebuild gives comes up clean.
emerge -autvDN world comes up empty.
emerge -a depclean says I don't have to do anything.

However, upon reboot, I can't get a USB backup drive to mount correctly.
It's an LVM2 partition that should show up as vgusbhd, mounted to /mnt/usbhd.
Something seems to die between vgscan finding the drive/partition, and udev 
creating a /dev/mapper/vgusb* mountpoint.  It has no problem finding the 
other /hd* LVM2 partitions.  Seems only the /dev/sda partition is missing.  
Of course, it's the only usb/sd* drive on the system.

crichton ~ # vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vgiso" using metadata type lvm2
  Found volume group "vg" using metadata type lvm2
  Found volume group "vgexport" using metadata type lvm2
  Found volume group "vgusbhd" using metadata type lvm2

crichton ~ # ll /dev/vgusb/usbhd
lrwxrwxrwx  1 root root 7 Dec 10 16:07 /dev/vgusb/usbhd -> ../sda1

And the udev rule that seems to work, since there is a link
BUS="usb", KERNEL="sd*1", SYSFS{product}="USB 2.0 Storage Device", 
SYSFS{serial}="000422222000000*****", NAME="%k", SYMLINK="vgusb/usbhd"

crichton ~ # ll /dev/mapper/
total 0
drwxr-xr-x   2 root root     200 Dec 10 15:59 .
drwxr-xr-x  18 root root   13940 Dec 10 16:14 ..
crw-rw----   1 root root  10, 63 Dec 10 15:59 control
brw-------   1 root root 254,  4 Dec 10 15:59 vg-portage
brw-------   1 root root 254,  5 Dec 10 15:59 vg-source
brw-------   1 root root 254,  3 Dec 10 15:59 vg-sysbackup
brw-------   1 root root 254,  1 Dec 10 15:59 vg-usr
brw-------   1 root root 254,  2 Dec 10 15:59 vg-usrlocal
brw-------   1 root root 254,  6 Dec 10 15:59 vgexport-export
brw-------   1 root root 254,  0 Dec 10 15:59 vgiso-isoserver

As you can see, there is no /dev/mapper/vgusb.
>From /etc/fstab...
/dev/mapper/vgusbhd-usbhd       /mnt/usbhd      ext3   atime   0 0

Trying to mount the drive directly to /dev/sda1 doesn't work, either

crichton ~ # mount -t ext3 /dev/sda1 /mnt/usbhd/
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


crichton ~ # dmesg | tail
<snip>
VFS: Can't find ext3 filesystem on dev sda1.

The drive has an ext3 fs on it.  It worked until the reboot.  But it's (as 
indicated) an LVM partition.

crichton ~ # fdisk -l
<snip>
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        9119    73248336   8e  Linux LVM

So, is there a simple command that will get me going?  Everything I saw on 
Google says "upon reboot, you should have..."
I don't.

Thanks.

Peter
-- 
Misery loves company, but company does not reciprocate.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-10 22:40 [gentoo-user] Missing LVM2 drive after upgrade/reboot Peter Kelly
@ 2005-12-10 22:59 ` Richard Fish
  2005-12-10 23:35   ` Peter Kelly
  2005-12-11  1:43 ` Thomas Harold
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Fish @ 2005-12-10 22:59 UTC (permalink / raw
  To: gentoo-user

On 12/10/05, Peter Kelly <linuxpete@satx.rr.com> wrote:
> However, upon reboot, I can't get a USB backup drive to mount correctly.
> It's an LVM2 partition that should show up as vgusbhd, mounted to /mnt/usbhd.
> Something seems to die between vgscan finding the drive/partition, and udev
> creating a /dev/mapper/vgusb* mountpoint.  It has no problem finding the
> other /hd* LVM2 partitions.  Seems only the /dev/sda partition is missing.
> Of course, it's the only usb/sd* drive on the system.

Udev doesn't create the device nodes for LVM volumes, these are
created by the LVM tools, and should be symlinks to devices in
/dev/mapper/.   These are made after you do "vgchange -a y <group>".

> crichton ~ # vgscan
>   Reading all physical volumes.  This may take a while...
>   Found volume group "vgiso" using metadata type lvm2
>   Found volume group "vg" using metadata type lvm2
>   Found volume group "vgexport" using metadata type lvm2
>   Found volume group "vgusbhd" using metadata type lvm2
>
> crichton ~ # ll /dev/vgusb/usbhd
> lrwxrwxrwx  1 root root 7 Dec 10 16:07 /dev/vgusb/usbhd -> ../sda1

This is wrong...this link should be to /dev/mapper/vgusbhd-usbhd.

> And the udev rule that seems to work, since there is a link
> BUS="usb", KERNEL="sd*1", SYSFS{product}="USB 2.0 Storage Device",
> SYSFS{serial}="000422222000000*****", NAME="%k", SYMLINK="vgusb/usbhd"

This rule should not exist.

>
> crichton ~ # ll /dev/mapper/
> total 0
> drwxr-xr-x   2 root root     200 Dec 10 15:59 .
> drwxr-xr-x  18 root root   13940 Dec 10 16:14 ..
> crw-rw----   1 root root  10, 63 Dec 10 15:59 control
> brw-------   1 root root 254,  4 Dec 10 15:59 vg-portage
> brw-------   1 root root 254,  5 Dec 10 15:59 vg-source
> brw-------   1 root root 254,  3 Dec 10 15:59 vg-sysbackup
> brw-------   1 root root 254,  1 Dec 10 15:59 vg-usr
> brw-------   1 root root 254,  2 Dec 10 15:59 vg-usrlocal
> brw-------   1 root root 254,  6 Dec 10 15:59 vgexport-export
> brw-------   1 root root 254,  0 Dec 10 15:59 vgiso-isoserver
>
> As you can see, there is no /dev/mapper/vgusb.

Have you run "vgchange -a y vgusbhd"?

-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-10 22:59 ` Richard Fish
@ 2005-12-10 23:35   ` Peter Kelly
  2005-12-11  0:06     ` Peter Kelly
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Kelly @ 2005-12-10 23:35 UTC (permalink / raw
  To: gentoo-user

On Saturday 10 December 2005 16:59, Richard Fish wrote:
> On 12/10/05, Peter Kelly <linuxpete@satx.rr.com> wrote:
> > However, upon reboot, I can't get a USB backup drive to mount correctly.
> > It's an LVM2 partition that should show up as vgusbhd, mounted to
> > /mnt/usbhd. Something seems to die between vgscan finding the
> > drive/partition, and udev creating a /dev/mapper/vgusb* mountpoint.  It
> > has no problem finding the other /hd* LVM2 partitions.  Seems only the
> > /dev/sda partition is missing. Of course, it's the only usb/sd* drive on
> > the system.
>
> Udev doesn't create the device nodes for LVM volumes, these are
> created by the LVM tools, and should be symlinks to devices in
> /dev/mapper/.   These are made after you do "vgchange -a y <group>".
>
And this command fixed it.  /dev/mapper/vgusbhd-usbhd exists.

> > crichton ~ # ll /dev/vgusb/usbhd
> > lrwxrwxrwx  1 root root 7 Dec 10 16:07 /dev/vgusb/usbhd -> ../sda1
>
> This is wrong...this link should be to /dev/mapper/vgusbhd-usbhd.
>
I may have to try this.  The original reason I moved to udev was that the usb 
drive would sometimes show up as /dev/sda, or /dev/sdb after a power failure.  
I've got a UPS on the system, not on the usb drive.


> > And the udev rule that seems to work, since there is a link
> > BUS="usb", KERNEL="sd*1", SYSFS{product}="USB 2.0 Storage Device",
> > SYSFS{serial}="000422222000000*****", NAME="%k", SYMLINK="vgusb/usbhd"
>
> This rule should not exist.

>
> Have you run "vgchange -a y vgusbhd"?

That was the winning command.

Think I'll try editing a couple files, and reboot.  See if it works.
Thanks.

Peter
-- 
On a clear disk you can seek forever.
		-- P. Denning
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-10 23:35   ` Peter Kelly
@ 2005-12-11  0:06     ` Peter Kelly
  2005-12-11  1:27       ` Richard Fish
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Kelly @ 2005-12-11  0:06 UTC (permalink / raw
  To: gentoo-user

On Saturday 10 December 2005 17:35, Peter Kelly wrote:

<using bad netiquette by answering my own message>
>
> And this command fixed it.  /dev/mapper/vgusbhd-usbhd exists.
>
> > > crichton ~ # ll /dev/vgusb/usbhd
> > > lrwxrwxrwx  1 root root 7 Dec 10 16:07 /dev/vgusb/usbhd -> ../sda1
> >
> > This is wrong...this link should be to /dev/mapper/vgusbhd-usbhd.

And removing the udev rule eliminates this.  There is no  /dev/vgusb/usbhd
at all.
>
>
> > > And the udev rule that seems to work, since there is a link
> > > BUS="usb", KERNEL="sd*1", SYSFS{product}="USB 2.0 Storage Device",
> > > SYSFS{serial}="000422222000000*****", NAME="%k", SYMLINK="vgusb/usbhd"
> >
> > This rule should not exist.
See above.  I banged it out, and the device node doesn't get created at all.


> > Have you run "vgchange -a y vgusbhd"?

This is still a winning command.  Once I run it, followed by 'mount -a', 
everything is there.  


Why do I need to run this after every reboot?  It's not *that* big a deal, as 
I'm only rebooting now because of the gcc upgrade, but I'd sure like to 
understand why.

So, bottom line, I still don't get the USB hard drive mounted without 
intervention.  That stinks.

By the way, I noticed a few other issues upon reboot.  /dev/rtc takes about 8 
seconds to create, and starting eth0 complains about no modules for netmask 
or broadcast.  And I have eth0:1 at 192.168.1.255.  But that's next.  Along 
with udev, baselayout got upgraded.

Peter
-- 
An evil mind is a great comfort.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-11  0:06     ` Peter Kelly
@ 2005-12-11  1:27       ` Richard Fish
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Fish @ 2005-12-11  1:27 UTC (permalink / raw
  To: gentoo-user

On 12/10/05, Peter Kelly <linuxpete@satx.rr.com> wrote:
> Why do I need to run this after every reboot?

It is just the way LVM works.  The volumes have to be activated before
you can use them, and there is nothing in the kernel that does this
for you automatically.

For permanently connected disks, gentoo's startup scripts do this for
you automatically (see RC_VOLUME_ORDER in /etc/conf.d/rc).

You might consider removing LVM from the USB disk, and just using a
normal partition table.  With this setup, it makes sense to have a
udev rule that creates a persistent device node, and it happens
automatically.

-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-10 22:40 [gentoo-user] Missing LVM2 drive after upgrade/reboot Peter Kelly
  2005-12-10 22:59 ` Richard Fish
@ 2005-12-11  1:43 ` Thomas Harold
  2005-12-11  2:43   ` Peter Kelly
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Harold @ 2005-12-11  1:43 UTC (permalink / raw
  To: gentoo-user

Peter Kelly wrote:

> Holas,
> 
> After a week or so of upgrading gcc, emerge -e world/system, watching hal/dbus 
> toggle between +/- 0.5 versions, and having gentoo upgrade udev while I'm 
> doing all this, I've finally got a clean, rebuilt system.
> revdep-rebuild gives comes up clean.
> emerge -autvDN world comes up empty.
> emerge -a depclean says I don't have to do anything.

Out of curiosity, is this the only LVM volume that won't boot?  (i.e. do 
you have other LVM2 volumes?)

What was your kernel version before/after the upgrade?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Missing LVM2 drive after upgrade/reboot
  2005-12-11  1:43 ` Thomas Harold
@ 2005-12-11  2:43   ` Peter Kelly
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Kelly @ 2005-12-11  2:43 UTC (permalink / raw
  To: gentoo-user

On Saturday 10 December 2005 19:43, Thomas Harold wrote:

>
> Out of curiosity, is this the only LVM volume that won't boot?  (i.e. do
> you have other LVM2 volumes?)
Yes.  It's the only volume that isn't detected at boot.
crichton log # mount |grep mapper
/dev/mapper/vg-usr on /usr type ext3 (rw)
/dev/mapper/vg-usrlocal on /usr/local type ext3 (rw)
/dev/mapper/vg-sysbackup on /sysbackup type ext3 (rw)
/dev/mapper/vg-portage on /usr/portage type ext3 (rw)
/dev/mapper/vg-source on /usr/src type ext3 (rw)
/dev/mapper/vgexport-export on /export type ext3 (rw)
/dev/mapper/vgiso-isoserver on /isoserver type ext3 (rw)
problem mount ==> /dev/mapper/vgusbhd-usbhd on /mnt/usbhd type ext3 (rw)

Plenty of others are detected.  And there is no problem with mounting the usb 
drive, once I run
vgchange -a y vgusbhd
mount -a
after booting.
>
> What was your kernel version before/after the upgrade?
There was no change to the kernel version
2.6.13-gentoo-r3
Just re-compiled along with the modules after the gcc upgrade.

Peter
-- 
That's the thing about people who think they hate computers.  What they
really hate is lousy programmers.
- Larry Niven and Jerry Pournelle in "Oath of Fealty"
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-12-11  2:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-10 22:40 [gentoo-user] Missing LVM2 drive after upgrade/reboot Peter Kelly
2005-12-10 22:59 ` Richard Fish
2005-12-10 23:35   ` Peter Kelly
2005-12-11  0:06     ` Peter Kelly
2005-12-11  1:27       ` Richard Fish
2005-12-11  1:43 ` Thomas Harold
2005-12-11  2:43   ` Peter Kelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox