Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84435 - LVM2 fails to start at boot after upgrading to 2.00.33-r1
Summary: LVM2 fails to start at boot after upgrading to 2.00.33-r1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-07 14:01 UTC by Michael Helmling
Modified: 2005-03-11 10:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Helmling 2005-03-07 14:01:16 UTC
I'm using LVM2 since several months now with no major problems. A few days ago I updated to 2.00.33-r1 (as this release was marked stable, former used 2.00.08). Now LVM2 dosen't start correctly anymore at boot time, it complains about
"Read only filesystem - cannot create lockfile /var/lock/lvm/V_<vgname>"
This is AFTER the root filesystem (which is not on a LVM, only the /usr directory is) is remounted rw.
After that I can't mount the lv's (not a valid block device) until I manually activate the volume group (vgchange -a y <vgname>).

Reproducible: Always
Steps to Reproduce:
1. Upgrade to LVM2 2.00.33-r1
2. Let fstab mount some LVM2 volumes at boot time.
3. Watch how it fails ;)

Actual Results:  
LVM2 failed to start 

Expected Results:  
Activate the volume group. 

A quick "fix" is to deactivate lock file using in /etc/lvm/lvm.conf, but since 
this is marked as "dangerous", this shouldn't be a long time solution.
Comment 1 Michael Helmling 2005-03-07 14:43:42 UTC
This one's curious - if  Ichange the lock dir in /etc/lvm/lvm.conf from /var/lock/lvm to /tmp, it works - although both folders are on the same partition!!! Seems like a "real" bug. Is the lock feature new in this version?
Comment 2 Eric Edgar (RETIRED) gentoo-dev 2005-03-07 20:17:41 UTC
please add the contents of your fstab.

Comment 3 Michael Helmling 2005-03-07 22:39:41 UTC
My /etc/fstab:

/dev/hdb6               /               reiserfs        defaults 1 1
/dev/myvg1/usr          /usr            reiserfs        defaults 0 0
/dev/hda1               /boot           ext2            noauto,noatime 1 1
/dev/hda5               none            swap            sw 0 0
/dev/myvg1/home         /home           reiserfs        defaults 0 0
/dev/myvg1/var_cache    /var/cache      reiser4         defaults 0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro     0 0
#/dev/fd0               /mnt/floppy     auto            noauto        0 0

# NOTE: The next line is critical for boot!
none                    /proc           proc            defaults      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults      0 0
none                    /dev/pts        devpts          defaults      0 0
Comment 4 Eric Edgar (RETIRED) gentoo-dev 2005-03-08 06:25:06 UTC
does /var/lock/lvm exist and what are its permissions?

/var/lock/lvm should be a directory.
Comment 5 Michael Helmling 2005-03-08 08:43:29 UTC
/var/lock/lvm is a directory with permissions 777 (they were a bit more restrictive before, but I changed them to 777 to ensure that it's not a permissions problem).
Comment 6 Eric Edgar (RETIRED) gentoo-dev 2005-03-08 08:57:16 UTC
Could you try emerging the 2.00.33-r2 ebuild and run the command /sbin/lvm without  rebooting to see if it complains about locking?  That ebuild forces the build to compile the binaries statically.  Which is what they should be for a sbin directory.

This is an odd situation as I am not seeing the issue on my machine.  
Comment 7 Eric Edgar (RETIRED) gentoo-dev 2005-03-08 11:43:47 UTC
please run vgscan -vvv and see if it produces any output as far as locking is concerned.
Comment 8 Michael Helmling 2005-03-08 12:43:19 UTC
Locking is no problem once the system is booted.
I don't even know if it is really a LVM problem, and it's hardly reproducable - appearing not every bootup, but every 3rd or so. Could it be a kernel problem (using 2.6.11-nitro0)?
Fact is, it also appears with statically compiled LVM, so that's not the point. Also, it did also happen once with /tmp as lock dir, so that's also not the problem. Maybe I just have a messed up system??
Comment 9 Eric Edgar (RETIRED) gentoo-dev 2005-03-09 10:08:32 UTC
it may be the kernel you are using.  Try using a gentoo std kernel.
Comment 10 Michael Helmling 2005-03-11 00:04:16 UTC
Hmmmmmmm...didn't get the problem the last few days. I think it's really not LVM but anything else on my system (maybe the nitro kernel). I think you can close this bug!
Comment 11 Eric Edgar (RETIRED) gentoo-dev 2005-03-11 10:41:34 UTC
Closing as this is most likely a specific users kernel causing the issue.