mdadm-last-resort@.service runs when array is active

Bug #1753786 reported by Ryan Harper on 2018-03-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Debian)
New
Unknown
mdadm (Ubuntu)
High
Unassigned
Artful
Medium
Unassigned
Bionic
High
Unassigned

Bug Description

In testing, a raid5 array is started and mounted, but at some point the <email address hidden> is triggered and unmounts the raid device.

This is fixed upstream with:

https://github.com/neilbrown/mdadm/commit/5c4b3b9aa9f576305b36d5ccbd4b929b51307ce9

1. ubuntu@ubuntu:~$ lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10

2. ubuntu@ubuntu:~$ apt-cache policy mdadm
mdadm:
  Installed: 4.0-2
  Candidate: 4.0-2
  Version table:
 *** 4.0-2 500
        500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status
3. /dev/md0 stays mounted after boot
4. /dev/md0 is unmounted from the system due to <email address hidden> running

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: mdadm 4.0-2 [modified: lib/systemd/system/mdadm-last-resort@.service]
ProcVersionSignature: User Name 4.13.0-36.40-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
Date: Tue Mar 6 16:03:25 2018
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MDadmExamine.dev.sda: Error: command ['/sbin/mdadm', '-E', '/dev/sda'] failed with exit code 1: mdadm: cannot open /dev/sda: Permission denied
MDadmExamine.dev.sdb: Error: command ['/sbin/mdadm', '-E', '/dev/sdb'] failed with exit code 1: mdadm: cannot open /dev/sdb: Permission denied
MDadmExamine.dev.sdc: Error: command ['/sbin/mdadm', '-E', '/dev/sdc'] failed with exit code 1: mdadm: cannot open /dev/sdc: Permission denied
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-36-generic root=UUID=413f8b88-2156-11e8-93a3-525400123400 ro console=ttyS0
ProcMDstat:
 Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
 md0 : active raid5 sdc[1] sdb[0] sda[3]
       10477568 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

 unused devices: <none>
SourcePackage: mdadm
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-bionic:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-bionic
dmi.sys.vendor: QEMU
etc.blkid.tab: Error: [Errno 2] No such file or directory: '/etc/blkid.tab'
mdadm.conf:
 ARRAY /dev/md0 metadata=1.2 spares=1 name=ubuntu:0 UUID=aefcb03c:f7588463:d51ac0c1:3dfa8d62
 MAILADDR root

Related branches

Ryan Harper (raharper) wrote :
Scott Moser (smoser) on 2018-03-07
Changed in mdadm (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → High
Changed in mdadm (Ubuntu Artful):
status: New → Confirmed
importance: Undecided → Medium
Changed in mdadm (Debian):
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mdadm - 4.0-2ubuntu1

---------------
mdadm (4.0-2ubuntu1) bionic; urgency=medium

  * Cherry-pick upstream patch to ensure mdadm-last-resort services
    only runs when it is needed LP: #1753786
    - debian/patches/mdadm-last-resort-use-condition-path-exists.patch

 -- Ryan Harper <email address hidden> Wed, 07 Mar 2018 01:43:16 -0600

Changed in mdadm (Ubuntu Bionic):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.