checkarray doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Debian) |
Fix Released
|
Unknown
|
|||
mdadm (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov |
Bug Description
Problem description:
The script /usr/share/
Steps to reproduce:
1) Check the status of every arrays
/usr/
2) Expected output
md0: idle
3) Problematic output: nothing
Additional information:
When I tried to manually check my RAID1 array with "/usr/share/
# sh -x /usr/share/
...
+ [ 1 = 1 ]
+ + ls -d1 /sys/block/md0
cut -d/ -f4
+ arrays=md0
+ MDBASE=
+ [ ! -e /sys/block/
+ read cur_status
#
Under Xenial, dash doesn't seem to like this instruction:
read cur_status < $MDBASE/sync_action
Oddly enough, it works just fine with Trusty's dash.
Software versions:
# lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
# apt-cache policy mdadm dash
mdadm:
Installed: 3.3-2ubuntu7.1
Candidate: 3.3-2ubuntu7.1
Version table:
*** 3.3-2ubuntu7.1 500
500 http://
100 /var/lib/
3.3-2ubuntu7 500
500 http://
dash:
Installed: 0.5.8-2.1ubuntu2
Candidate: 0.5.8-2.1ubuntu2
Version table:
*** 0.5.8-2.1ubuntu2 500
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mdadm 3.3-2ubuntu7.1
ProcVersionSign
Uname: Linux 4.4.0-28-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read kernel buffer failed: Operation not permitted
Date: Wed Jul 6 04:36:29 2016
MDadmExamine.
MDadmExamine.
MDadmExamine.
MachineType: LENOVO 2516CTO
ProcKernelCmdLine: BOOT_IMAGE=
ProcMDstat:
Personalities :
unused devices: <none>
SourcePackage: mdadm
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/14/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET85WW (1.45 )
dmi.board.name: 2516CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 2516CTO
dmi.product.
dmi.sys.vendor: LENOVO
etc.blkid.tab: Error: [Errno 2] No such file or directory: '/etc/blkid.tab'
modified.
modified.
Changed in mdadm (Debian): | |
status: | Unknown → New |
Changed in mdadm (Ubuntu): | |
assignee: | nobody → Mathieu Trudel-Lapierre (cyphermox) |
Changed in mdadm (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in mdadm (Ubuntu): | |
assignee: | Mathieu Trudel-Lapierre (cyphermox) → Dimitri John Ledkov (xnox) |
Changed in mdadm (Ubuntu): | |
status: | Triaged → Fix Committed |
Changed in mdadm (Debian): | |
status: | New → Fix Released |
After some more debugging, it seems to be a behavior change in dash between Xenial:
# /bin/sh -c 'read cur_status < /sys/block/ md0/md/ sync_action; echo $cur_status' md0/md/ sync_action; echo $cur_status'
i
# /bin/bash -c 'read cur_status < /sys/block/
idle
And Trusty:
# /bin/sh -c 'read cur_status < /sys/block/ md0/md/ sync_action; echo $cur_status' md0/md/ sync_action; echo $cur_status'
idle
# /bin/bash -c 'read cur_status < /sys/block/
idle