Skip to contentSkip to conversation

Chicken and egg problem..

linux-lvm Georges Giralt 4 participants 6 messages Nov 21, 2001

lore
Share & tools
lore
#0 lore raw

Hello !
As I've previously said, I plan to make my RedHat 7.1 (kernel 2.4.5) a pure LVM machine.
To do so, I've build the 1.0.4 version of LVM into the kernel (with the NCR SCSI driver). As to avoid an initrd. Simple is beautifull...

In the sysinit rc script, Redhat has put a vg activation command, but.... My kernel panics, as it is unable to mount root, as the LVM activation commands are after the root fsck (and mount..)

If I put the LVM activation lines early, in the sysinit script, these commands complains beeing not able to access /etc/lvmtab....

So I'm face with a chicken and egg problem. Which one was first ? Any idea ? It will be fun for me to have this configuration set up and running ! Regards

#1 lore raw

-- Georges Giralt <[email protected]>

Quoted 6 lines

Hello !
As I've previously said, I plan to make my RedHat 7.1 (kernel 2.4.5) a pure LVM machine.
To do so, I've build the 1.0.4 version of LVM into the kernel (with the NCR SCSI driver). As to avoid an initrd. Simple is beautifull...

Quoted 6 lines

In the sysinit rc script, Redhat has put a vg activation command, but.... My kernel panics, as it is unable to mount root, as the LVM activation commands are after the root fsck (and mount..)

If I put the LVM activation lines early, in the sysinit script, these commands complains beeing not able to access /etc/lvmtab....

The kernel panic is extactly why you probably wouldn't want to use only LVM on the system. Leaving the root volume (a.k.a., '/'), primary swap and probably /var on the first three partitions of the boot device will make your life enormously simpler in the long run.

This is pretty much the only way you'll be able to convienently recover from any LVM problems in the future. Otherwise you'll need bootable media floating around.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 800 762 1582
#2 lore raw

En r�ponse � Steven Lembark <[email protected]>:

Quoted 19 lines

-- Georges Giralt <[email protected]>

Quoted 2 lines

Hello !
As I've previously said, I plan to make my RedHat 7.1 (kernel 2.4.5)

a

Quoted 2 lines

pure LVM machine.
To do so, I've build the 1.0.4 version of LVM into the kernel (with

the

Quoted 3 lines

NCR SCSI driver). As to avoid an initrd. Simple is beautifull...

In the sysinit rc script, Redhat has put a vg activation command,

but....

Quoted 1 line

My kernel panics, as it is unable to mount root, as the LVM

activation

Quoted 3 lines

commands are after the root fsck (and mount..)

If I put the LVM activation lines early, in the sysinit script,

Quoted 8 lines

these

Quoted 1 line

commands complains beeing not able to access /etc/lvmtab....

The kernel panic is extactly why you probably wouldn't want to use only LVM on the system. Leaving the root volume (a.k.a., '/'), primary swap and probably /var on the first three partitions of the boot device will make your life enormously simpler in the long run.

Yes and no....
I use HP boxes, on which LVM is native.
My computer has been upgraded from RH4.1 to 7.1 with all the steps in beetween. This is why I would use LVM on my boot disk.
Tired re creating a new / or /var and moving data from one file system to the next.
And I always have bootable floppy/CD floating around...
My question was in fact to learn how to make the LVM information static on the /etc directory. (if this information is not valid, the system will not boot anyway, so it doesn't hurt) Of course, I must rebuild these files if I change the volume group holding the / filesystem.... Something which is easyly done on an HP machine...

Quoted 16 lines

This is pretty much the only way you'll be able to convienently recover from any LVM problems in the future. Otherwise you'll need bootable media floating around.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                            +1 800 762 1582

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

#3 lore raw
In reply to Steven Lembark
Quoted 3 lines · Steven Lembark

The kernel panic is extactly why you probably wouldn't want to use only LVM on the system.

I do it. Only my boot partition is a regular ol' partition. I won't say I haven't had problems that I had to recover from in the past with an LVM root, but luckily enough my distro vendor's LVM support is decent and their BOOT kernel/media has an LVM module built for it.

Quoted 4 lines

Leaving the root
volume (a.k.a., '/'), primary swap and probably /var on the first three partitions of the boot device will make your life enormously simpler in the long run.

I completely disagree. Eventually you will get to a point where an upgrade of your system will require more space in / or /usr and even just normal usage will want more space in /var. Being able to expand these easily with LVM is awesome!

Quoted 2 lines

This is pretty much the only way you'll be able to convienently recover from any LVM problems in the future.

Just use a good boot disk. You are even luckier if your distro vendor's stock kernel and/or media support LVM.

Quoted 1 line

Otherwise you'll need bootable media floating around.

Of course. Don't you always? :-)

b.

Signature · 1 line
Brian J. Murrell
#5 lore raw
In reply to Georges Giralt
Quoted 5 lines · Georges Giralt

As I've previously said, I plan to make my RedHat 7.1 (kernel 2.4.5) a pure LVM machine.
To do so, I've build the 1.0.4 version of LVM into the kernel (with the NCR SCSI driver). As to avoid an initrd. Simple is beautifull...

Simple might be beautiful but compiling LVM into the kernel does not alleviate the need for an initrd if your root fs is on an LVM device.

Quoted 6 lines

In the sysinit rc script, Redhat has put a vg activation command, but.... My kernel panics, as it is unable to mount root, as the LVM activation commands are after the root fsck (and mount..)

If I put the LVM activation lines early, in the sysinit script, these commands complains beeing not able to access /etc/lvmtab....

Now you know why you need an initrd. :-)

b.

Signature · 1 line
Brian J. Murrell
#4 lore raw
In reply to Brian J. Murrell

-- "Brian J. Murrell" <[email protected]>

Quoted 9 lines · Steven Lembark
Quoted 3 lines

The kernel panic is extactly why you probably wouldn't want to use only LVM on the system.

I do it. Only my boot partition is a regular ol' partition. I won't say I haven't had problems that I had to recover from in the past with an LVM root, but luckily enough my distro vendor's LVM support is decent and their BOOT kernel/media has an LVM module built for it.

Luck has a rather nasty way of running out just when you need the system. I've spent way too much time helping extricate people from LVM problems to run my root file system on it. The "all LVM" systems from HP and Sun depend on a non-braindead boot ROM and the ability to fake out the file system with sequentail LV's that look to the boot loader like partitions. On HP's this lets you boot -lm, fix things and reboot. Lacking this option on Intel systems, I'd make a point of leaving the main boot area on a native hardware format.

Quoted 10 lines
Quoted 5 lines

Leaving the root
volume (a.k.a., '/'), primary swap and probably /var on the first three partitions of the boot device will make your life enormously simpler in the long run.

I completely disagree. Eventually you will get to a point where an upgrade of your system will require more space in / or /usr and even just normal usage will want more space in /var. Being able to expand these easily with LVM is awesome!

Who said anything about not having /usr on LVM? If the root (basically /etc, /lib and a wholelotta mount points) is a partition and your primary swap is also then you can boot just as easily without LVM as with it. I've been running with / on a 128MB partition for years and never pushed it past 50%. Same for /var: adding a few choice mount points can reduce the need for expanding the main storage enormously. If /var/log, for example, is on a partition it makes life easier trying to diagnose any problems.

Quoted 2 lines

Just use a good boot disk. You are even luckier if your distro vendor's stock kernel and/or media support LVM.

Even luckier than that if they're patched to exactly the same level you are and can read your LVM system. This only has to blow up once before you get to spend a weekend [or worse] fixing the problem.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 800 762 1582