Re: [PATCH 2/2] udev: add --no-devices option for calling 'mdadm --detail'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 31 2019, Coly Li wrote:

> 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@xxxxxxx>
> Cc: Neil Brown <<neilb@xxxxxxxx>

Reviewed-by: NeilBrown <neilb@xxxxxxxx>

Thanks for these!

NeilBrown


> ---
>  udev-md-raid-arrays.rules | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
> index 5b99d58..d391665 100644
> --- a/udev-md-raid-arrays.rules
> +++ b/udev-md-raid-arrays.rules
> @@ -17,7 +17,7 @@ TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
>  ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
>  LABEL="md_ignore_state"
>  
> -IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
> +IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
>  ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
>  ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
>  ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
> -- 
> 2.16.4

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux