|
|
f5dd7b |
From 1a52f1fc0266d438c996789d4addbfac999a6139 Mon Sep 17 00:00:00 2001
|
|
|
f5dd7b |
From: Coly Li <colyli@suse.de>
|
|
|
f5dd7b |
Date: Wed, 31 Jul 2019 13:29:30 +0800
|
|
|
f5dd7b |
Subject: [RHEL7.8 PATCH V2 33/47] udev: add --no-devices option for calling
|
|
|
f5dd7b |
'mdadm --detail'
|
|
|
f5dd7b |
|
|
|
f5dd7b |
When creating symlink of a md raid device, the detailed information of
|
|
|
f5dd7b |
component disks are unnecessary for rule udev-md-raid-arrays.rules. For
|
|
|
f5dd7b |
md raid devices with huge number of component disks (e.g. 1500 DASD
|
|
|
f5dd7b |
disks), the detail information of component devices can be very large
|
|
|
f5dd7b |
and exceed udev monitor's on-stack message buffer.
|
|
|
f5dd7b |
|
|
|
f5dd7b |
This patch adds '--no-devices' option when calling mdadm by,
|
|
|
f5dd7b |
IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
|
|
|
f5dd7b |
|
|
|
f5dd7b |
Now the detailed output won't include component disks information,
|
|
|
f5dd7b |
and the error message "invalid message length" reported by systemd can
|
|
|
f5dd7b |
be removed.
|
|
|
f5dd7b |
|
|
|
f5dd7b |
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
f5dd7b |
Reviewed-by: NeilBrown <neilb@suse.com>
|
|
|
f5dd7b |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
f5dd7b |
---
|
|
|
f5dd7b |
udev-md-raid-arrays.rules | 2 +-
|
|
|
f5dd7b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
f5dd7b |
|
|
|
f5dd7b |
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
|
|
|
f5dd7b |
index 5b99d58..d391665 100644
|
|
|
f5dd7b |
--- a/udev-md-raid-arrays.rules
|
|
|
f5dd7b |
+++ b/udev-md-raid-arrays.rules
|
|
|
f5dd7b |
@@ -17,7 +17,7 @@ TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
|
|
f5dd7b |
ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
|
|
f5dd7b |
LABEL="md_ignore_state"
|
|
|
f5dd7b |
|
|
|
f5dd7b |
-IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
|
|
|
f5dd7b |
+IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
|
|
|
f5dd7b |
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
|
|
|
f5dd7b |
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
|
|
|
f5dd7b |
ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
|
|
|
f5dd7b |
--
|
|
|
f5dd7b |
2.7.5
|
|
|
f5dd7b |
|