[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lvm boot partition and grub



Hi,

i have successfuly switched my system to lvm. First i had 
"normal" partitions on hda and an empty hdb. Then hda
started to display weird problems so i thought i would 
move all to hdb and also make it all lvm. hda is an old
small drive anyway, so it's time for it to go to the
eternal hardware grounds to spin forever :)
The conversion succeeded after a few stupid mistakes:

1. Grub needs root in hex numbers. For instance mine is
3a05. I specified the wrong id several times as well
as trying /dev/main/lv_root
(i followed the examples mentioned in a mail from Qian
Qong dated 2 aug 2002. He pointed out 2 excellent docs:
http://www-106.ibm.com/developerworks/linux/library/l-lvm/index.html
and
http://tldp.org/HOWTO/LVM-HOWTO/)

2. I have different partitions for /, home, var, usr and
tmp. When i finally switched my root over to lvm, i 
forget to make sure there are dirs named home, var, usr
and tmp in the root lvm partition so the other partitions
can get mounted :)

Ahum, well, one learns by mistakes. In this case it was
definitely so. Now, everything is solved, yet i have a 
few questions.

1. Grub is still on hda and i want to take hda out. If
i install grub to hdb (that will become hda after 
removal of the old hda), my initrd-lvm image will reside
on the boot partition on the new hda but i don't have a 
seperate boot partition so this is also an lvm partition. 
I suspect that this won't work and that i actually will 
need another non lvm boot partition or not? 

Because the initrd image contains the necessary modules 
for lvm but is itself on an lvm partition.
Can this be solved by compiling LVM in the kernel 
instead of a module?

I have CONFIG_BLK_DEV_LVM=Y in my current kernel. If 
this activates LVM, am i correct in understanding that
i don't actually need an initrd-lvm and that i could
simply install grub to hdb, removed hda, adjust settings
in /etc/fstab and /boot/grub/menu.lst and that it
should work?

2. Will the hex device number (3a05) also change when i
take out the first disk (hda)?
Is there any way to know beforehand what that number
will become?

Thanks



Reply to: