udev and mkraid
Hi,
how to mkraid on an udev system?
/dev is a tmpfs and has only inodes found via /sys (created by udevstart).
Now there is no md0, so there is no md0 device in /dev, so I can't make an md0 with mkraid. But if I could, udev would create an md0 device.
Oh well.
Either the mkraid tool should know how to create an md device without /dev/mdX existing, or the kernel md driver should always export all possible md via sysfs, even if they don't exist, so mkraid can create them.
Did I miss anything?
As a hack, I'm running mknod before mkraid. But it would be nice, if some day that would no longer be necessary. It defeats the whole purpose of mkraid in my opinion.
So if you know a better way, please let me know.
Regards, Andreas
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Andreas Jellinghaus
how to mkraid on an udev system?
/dev is a tmpfs and has only inodes found via /sys (created by udevstart).
First, you should be using mdadm instead of mkraid.
Second, /dev/md0 _does_ get created by default on a system running udev, at least it does on my systems. That doesn't help if you need /dev/md1 or anything higher, though.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Kevin P. Fleming
Second,
/dev/md0_does_ get created by default on a system running udev, at least it does on my systems. That doesn't help if you need/dev/md1or anything higher, though.
Both md0 and md1 get created at my place since I have two raid partitions. On the system that doesn't have raid, I don't get any, like expected.
Signature · 2 lines
John L. Fjellstad web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
Quoted 3 lines · John L Fjellstad
Both md0 and md1 get created at my place since I have two raid partitions. On the system that doesn't have raid, I don't get any, like expected.
There is (ugly) code in the kernel to automatically create /dev/md0 regardless of whether any RAID-autodetect partitions are found. If that's not happening on your system, it would be interesting to find out why. It certainly happens on mine, and I rely on that behavior to boot my machines.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Kevin P. Fleming
that's not happening on your system, it would be interesting to find out why. It certainly happens on mine, and I rely on that behavior to boot my machines.
I just upgraded to 2.6.7, but this was true for 2.6.5 too. I'm using Linus' original kernel...
On my server, which has RAID1, I have the raid code compiled into the kernel. AFAIK, it gets created by udev. Using udevinfo, I can see that md0 is a /block/md0, with these SYSFS information:
SYSFS{dev}="9:0"
SYSFS{range}="1"
SYSFS{size}="690560"
SYSFS{stat}=" 1636 0 34472 0
600583 0 4804664 0 0 0
0"For md1, I see these information:
looking at class device '/sys/block/md1':
SYSFS{dev}="9:1"
SYSFS{range}="1"
SYSFS{size}="267257088"
SYSFS{stat}=" 20071 0 261188 0
458504 0 3676670 0 0 0
0"So the information does look like it is exported to sysfs.
On the workstation, I don't have raid code compiled in, and get no mdX nodes created.
Signature · 2 lines
John L. Fjellstad web: http://www.fjellstad.org/ Quis custodiet ipsos custodes