Bug in udev rules? [Crux on RAID/LVM (bootloader)]
I guess my mixture of RAID and LVM cause the issue for LILO. What I have RAID on whole disks sda and sdb. on that I have two partition /dev/md0p1 - boot /dev/md0p2 - LVM2 with volume group main and partition - root - local lilo -m returns [...] Using BIOS devices code 0x80 for RAID boot blocks Reading boot sector from /dev/md0 Fatal: Sorry, don't know how to handle device 0x10300 I have mad additional research I it might be udev error: ls -l /dev/md0* brw-rw---- 1 root disk 9, 0 Oct 25 12:41 /dev/md0 brw-rw---- 1 root disk 259, 0 Oct 25 12:27 /dev/md0p1 brw-rw---- 1 root disk 259, 1 Oct 25 12:41 /dev/md0p2 And I have found following message [1]: "Almost certainly some udev configuration going wrong. What distro are you running? Is there are file in /lib/udev/rules.d or /etc/udev/rules.d with 'md' in the name? What is in that file? Prior to 2.6.28, normal md devices (major number 9) could not be partitioned. You needed to use "mdp" devices (major number close to 254). To get autodetect to create these use the kernel parameter "raid=partitionable". In 2.6.28, partitions don't have to have the same major number as the base device. In you case, md0 is 9,0 md1 is 9,1 md1p1 is 259,0 md1p2 is 259.1 md1p3 is 259,2 as you can see, the device nodes have been created with the wrong name. In each case the name used is md followed by the last digit of what should have been used. udev is the only thing that could have done that." Do you think this is the issue? Wawrzek [1] http://lists-archives.org/linux-kernel/19776613-mdadm-software-raid-woes.htm... -- Wawrzyniec Niewodniczański vel Wawrzek Larry or LarryN Linux User #177124 E-MAIL: wawrzek@gmail.com PhD in Quantum Chemistry WWW: http://wawrzek.name MSc in Molecular Engineering JID: wawrzek@jabber.wroc.pl
Wawrzyniec Niewodniczański wrote:
I guess my mixture of RAID and LVM cause the issue for LILO.
What I have
RAID on whole disks sda and sdb. on that I have two partition
/dev/md0p1 - boot /dev/md0p2 - LVM2 with volume group main and partition - root - local
lilo -m
returns [...] Using BIOS devices code 0x80 for RAID boot blocks Reading boot sector from /dev/md0 Fatal: Sorry, don't know how to handle device 0x10300
I have mad additional research I it might be udev error:
ls -l /dev/md0*
brw-rw---- 1 root disk 9, 0 Oct 25 12:41 /dev/md0 brw-rw---- 1 root disk 259, 0 Oct 25 12:27 /dev/md0p1 brw-rw---- 1 root disk 259, 1 Oct 25 12:41 /dev/md0p2
And I have found following message [1]:
"Almost certainly some udev configuration going wrong. What distro are you running? Is there are file in /lib/udev/rules.d or /etc/udev/rules.d with 'md' in the name? What is in that file?
Prior to 2.6.28, normal md devices (major number 9) could not be partitioned. You needed to use "mdp" devices (major number close to 254). To get autodetect to create these use the kernel parameter "raid=partitionable".
In 2.6.28, partitions don't have to have the same major number as the base device. In you case, md0 is 9,0 md1 is 9,1
md1p1 is 259,0 md1p2 is 259.1 md1p3 is 259,2
as you can see, the device nodes have been created with the wrong name. In each case the name used is md followed by the last digit of what should have been used. udev is the only thing that could have done that."
Do you think this is the issue?
Wawrzek
[1] http://lists-archives.org/linux-kernel/19776613-mdadm-software-raid-woes.htm...
Hi, Why do you use partitioned raid? you should use metadata version 0.90 for the raid 1 metadata location, it is the only one that lilo and grub supports. I would of partitoned the disk into 2 partitons use old metadata 0.90 for md0 for boot and metadata version 1.1 for md1 then pvcrate on md1, you have to install lilo/grub to both disks as per that crux wiki says still. the bios can remove a disk that has been removed and the next disk in the system becomes the boot disk. the only part of the raid1 you do use in boot is for writing new initramfs files to etc... BTW I have a lot of experience with LVM2 if you need help with anything. Regards, Danny
On 26 October 2010 10:11, Danny Rawlins <d.rawlins@datafast.net.au> wrote: [...] Hello,
Why do you use partitioned raid?
Because I can ;). There is no special reason.
you should use metadata version 0.90 for the raid 1 metadata location, it is the only one that lilo and grub supports.
I'm using metadata 0.90 currently so it's not a problem. I guess there is a bug in CRUX in device naming/numbering convention as was described in previous post.
I would of partitoned the disk into 2 partitons use old metadata 0.90 for md0 for boot and metadata version 1.1 for md1 then pvcrate on md1,
[...] Yes. I was considered that path, but I found that message indicated a bug, so decided to check it before moving forwarded. Anyway I don't have more time and I'm going to use scenario suggested above.
BTW I have a lot of experience with LVM2 if you need help with anything.
Thanks, but LVM2 part was the easier one, as I have enough experience. But I will remember this in the case I will decided to do something really crazy with LVM ;) Cheers, Wawrzek -- Wawrzyniec Niewodniczański vel Wawrzek Larry or LarryN Linux User #177124 E-MAIL: wawrzek@gmail.com PhD in Quantum Chemistry WWW: http://wawrzek.name MSc in Molecular Engineering JID: wawrzek@jabber.wroc.pl
On 10-10-26 14:11, Wawrzyniec Niewodniczański wrote:
On 26 October 2010 10:11, Danny Rawlins<d.rawlins@datafast.net.au> wrote:
[...]
Hello,
Why do you use partitioned raid?
Because I can ;). There is no special reason.
you should use metadata version 0.90 for the raid 1 metadata location, it is the only one that lilo and grub supports.
I'm using metadata 0.90 currently so it's not a problem. I guess there is a bug in CRUX in device naming/numbering convention as was described in previous post.
Although I'm starting peeking into crux recently, its udev rules are pretty much standard (besides 2 small outdated files installed, but they have no md related rules whatsoever). mdadm's behaviour is either to rely on udev (if it's running) or rely on pre-3.0 behaviour (if udev is not running) - in latter case creating the necessary nodes and symlinks itself (and names and major/minor numbers might get unusual, depening on things...). Also, 3.x mdadm ships with stock udev rules file itself, and crux port doesn't mess with it in any way or form.. Btw, with some simple dd/degrade/readd tricks, you don't need bootloader understanding raid1 (for its boot stuff, so usually tiny partition at the beginning), as long as its metadata is kept at the end (so either 0.9 or 1.0). With [imho far superior] bootmanager like syslinux it's even simpler (no need to look after stuff like stage1_5).
participants (3)
-
Danny Rawlins
-
Michal Soltys
-
Wawrzyniec Niewodniczański