On 24/11/2017 10:41, Thomas Trepl wrote:
Am 2017-11-24 06:44, schrieb Thomas Trepl:
> I found that the mkinitramfs script misses "readlink" and
> "basename"
...
ยท the initcpio needed /sbin/mdmon added to it
This seems to be the answer to the question above. In the BLFS
mkinitramfs script, only mdadm and udevd are copied. I added mdmon to
that list, rebooted and - tadadada - the device is mounted RW :-)
I'm pretty sure to have seen that archforum-thread also, but somehow
the mdmon thing didn't manage to get into my brain. Your explicit
question about mdmon did the trick ;-)
I just saw that mdmon has been added long time ago, it seems that I
worked with an outdated mkinitramfs. Nevertheless the scripts is still
missing readlink and basename. If ok, i'd add that stuff.
Those pgms are refered in udev rules. Since I have not really a clue
what all that udev stuff does, I wonder how the rules work on a
SysV-system where all the systemd things are not available. that is in
particular
...
# Tell systemd to run mdmon for our container, if we need it.
ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*",
PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c"
ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}",
ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
...
at the end of lib/udev/rules.d/63-md-raid-arrays.rules and
...
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
ACTION=="add|change", IMPORT{program}="/sbin/mdadm --incremental
--export $devnode --offroot ${DEVLINKS}"
ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*",
ENV{MD_FOREIGN}=="no",
ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name
--path $env{ID_PATH}"
ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
...
in lib/udev/rules.d/64-md-raid-assembly.rules
Does that has (negative) effects on a SysV system ?
I guess not many people use raid+Sys V... As far as I am concerned, I
used raid1 from lvm, and neither mdmon nor the mdadm udev rules get used.
Now, I guess a good mkinitramfs should extract all the command names
from RUN or PROGRAM directives in /{etc,lib}/udev/rules.d, and add them
to the initramfs.
Pierre
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page