]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
Create: tell udev md device is not ready when first created.
authorNeilBrown <neilb@suse.com>
Fri, 28 Apr 2017 05:05:50 +0000 (15:05 +1000)
committerJes Sorensen <jsorensen@fb.com>
Tue, 2 May 2017 13:41:39 +0000 (09:41 -0400)
commitcd6cbb08c458cee07acb1d854e04532b29ec87bf
treeca6482225586ea4d423af1e674dd5ca7021daa4a
parentf8c432bfc9929dbbcb659b2d11552dc9fc76ad24
Create: tell udev md device is not ready when first created.

When an array is created the content is not initialized,
so it could have remnants of an old filesystem or md array
etc on it.
udev will see this and might try to activate it, which is almost
certainly not what is wanted.

So create a mechanism for mdadm to communicate with udev to tell
it that the device isn't ready.  This mechanism is the existance
of a file /run/mdadm/created-mdXXX where mdXXX is the md device name.

When creating an array, mdadm will create the file.
A new udev rule file, 01-md-raid-creating.rules, will detect the
precense of thst file and set ENV{SYSTEMD_READY}="0".
This is fairly uniformly used to suppress actions based on the
contents of the device.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Assemble.c
Build.c
Create.c
Incremental.c
Makefile
lib.c
mdadm.h
mdopen.c
udev-md-raid-creating.rules [new file with mode: 0644]