* mdadm udev rules file just for incremental assembly/disassembly
@ 2010-04-07 3:13 Doug Ledford
0 siblings, 0 replies; only message in thread
From: Doug Ledford @ 2010-04-07 3:13 UTC (permalink / raw)
To: Linux RAID Mailing List, Neil Brown, Dan Williams
[-- Attachment #1.1: Type: text/plain, Size: 1461 bytes --]
I actually don't keep the rules all in one file in Fedora, I have the
udev supplied 64-md-raid.rules file that I don't control and that has
the majority of stuff in it, but none of the incremental assembly stuff.
Then I have a separate 65-md-incremental.rules file that is part of the
mdadm package and I therefore have direct control over. That allows me
to turn incremental assembly on and off as I see fit without having to
bother the udev package maintainer. So, just so you can see how I'm
doing things now that works with dracut, that honors whether or not the
system is set up to use mdadm or dmraid to handle imsm devices, and see
how both incremental assembly and disassembly of devices, and the rule
to handle incremental assembly of containers in a post-initramfs
environment looks like, here it is.
I should note that this is all tested and working at this point, so on
to the next step. Although I will note that I had to turn down
sync_speed_max on my imsm arrays or a resync would make the system
completely unresponsive until it completed. And I've got at least one
bug to that effect open right now. So, I suspect the kernel is not
honoring the "only use idle time" part of the resync speed description.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #1.2: mdadm.rules --]
[-- Type: text/plain, Size: 1219 bytes --]
# This file causes block devices with Linux RAID (mdadm) signatures to
# automatically cause mdadm to be run.
# See udev(8) for syntax
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -If $env{DEVNAME}"
ENV{rd_NO_MDIMSM}=="?*", GOTO="md_imsm_inc_end"
# In case the initramfs only started some of the arrays in our container,
# run incremental assembly on the container itself. Note: we ran mdadm
# on the container in 64-md-raid.rules, and that's how the MD_LEVEL
# environment variable is already set. If that disappears from the other
# file, we will need to add this line into the middle of the next rule:
# IMPORT{program}="/sbin/mdadm -D --export $tempnode", \
SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="md*", \
ENV{MD_LEVEL}=="container", RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -If $env{DEVNAME}"
LABEL="md_imsm_inc_end"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-07 3:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-07 3:13 mdadm udev rules file just for incremental assembly/disassembly Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).