Skip to contentSkip to conversation

/boot on lvm?

linux-lvm Michael 9 participants 17 messages May 16, 2004 – May 31, 2004

lore
Share & tools
lore

Michael

author
#0 lore raw

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

#1 lore raw
Quoted 1 line · Michael

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

i don't have any problem with this kind of setup, but you will find many people here that will say just the opposite.

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#2 lore raw

Hehehe the eternal discussion :)

Well, I just don't have the guts to put /boot in LVM so I just put it on a 'md' device. Do boot managers like Lilo and Grub cope with LVM ? I know Lilo does cope with md since it will put the boot block on both physical drives when installing. And how does it work when the bios needs to reference the boot image which is in an LVM volume ? Does this work at all ? I just never tried, but I am curious :)

And swap in LVM seems fine to me too. You should only keep performance in mind. On the other hand, with the fast disks nowadays I don't think you'll have any problems with normal usage.

I also put my root in LVM, and this works great. Only thing is that you might have some problems when migrating to newer LVM versions, but it is do-able. Having your root in a resizable volume has many advantages I think.

Just my few cents,
Martijn

Quoted 9 lines · Luca Berra
Quoted 1 line · Michael

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

i don't have any problem with this kind of setup, but you will find many people here that will say just the opposite.

L.

Signature · 2 lines
There's someone in my head, but it's not me.
--- Pink Floyd
#3 lore raw
Quoted 3 lines · Martijn Schoemaker

Well, I just don't have the guts to put /boot in LVM so I just put it on a 'md' device. Do boot managers like Lilo and Grub cope with LVM ? I know Lilo does cope with md since it will

there is a patch for lilo at http://www.saout.de/misc/
grub, someone mentioned a gentoo patch, but i have not looked at it yet

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#4 lore raw
In reply to Martijn Schoemaker
Quoted 16 lines · Martijn Schoemaker
Quoted 6 lines · Luca Berra
Quoted 2 lines · Michael

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

i don't have any problem with this kind of setup, but you will find many people here that will say just the opposite.

Hehehe the eternal discussion :)

Well, I just don't have the guts to put /boot in LVM so I just put it on a 'md' device. Do boot managers like Lilo and Grub cope with LVM ? I know Lilo does cope with md since it will put the boot block on both physical drives when installing. And how does it work when the bios needs to reference the boot image which is in an LVM volume ? Does this work at all ? I just never tried, but I am curious :)

Quoted 4 lines

I also put my root in LVM, and this works great. Only thing is that you might have some problems when migrating to newer LVM versions, but it is do-able. Having your root in a resizable volume has many advantages I think.

Especially with a "live" resizeable filesystem.

Doesn't HP-UX have a setup where you have /stand (IIRC) which will always reside in the same place and should always boot etc and everything else on LVM? I think there was a scheme like that. With Linux, /boot and initrd's could be arranged like that. That is what root raid and root fs/driver/bus as module -kernels usually do: you boot with an initrd that has enough confs, utils and modules to get the devices, start the raids and mount root to pivot to.

Now, for the non-DOS, could LVM have some extra features to allow making all disks PV's and have /boot and initrd or /stand-like on a "special" location that boot loaders etc can find and use to start the system? There would just need to be enough to start LVM to a point where you can mount the root LV.

(I may also be thinking Aix here. Such wonderful fs management ;)

Signature · 2 lines
I once waxed the floors of a nursing home, pulled off all the rubber
feet on the walkers, and yelled "FIRE!"
author
#5 lore raw
Quoted 4 lines
Quoted 4 lines

Having your root in a resizable volume has many advantages I think.

When I installed Fedora Core 2 the other day the installation program was nice enough to allow me to setup LVM as easily as I could have setup none LVM partitions but it wouldn't let me put /boot in LVM. Since I'd already been told that doing so was possible I was a little disappointed but otherwise everything worked well. It did let me put /usr, /var, and /home in LVM.

#6 lore raw
In reply to Harri Haataja
Quoted 3 lines · Harri Haataja

Doesn't HP-UX have a setup where you have /stand (IIRC) which will always reside in the same place and should always boot etc and everything else on LVM? I think there was a scheme like that. With

not exactly (i am not going to dive into details since i don't think it is relevant to the list)
but hp-ux is designed for hp-9000 hardware, while linux is designed to support a much broader range of hardware (including shitty hardware like the PC)

Quoted 1 line

Linux, /boot and initrd's could be arranged like that. That is what root

How is that different from what we already have now using lilo and an lvm aware initrd? except that we don't have any constraint on placing the kernel and initrd (except for hardware limitation of said shitty platform)

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#7 lore raw
Quoted 8 lines · Luca Berra
Quoted 3 lines · Harri Haataja

Doesn't HP-UX have a setup where you have /stand (IIRC) which will always reside in the same place and should always boot etc and everything else on LVM? I think there was a scheme like that. With

not exactly (i am not going to dive into details since i don't think it is relevant to the list) but hp-ux is designed for hp-9000 hardware, while linux is designed to support a much broader range of hardware (including shitty hardware like the PC)

Indeed. That tends to come up. But there are ways to go around those. I think some people are looking for neater ways that don't have to work everywhere, but can be made to work somewhere.

I was just adding(?) to the speculation.

Quoted 5 lines
Quoted 1 line

Linux, /boot and initrd's could be arranged like that. That is what root

How is that different from what we already have now using lilo and an lvm aware initrd? except that we don't have any constraint on placing the kernel and initrd (except for hardware limitation of said shitty platform)

It probably isn't. Only not everyone seems to be using initrd's. The latter paragraph was probably just stating the obvious.

If there was something I set out to say in that message, maybe it was:
Would there be a way to arrange kernel and initrd into a position where the bootloader (including especially grub) can find it without using a specific partition for it? Then, for example, you could raid1 two whole disks, mark the md device as a pv and install a system on volumes there.

Signature · 1 line
Eagles may soar, but weasels don't get sucked into jet engines.
#8 lore raw
Quoted 5 lines · Harri Haataja

If there was something I set out to say in that message, maybe it was:
Would there be a way to arrange kernel and initrd into a position where the bootloader (including especially grub) can find it without using a specific partition for it? Then, for example, you could raid1 two whole disks, mark the md device as a pv and install a system on volumes there.

i don't grub much, my personal belief is that linux has too many hw/filesystem combinations for it to work perfectly.
what you say could be done if not for a minor glitch, i don't remember if this has been changed with lvm2.
'there is no room inside the VGDA to store a boot sector'

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#9 lore raw
In reply to Michael
Quoted 2 lines · Michael

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

I run everything on LVM except for /boot, primarily because I use GRUB as a bootloader and it doesn't understand LVM volumes. As long as your bootloader understands LVM volumes there should be no problem with it.

Signature · 1 line
Jeff Layton <[email protected]>
#10 lore raw
Quoted 8 lines · Jeff Layton
Quoted 2 lines · Michael

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?

I run everything on LVM except for /boot, primarily because I use GRUB as a bootloader and it doesn't understand LVM volumes. As long as your bootloader understands LVM volumes there should be no problem with it.

Gentoo bug 42433: [PATCH] GRUB x86 LVM support
http://bugs.gentoo.org/show_bug.cgi?id=42433

Altough it's not yet finished, it looks quite interesting.

Signature · 1 line
Wolfram Schlich; Friedhofstr. 8, D-88069 Tettnang; +49-(0)178-SCHLICH
author
#11 lore raw
In reply to Jeff Layton
Quoted 6 lines

I run everything on LVM except for /boot, primarily because I use GRUB as a bootloader and it doesn't understand LVM volumes. As long as your bootloader understands LVM volumes there should be no problem with it.

I use Lilo. Does Lilo understand LVM volumes?

#12 lore raw
Quoted 1 line · Michael

I use Lilo. Does Lilo understand LVM volumes?

I think there are some versions that do and some patches, but it's probably safest to assume that it doesn't. You might also want to consider making the switch to GRUB -- it's more forgiving of mistakes than LILO is.

<shameless plug>

If you're just getting started, you might want to have a look at the article I recently wrote for SysAdmin Mag on Linux root disk mirroring. It covers using MD and LVM to set up mirrored rootdisks.

It was in the April issue of sysadmin mag...

http://samag.com/articles/2004/0404/

</shameless plug>

The article covers LVM1, but doing this with LVM2 is pretty similar. If you're doing this with LVM2, you'll probably also need the lvm2create_initrd script so you can create an initrd image:

http://poochiereds.net/svn/lvm2

It's not complete yet (which is why it's not in the official tarball), but works fairly well with most configurations.

Signature · 1 line
Jeff Layton <[email protected]>
#13 lore raw
In reply to Michael
Quoted 7 lines · Michael
Quoted 6 lines

I run everything on LVM except for /boot, primarily because I use GRUB as a bootloader and it doesn't understand LVM volumes. As long as your bootloader understands LVM volumes there should be no problem with it.

I use Lilo. Does Lilo understand LVM volumes?

Yes, but to put / on LVM you need to use initrd. You also probably want to force the minor number of <VG>/root to something fixed, since the kernel isn't mounting by name at that point.

I built an initrd with busybox, LVM, megaraid and bash. Great for diagnosing problems.

(Recent LILO has a bug with device-mapper. Either downgrade or upgrade to the latest, or follow the debian bugtracking on it)

--Dan

#14 lore raw
In reply to Michael

Running RH9 with /root on LVM gave me no end of headaches when upgrading to 2.6 kernels. Primarily because I had to make a initrd RAM disk image.

So now it works fine. But next time I set up my own box, I'll make sure that at least /boot and /root are no-frills partitions.

Peter

Quoted 6 lines · Michael mogmios-at-mlug.missouri.edu |Lists|

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 2 lines
Peter Valdemar M�rch
http://www.XXXXXXXXX
#15 lore raw

what about compiling these modules into your kernel, since they are an integrated part of your setup?

best regards,
raoul bhatia

Quoted 16 lines · Peter Valdemar Morch

Running RH9 with /root on LVM gave me no end of headaches when upgrading to 2.6 kernels. Primarily because I had to make a initrd RAM disk image.

So now it works fine. But next time I set up my own box, I'll make sure that at least /boot and /root are no-frills partitions.

Peter

Quoted 6 lines · Michael mogmios-at-mlug.missouri.edu |Lists|

Is it okay to put everything, including /boot and other critical Linux files on an LVM drive? How about swap space?
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 5 lines
____________________________________________________________________
raoul bhatia                              email.    [email protected]
- ipax.tk -                               web.    http://www.ipax.tk
chief technician, support                 irc.      #ipax (quakenet)
____________________________________________________________________
#16 lore raw
Quoted 2 lines · raoul bhatia

what about compiling these modules into your kernel, since they are an integrated part of your setup?

You still have to vgscan; vgchange -ay in order to activate the volume group, so that gets done in initrd. Still, it's fairly painless.

--Dan