RE: [Cooker] Yay! Mods for installing an LVM root work!
I think support for configuring LVM at install time would be great. It is already there. What does not work is configuring LVM with diskdrake after installation (due to devfs naming confusion). Everything you describe further on is already there if you configure as expert. You say yourself it would be too messy for novices. -andrej Though, through my experience, configuring LVM can be messy for the average novice, since you've got so many choices, ala pv's/vg's/lv's. The other idea would be to automate the whole thing. Once the partitioning stage is reached there would be Allocate Disk Using LVM / Use traditional partitioning method buttons that would be presented. The Allocate... option would then make a suitable size /boot (maybe 20MB) and then allocate the rest of the disk as one big PV. Then they would be asked if they wanted to have all their file systems in one VG or multiple. Then they'd go about sizing their partitions for the different file systems and it would create the VG's and LV's accordingly. Also, LVM allows you to use whole disks as physical volumes, ala /dev/sdb, would that be something that would be allowed during the install? Obviously not on the boot disk, but on other disks, instead of creating partitions, you could just hit a create raw physical volume button.
Re: [Cooker] Yay! Mods for installing an LVM root work!
Borsenkow Andrej wrote: I think support for configuring LVM at install time would be great. and what about striped LVM ( creating, stripesize),who asks you for the name of the LV, readahead, wich PV's to use It is already there. What does not work is configuring LVM with diskdrake after installation (due to devfs naming confusion). Everything you describe further on is already there if you configure as expert. You say yourself it would be too messy for novices. -andrej Though, through my experience, configuring LVM can be messy for the average novice, since you've got so many choices, ala pv's/vg's/lv's. The other idea would be to automate the whole thing. Once the partitioning stage is reached there would be Allocate Disk Using LVM / Use traditional partitioning method buttons that would be presented. The Allocate... option would then make a suitable size /boot (maybe 20MB) and then allocate the rest of the disk as one big PV. Then they would be asked if they wanted to have all their file systems in one VG or multiple. Then they'd go about sizing their partitions for the different file systems and it would create the VG's and LV's accordingly. Also, LVM allows you to use whole disks as physical volumes, ala /dev/sdb, would that be something that would be allowed during the install? Obviously not on the boot disk, but on other disks, instead of creating partitions, you could just hit a create raw physical volume button.
RE: [Cooker] Yay! Mods for installing an LVM root work!
I think support for configuring LVM at install time would be great. and what about striped LVM ( creating, stripesize),who asks you for the name of the LV, readahead, wich PV's to use O.K. not in these details. You create 0x8e (IIRC) partition that becomes PV (hmm ... not sure what name it gets). Then you can partition it as if it were physical disk into LV and assign LV to VG. Names for LV assigned automatically (IIRC they are 1, 2, etc); I believe, you can give name to VG. Yes, of course, it is plenty to do. But the first question is policy - if Mandrake is committed to natively support LVM. -andrej
Re: [Cooker] Yay! Mods for installing an LVM root work!
Borsenkow Andrej wrote: I think support for configuring LVM at install time would be great. and what about striped LVM ( creating, stripesize),who asks you for the name of the LV, readahead, wich PV's to use O.K. not in these details. You create 0x8e (IIRC) partition that becomes PV (hmm ... not sure what name it gets). Then you can partition it as if it were physical disk into LV and assign LV to VG. Names for LV assigned automatically (IIRC they are 1, 2, etc); I believe, you can give name to VG. Yes, of course, it is plenty to do. But the first question is policy - if Mandrake is committed to natively support LVM. -andrej you are right but it realy needs a lot of work especially for machines with more than one and/or big disks
RE: [Cooker] Yay! Mods for installing an LVM root work!
echo 0x3a00 /proc/sys/kernel/real-root-dev This is not needed at all. Currently initrd mounts kernel and leaves real-root-dev to be RAM disk and system is happy with it: [root@cooker root]# cat /proc/sys/kernel/real-root-dev 256 Even worse, you *must*not* do it. If you change real-root-dev in linuxrc from RAM disk minor 0 kernel will try to remount root after linuxrc is done: init/main.c:prepare_namespace() pid = kernel_thread(do_linuxrc, /linuxrc, SIGCHLD); if (pid0) while (pid != wait(i)); if (MAJOR(real_root_dev) != RAMDISK_MAJOR || MINOR(real_root_dev) != 0) { error = change_root(real_root_dev,/initrd); Trying to do it after real root was already mounted may be harmless, may be not. Usage of real-root-dev is awful kludge, more clean solution would be some /proc (or command line) interface, something like echo 0 /proc/sys/kernel/remount-root or linux ... no-root-remount ... But I hope something better comes in 2.6 so it may become non-issue then. -andrej
RE: [Cooker] Yay! Mods for installing an LVM root work!
I have finally gotten some time to get back to my project of making the installer install on an LVM root (and boot it afterward :-) and I am pleased to report that my mods work! With a caveat or two that I am hoping I can get help working out here. Congratulations! :-) Still, have you seen my post with possible caveats in using LVM for root? http://www.mail-archive.com/cooker@linux-mandrake.com/msg44013.html The changes in the initrd for an LVM root are: echo 0x3a00 /proc/sys/kernel/real-root-dev This is not needed at all. Currently initrd mounts kernel and leaves real-root-dev to be RAM disk and system is happy with it: [root@cooker root]# cat /proc/sys/kernel/real-root-dev 256 Besides, as I already wrote, you do not have fixed relation between device number and volume name. What you need in initrd is the *name* of root device, not its number. /sbin/vgscan Well, I ask ones more - what is the size of config database that is created by vgscan? In my test one PV, one VG, one LV takes about 130K. In case of several groups it looks a bit too much for RAM disk. /sbin/vgchange -a y The 0x3a00 as a root device relates to using /dev/VG/lvol1 (on my system here anyway) Exacly! And even this relation may break if you create another LVM group. Also, in the installer, when installing on an LVM device, when it comes time to populating the lilo.conf file, for some reason the fully pathed root device is prefixed with a /dev so that it writes root=/dev/dev/vg/lvol1. I'm afraid my perl is not up to snuff enough to suss out in the installer why this is happening. The install goes on fine if I choose to edit the image and change the Root field to remove the duplicate /dev. Any ideas why this is happening? Is there some logic somewhere that is supposed to be stripping the /dev from the root device path that is failing in the case of an LVM device being used? If you can make your mods available I'll get a look on weekend. -andrej
RE: [Cooker] Yay! Mods for installing an LVM root work!
I am pretty new to LVM and have not tried it yet but this thought came to mind. Since LVM can dynamically change partition sizes and allow for you to add and subtract hard drive space on the fly... why not have mandrake create lvm by default? Even if the root directory was not run with LVM every branch off of it could be... /bot, /home, /dev, /usr, /tmp, etc. You could maybe even do the swap disk this way? Would this not allow for a very easy to use system where you can add/subtract space on the fly yet still have a nice dynamically allocated single hard drive with all the advantages of partition/mount, while at the same time having all the advantages (space wise) of just a single file system like /. --- Borsenkow Andrej [EMAIL PROTECTED] wrote: I have finally gotten some time to get back to my project of making the installer install on an LVM root (and boot it afterward :-) and I am pleased to report that my mods work! With a caveat or two that I am hoping I can get help working out here. Congratulations! :-) Still, have you seen my post with possible caveats in using LVM for root? http://www.mail-archive.com/cooker@linux-mandrake.com/msg44013.html The changes in the initrd for an LVM root are: echo 0x3a00 /proc/sys/kernel/real-root-dev This is not needed at all. Currently initrd mounts kernel and leaves real-root-dev to be RAM disk and system is happy with it: [root@cooker root]# cat /proc/sys/kernel/real-root-dev 256 Besides, as I already wrote, you do not have fixed relation between device number and volume name. What you need in initrd is the *name* of root device, not its number. /sbin/vgscan Well, I ask ones more - what is the size of config database that is created by vgscan? In my test one PV, one VG, one LV takes about 130K. In case of several groups it looks a bit too much for RAM disk. /sbin/vgchange -a y The 0x3a00 as a root device relates to using /dev/VG/lvol1 (on my system here anyway) Exacly! And even this relation may break if you create another LVM group. Also, in the installer, when installing on an LVM device, when it comes time to populating the lilo.conf file, for some reason the fully pathed root device is prefixed with a /dev so that it writes root=/dev/dev/vg/lvol1. I'm afraid my perl is not up to snuff enough to suss out in the installer why this is happening. The install goes on fine if I choose to edit the image and change the Root field to remove the duplicate /dev. Any ideas why this is happening? Is there some logic somewhere that is supposed to be stripping the /dev from the root device path that is failing in the case of an LVM device being used? If you can make your mods available I'll get a look on weekend. -andrej = SI Reasoning [EMAIL PROTECTED] gnupg/pgp key id 035213BC __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
Re: [Cooker] Yay! Mods for installing an LVM root work!
but if we had the the lvm-1.0.1rc2 code in the kernel and the tools after Sistina we should heve access to both pre lvm-0.9.1beta8 and lvm-1.0 and after created VG's and LV's Pixel wrote: Christian Bricart [EMAIL PROTECTED] writes: [...] - Downward compatibility pb Not true (anymore). LVM 1.0.0 had this problem. Therefore 1.0.1-rcX has been released which provides backward compatibility (like reiserfs did with 3.5.x - 3.6.x) i meant, try rescuing with tomsrtbt ;p