LVM fails at bootup
Hi all,
I am just trying out LVM for a space allocation problem that I am running into, and I am having problems with getting the machine to boot with the new configuration.
The machine is an i386 (Athlon with a Maxtor30 GB IDE HD on hda and a Quantum
30 GB IDE HD on hdb). It is running Debian/GNU Linux (unstable/sid) with a 2.4.13 kernel which was custom compiled. It is also running devfs.
I am using (or attempting to use) lvm 1.0.1rc4 compiled directly into the kernel.
I compiled the tools, patched the kernel, booted onto the patched kernel. I was able to create the pv on /dev/hdb after figuring out that I had to give the full path to the drive, and then was able to create the volgroup (vg01) and the logical volumes fine. They mounted fine manually, but after changing fstab and copying the files on to the logical volume, I rebooted. Thats when my problems began.
I added the vgscan and the vgchange commands to the end of the checkroot.sh script (which in Debian is different from the mountfs.sh script). When the vgscan runs, it generates about two pages of drive errors:
hdb: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb: read_intr: error=0x04 { DriveStatusError }
followed by two
modprobe: Can't locate module /dev/vg01
then vgscan finds the volume, followed by vgchange activating it. After this,
I get a series of "Can't locate module /dev/vg01/<logical volume> errors. After several iterations of this, the machine hangs trying to start syslogging.
The filesystems I am trying to lvm are
/var
/tmp
/home/usr/local
/opt
/backup (backup images of filesystems on machines in my network) /archive (cd images, mp3s etc)
Once I get this booting on the lvm'ed filesystems, I plan to free up the partitions that these occupy and create a second volgroup on /dev/hda, then splitting up the above filesystems between the two volgrps.
Note that once I reverted the system back to the old fstab (effectively using the old partitions, I tried mounting the lvm filesystems. They mounted just fine, and in fact, hdb does not give the drive errors when I do a vgscan (nor has it ever given me drive errors, and a Debian mirror used to live there).
Is it the partition selections I made? I checked and devfs is initialized even before / is checked, S01devfsd versus S10checkroot.sh. Why am I unable to mount my LVM partitions when I boot straight, but it mounts when I boot the system and do the steps manually? Did I miss something major?
Signature · 10 lines
--Brad ============================================================================ Bradley M. Alexander, CISSP | Co-Chairman, Beowulf System Admin/Security Specialist | NoVALUG/DCLUG Security SIG Debian/GNU Linux Developer | [email protected] | [email protected] ============================================================================ As usual, this being a 1.3.x release, I haven't even compiled this kernel yet. So if it works, you should be doubly impressed. (Linus Torvalds, announcing kernel 1.3.3 on the linux-kernel mailing list.)
Quoted 6 lines · Bradley M Alexander
I added the vgscan and the vgchange commands to the end of the
checkroot.shscript (which in Debian is different from themountfs.shscript). When the vgscan runs, it generates about two pages of drive errors:hdb:
read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb:read_intr: error=0x04 { DriveStatusError }
Don't know about this - looks like hardware problems.
Quoted 4 lines
followed by two
modprobe: Can't locate module
/dev/vg01
I get a series of "Can't locate module /dev/vg01/<logical volume> errors.
Maybe you need the following lines in your /etc/modules.conf:
alias block-major-58 lvm-mod
alias char-major-109 lvm-mod
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Quoted 9 lines · Andreas Dilger
Quoted 6 lines · Bradley M Alexander
I added the vgscan and the vgchange commands to the end of the
checkroot.shscript (which in Debian is different from themountfs.shscript). When the vgscan runs, it generates about two pages of drive errors:hdb:
read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb:read_intr: error=0x04 { DriveStatusError }Don't know about this - looks like hardware problems.
I thought so too, but the fact that it only happens when I try to enable LVM at bootup makes me think its not. I had a Debian mirror on this drive prior to this, and it never gave me errors, and if I boot without LVM and enable it after boot by hand, I don't get these errors. I'm suspecting its some interaction with devfs, which is why I came here.
Quoted 9 lines
Quoted 4 lines
followed by two
modprobe: Can't locate module
/dev/vg01
I get a series of "Can't locate module /dev/vg01/<logical volume> errors.Maybe you need the following lines in your
/etc/modules.conf:alias block-major-58 lvm-mod
alias char-major-109 lvm-mod
I compiled it into the kernel rather than modular. But I added these to modules.conf anyway. No change.
Signature · 10 lines
--Brad ============================================================================ Bradley M. Alexander, CISSP | Co-Chairman, Beowulf System Admin/Security Specialist | NoVALUG/DCLUG Security SIG Debian/GNU Linux Developer | [email protected] | [email protected] ============================================================================ Always try to keep the number of landings you make equal to the number of take offs you've made. --Rules of the Air, #14
Quoted 6 lines · Bradley M Alexander
Quoted 1 line
Don't know about this - looks like hardware problems.
I thought so too, but the fact that it only happens when I try to enable LVM at bootup makes me think its not. I had a Debian mirror on this drive prior to this, and it never gave me errors, and if I boot without LVM and enable it after boot by hand, I don't get these errors.
Is there anything in your bootscripts which adjusts the IDE driver to use
more conservative settings (usually via "hdparm")?
Signature · 4 lines
Ben Scott <[email protected]> | The opinions expressed in this message are those of the author and do not | | necessarily represent the views or policy of any other person, entity or | | organization. All information is provided without warranty of any kind. |
Quoted 10 lines · Benjamin Scott
Quoted 6 lines · Bradley M Alexander
Quoted 1 line
Don't know about this - looks like hardware problems.
I thought so too, but the fact that it only happens when I try to enable LVM at bootup makes me think its not. I had a Debian mirror on this drive prior to this, and it never gave me errors, and if I boot without LVM and enable it after boot by hand, I don't get these errors.
Is there anything in your bootscripts which adjusts the IDE driver to use
more conservative settings (usually via "hdparm")?
Not that I can find. The only call to hdparm in the startup files turns off write caching on all of the IDE hard drives at shutdown, and thats in S40umountfs...No other calls to hdparm that I can find.
Signature · 8 lines
--Brad ============================================================================ Bradley M. Alexander, CISSP | Co-Chairman, Beowulf System Admin/Security Specialist | NoVALUG/DCLUG Security SIG Debian/GNU Linux Developer | [email protected] | [email protected] ============================================================================ It's lonely at the top, but you eat better.
Quoted 9 lines · Andreas Dilger
Quoted 6 lines · Bradley M Alexander
I added the vgscan and the vgchange commands to the end of the
checkroot.shscript (which in Debian is different from themountfs.shscript). When the vgscan runs, it generates about two pages of drive errors:hdb:
read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb:read_intr: error=0x04 { DriveStatusError }Don't know about this - looks like hardware problems.
I got these errors by the pages when I pushed UDMA modes too far with hdparm trials, long b4 I upgraded to LVM. Sounds like an IDE error.
check this out.
[root@groucho 1.0.1-rc4]# hdparm -iTt /dev/hdc
/dev/hdc:
Model=WDC WD300BB-00AUA1, FwRev=18.20D18, SerialNo=WD-WMA6R2353241 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq } RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16 CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=58633344 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5
Timing buffer-cache reads: 128 MB in 1.67 seconds = 76.65 MB/sec
Timing buffered disk reads: 64 MB in 4.17 seconds = 15.35 MB/sec
IIRC,
the *udma2 is current setting, beyond which my tired ol p2-233-mobo cannot tread.
Quoted 9 lines · Jim Cromie
Quoted 7 lines · Andreas Dilger
Quoted 6 lines · Bradley M Alexander
I added the vgscan and the vgchange commands to the end of the
checkroot.shscript (which in Debian is different from themountfs.shscript). When the vgscan runs, it generates about two pages of drive errors:hdb:
read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb:read_intr: error=0x04 { DriveStatusError }
I've also seen this error when the kernel mistakenly thought there was a partition on an IDE disk that I was using as a PV. The vgscan command then trys to look at this bogus partition and causes all these errors.
- Joe
Quoted 8 lines · Joe Thornber
Quoted 7 lines · Jim Cromie
Quoted 5 lines · Andreas Dilger
Quoted 4 lines · Bradley M Alexander
I added the vgscan and the vgchange commands to the end of the
checkroot.shscript (which in Debian is different from themountfs.shscript). When the vgscan runs, it generates about two pages of drive errors:
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
hdb:
read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb:read_intr: error=0x04 { DriveStatusError }I've also seen this error when the kernel mistakenly thought there was a partition on an IDE disk that I was using as a PV. The vgscan command then trys to look at this bogus partition and causes all these errors.
Hmmm...The thing is that the only thing _on_ this hard drive is a PV. I gave the entire disk to LVM, by creating a PV on it:
pvcreate /dev/hdb
But now that I think about it, since the lvcreate required the absolute path through devfs (/dev/ide/host0/bus0/target1/lun0/disc), perhaps the pvcreate should have been done this way as well...But why would it work manually and not at boot?
Let me try recreating it and try it again...
Thanks Joe,
Signature · 12 lines
--Brad ============================================================================ Bradley M. Alexander, CISSP | Co-Chairman, Beowulf System Admin/Security Specialist | NoVALUG/DCLUG Security SIG Debian/GNU Linux Developer | [email protected] | [email protected] ============================================================================ Stay out of clouds. The silver lining everyone keeps talking about might be another airplane going in the opposite direction. Reliable sources also report that mountains have been known to hide out in clouds. --Rules of the Air, #13