]> git.ipfire.org Git - thirdparty/mdadm.git/commit
udev: add --no-devices option for calling 'mdadm --detail'
authorColy Li <colyli@suse.de>
Wed, 31 Jul 2019 05:29:30 +0000 (13:29 +0800)
committerJes Sorensen <jsorensen@fb.com>
Mon, 12 Aug 2019 20:17:12 +0000 (16:17 -0400)
commit1a52f1fc0266d438c996789d4addbfac999a6139
tree76e7f9794852af541008eef72ae42bc25e9584c7
parentd11abe4bd5cad39803726ddff1888674e417bda5
udev: add --no-devices option for calling 'mdadm --detail'

When creating symlink of a md raid device, the detailed information of
component disks are unnecessary for rule udev-md-raid-arrays.rules. For
md raid devices with huge number of component disks (e.g. 1500 DASD
disks), the detail information of component devices can be very large
and exceed udev monitor's on-stack message buffer.

This patch adds '--no-devices' option when calling mdadm by,
IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"

Now the detailed output won't include component disks information,
and the error message "invalid message length" reported by systemd can
be removed.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
udev-md-raid-arrays.rules