[Bug 1550823] Re: checkarray doesn't work with sh = dash

James Johnston 1550823 at bugs.launchpad.net
Mon May 9 04:15:57 UTC 2016


I can confirm that checkarray is broken out-of-the-box on Ubuntu 16.04
due to this issue.  So, periodic checks of the RAID array don't happen
unless I do my own scheduling and avoid checkarray, or else repair
checkarray itself using one of the workarounds here...

I changed my checkarray script to explicitly use bash, but next time I
upgrade this package, the changes will be lost unless this gets fixed...
My change to use bash instead made checkarray start doing something
useful...

The suggest at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950
to use cat instead of read is a good one, and only a one-line change.
(Preferably without waiting for Debian upstream to fix it?)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1550823

Title:
  checkarray doesn't work with sh = dash

Status in mdadm package in Ubuntu:
  Triaged
Status in mdadm source package in Xenial:
  Triaged
Status in mdadm package in Debian:
  New

Bug description:
  As per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950,
  /usr/share/mdadm/checkarray fails when it tries to read
  /sys/block/mdX/md/sync_action, if running under dash (or apparently
  most shells other than bash), with a 4.x kernel.

  Present in Ubuntu 15.10, where a default install does use /bin/sh ->
  dash, and runs Linux 4.2.

  A simple workaround is to make it a #!/bin/bash script.  Another
  alternative would be to read sync_action with cat, instead of the read
  built-in, since (as a reply on the Debian bug report says), the
  problem is char-at-a-time reading of the file in /sys.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1550823/+subscriptions



More information about the foundations-bugs mailing list