LVM support for LILO
Quoted 3 lines · Michael Kellen
I actually already have code for a check (in
lilo.c) to insure that the files are contiguous and on the first physical disk. With the lv to pv ioctl, that would be easy to extend to any bootable device.
Actually, there is no need for an image to be contiguous, because even the filesystem does not guarantee a file is contiguous. The only requirement is the image be on a single device that the BIOS can see when it is first booting.
Quoted 2 lines
In implementing this, we need to remember that not just the kernel needs to be mapped. The boot loader any ramdisks need to be known as well.
Yes, once the LVM block mapping works, it will work for all of these.
Quoted 3 lines
What I'd *really* like to see is kernel code for autostarting of LVM similar to the autostart of md (side note: 2.4.0-test7 seems to break that, though). One step at a time, though.
Yes, it would be nice to eliminate the requirement for an initrd to use LVM. It may be that you could put some limits in place to make the root VG simple enough for the kernel to load. You could even hard-code it to have only 1 LV in this VG, which is the root filesystem. If it was all __init code for the LVM module, it would not bloat the kernel... The tricky part would be to find the right PV for the rootvg before LVM is loaded...
Cheers, Andreas
Quoted 3 lines · Andreas Dilger
Yes, it would be nice to eliminate the requirement for an initrd to use LVM. It may be that you could put some limits in place to make the root VG simple enough for the kernel to load. You could even hard-code it to
HP-UX puts info about the boot vg on disk, actually it writes there info about the posistion of boot, root, swap and dump LVs. These LV are required to be contiguous, so the info is simple enough.
Quoted 1 line
have only 1 LV in this VG, which is the root filesystem. If it was all
uhm, if we want to kill partition tables, we have to cope with the limit that you cannot put a PV in two different VGs, so this might not work for some people.
Quoted 3 lines
__initcode for the LVM module, it would not bloat the kernel... The tricky part would be to find the right PV for the rootvg before LVM is loaded...
would it be simplier if we assume it is the same PV from which we are booting?
L.
Signature · 2 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l.
Quoted 7 lines · Andreas Dilger
Yes, it would be nice to eliminate the requirement for an initrd to use LVM. It may be that you could put some limits in place to make the root VG simple enough for the kernel to load. You could even hard-code it to have only 1 LV in this VG, which is the root filesystem. If it was all
__initcode for the LVM module, it would not bloat the kernel... The tricky part would be to find the right PV for the rootvg before LVM is loaded...
I'm working on this. It is handled very much like md autostart. In partitions/msdos.c a function is called for every partition with the lvm id. This function reads the pv structure, and adds it to the linked list of pvs for this vg (or creates it if this is the first pv).
If all pvs of a vg are found, the vg, lv and pe structures are loaded from disk and the vg can be activated with a (modified) vgchange -a y.
Expect alpha code in a few weeks.
Christoph
Signature · 1 line
Always remember that you are unique. Just like everyone else.