Public bug reported:

Problem description:

The script /usr/share/mdadm/checkarray exits before checking any array.

Steps to reproduce:

1) Check the status of every arrays
  /usr/share/mdadm/checkarray --all --status
2) Expected output
    md0: idle
3) Problematic output: nothing


Additional information:

When I tried to manually check my RAID1 array with
"/usr/share/mdadm/checkarray --all --status" I noticed it produced no
output. When I invoked it with "sh -x" and the same parameters as the
monthly checking cron job I noticed it was exiting early, before
performing any real check.

# sh -x /usr/share/mdadm/checkarray --cron --all --idle --quiet
...
+ [ 1 = 1 ]
+ + ls -d1 /sys/block/md0
cut -d/ -f4
+ arrays=md0
+ MDBASE=/sys/block/md0/md
+ [ ! -e /sys/block/md0/md/sync_action ]
+ 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://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.3-2ubuntu7 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
dash:
  Installed: 0.5.8-2.1ubuntu2
  Candidate: 0.5.8-2.1ubuntu2
  Version table:
 *** 0.5.8-2.1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mdadm 3.3-2ubuntu7.1
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
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.dev.sda: Error: command ['/sbin/mdadm', '-E', '/dev/sda'] failed 
with exit code 1: mdadm: cannot open /dev/sda: Permission denied
MDadmExamine.dev.sda1: Error: command ['/sbin/mdadm', '-E', '/dev/sda1'] failed 
with exit code 1: mdadm: cannot open /dev/sda1: Permission denied
MDadmExamine.dev.sda2: Error: command ['/sbin/mdadm', '-E', '/dev/sda2'] failed 
with exit code 1: mdadm: cannot open /dev/sda2: Permission denied
MachineType: LENOVO 2516CTO
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-28-generic 
root=/dev/mapper/crypt-xroot ro quiet splash 
cryptopts=target=crypt,source=/dev/sda1,lvm=crypt-xroot possible_cpus=4 
nmi_watchdog=0 kaslr vt.handoff=7
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.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: 
dmi:bvnLENOVO:bvr6IET85WW(1.45):bd02/14/2013:svnLENOVO:pn2516CTO:pvrThinkPadT410:rvnLENOVO:rn2516CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516CTO
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO
etc.blkid.tab: Error: [Errno 2] No such file or directory: '/etc/blkid.tab'
modified.conffile..etc.logcheck.ignore.d.server.mdadm: [deleted]
modified.conffile..etc.logcheck.violations.d.mdadm: [deleted]

** Affects: mdadm (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: mdadm (Debian)
     Importance: Unknown
         Status: Unknown


** Tags: amd64 apport-bug xenial

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

Title:
  checkarray doesn't work

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to