Btrfs: Disk replacement causes massive allocation of empty single chunks while degraded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I experience this with Ubuntu 21.04. I've not tested on older releases. I have a btrfs RAID1 array and simulated a failed disk and then replaced it with the `btrfs replace` feature part of btrfs-progs after mounting the remaining disk with the degraded,noatime mount options.
For clarity: The disk that is being used in btrfs replace is sda1, sdb1 is the existing disk with the data that is mounted degraded.
Unfortunately, when you begin the replacement, btrfs begins slowly allocating new empty single chunks on the disk that was mounted degraded (sdb1) as soon as the btrfs replace begins, seemingly equal to the amount of raid1 chunks that were already allocated + 1. As the replace continues, this value increases:
Data,single: Size:107.00GiB, Used:5.25MiB (0.00%)
/dev/sdb1 107.00GiB
... several minutes later as btrfs replace continues to run ...
Data,single: Size:177.00GiB, Used:5.25MiB (0.00%)
/dev/sdb1 177.00GiB
I have also posted this on the Btrfs kernel mailing list here for more details and output from commands: https:/
It's speculated this could be an Ubuntu specific issue. What is certain is I've done this process three times with this array on Ubuntu 21.04 and it happens every time, so I can reproduce it 100%. I believe this is a bug with the Ubuntu kernel, but I suppose it could be related to btrfs-progs. What is certain is the btrfs replace triggers the issue.
I'm happy to provide any more additional details as best I can. Thanks,
-Jonah
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckR
DistroRelease: Ubuntu 21.04
InstallationDate: Installed on 2021-04-18 (2 days ago)
InstallationMedia: Kubuntu 21.04 "Hirsute Hippo" - Beta amd64 (20210418)
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
Package: linux (not installed)
ProcEnviron:
LANGUAGE=en_CA:en
TERM=xterm-
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RebootRequiredPkgs:
linux-
linux-base
RelatedPackageV
linux-
linux-
linux-firmware 1.197
RfKill:
Tags: hirsute
Uname: Linux 5.11.0-14-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True
dmi.bios.date: 06/04/2020
dmi.bios.release: 5.14
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P3.40
dmi.board.name: B450 Steel Legend
dmi.board.vendor: ASRock
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To Be Filled By O.E.M.
dmi.product.name: To Be Filled By O.E.M.
dmi.product.sku: To Be Filled By O.E.M.
dmi.product.
dmi.sys.vendor: To Be Filled By O.E.M.
description: | updated |
description: | updated |
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 1925284
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.