RAID5 reshape stuck due to same badblock on multiple devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Linux [hostname removed] 5.3.0-55-generic #49-Ubuntu SMP Thu May 21 12:47:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu release: 19.10 (although the same issue is present in 18.04 and 20.04 as well).
A RAID5 reshape from 3 to 4 devices got stuck:
md127 : active raid5 sde1[5] sdd1[4] sdc1[0] sdf1[3]
7813769216 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
[
bitmap: 0/30 pages [0KB], 65536KB chunk
with the following stack trace:
[54979.996871] INFO: task md127_reshape:7090 blocked for more than 1208 seconds.
[54979.996922] Tainted: P OE 5.3.0-55-generic #49-Ubuntu
[54979.996967] "echo 0 > /proc/sys/
[54979.997018] md127_reshape D 0 7090 2 0x80004080
[54979.997019] Call Trace:
[54979.997022] __schedule+
[54979.997023] schedule+0x42/0xb0
[54979.997027] reshape_
[54979.997028] ? wait_woken+
[54979.997030] raid5_sync_
[54979.997032] md_do_sync.
[54979.997034] ? ecryptfs_
[54979.997034] ? __switch_
[54979.997035] ? __switch_
[54979.997035] ? __switch_
[54979.997036] ? __switch_
[54979.997036] ? __switch_
[54979.997037] ? __switch_
[54979.997038] md_thread+
[54979.997040] kthread+0x104/0x140
[54979.997040] ? md_start_
[54979.997041] ? kthread_
[54979.997042] ret_from_
No other hardware errors were reported and the reshape got stuck at somewhat different blocks every time it was restarted (all within the same vicinity of each others). It turns out that md had injected the same exact sector into the badblock log of multiple devices at some point before the reshape was started. This could be seen with "mdadm --examine-badblocks /dev/sdXY". The original cause for the badblocks entries was probably a loose cable as the reported sectors were fully readable with the "dd" and "badblocks" command.
The problem was eventually resolved by removing the badblock log on the RAID5 device using "mdadm --assemble /dev/md0 --update=
I would have expected at least an error message in the kernel log rather than just a "hung task" message, probably before the reshape was allowed to be initiated (aka early termination). Furthermore, it would be beneficial if mdadm could allow the badblock log to be cleared for a device rather than removed on the array with "update=
---
ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version k5.3.0-55-generic.
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.11-0ubuntu8.9
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/
Card0.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer': 'amixer'
Card0.Amixer.
DistroRelease: Ubuntu 19.10
HibernationDevice: RESUME=
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: System manufacturer System Product Name
NonfreeKernelMo
Package: linux (not installed)
ProcEnviron:
LC_CTYPE=
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.183.5
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: eoan
Uname: Linux 5.3.0-55-generic x86_64
UnreportableReason: This report is about a package that is not installed.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: False
dmi.bios.date: 03/15/2018
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1302
dmi.board.
dmi.board.name: PRIME Z270-A
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.
dmi.sys.vendor: System manufacturer
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1882312
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.