OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Joseph Tingiris - 03.01.2019

FS#2044 - /etc/init.d/mdadm is set to STOP=98 before /etc/init.d/umount at STOP=99

Supply the following if possible:
- Device problem occurs on

specifically tested & confirmed on x86-64 and ipq806x

- Software versions of OpenWrt/LEDE release, packages, etc.

18.06.1 and snapshot

- Steps to reproduce

opkg install mdadm

Joseph Tingiris commented on 03.01.2019 18:00

If mdadm is stopped with mounted filesystems then corruption could occur. In fact, it wont allow it unless it's –force'ed and that's not done with /etc/init.d/mdadm as-is (nor should it be). i.e.

mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?

The proper order would be to umount first, then stop the meta device(s).

I've been trying to work around the installed packaged code, to avoid breaking the upgrade paths. However, this is one that I think should be fixed upstream. Changing /etc/init.d/mdadm to STOP=99 would not suffice because m is before u in the sort order. Many other permutations, e.g. K100mdadm or K999mdadm sort incorrectly too.

What would work is to reverse the order, e.g. mdadm is STOP=98 and umount is STOP=97. Leave 99 open for future use.

Joseph Tingiris commented on 03.01.2019 19:11

FWIW; this works & wont break the upgrade path ..

# cp /etc/init.d/umount /etc/init.d/umount97

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org; hack

STOP=97
stop() {
        sync
        /bin/umount -a -d -r
}

# service umount97 enable

Joseph Tingiris commented on 13.01.2019 18:51

lvm2 is a community package. This issue has been resubmitted, here:

https://github.com/openwrt/packages/issues/7954

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing