Debian Bug report logs - #866734
btrfs-progs: btrfs replace fails with unknown error

version graph

Package: btrfs-progs; Maintainer for btrfs-progs is Adam Borowski <kilobyte@angband.pl>; Source for btrfs-progs is src:btrfs-progs (PTS, buildd, popcon).

Reported by: Russell Coker <russell@coker.com.au>

Date: Sat, 1 Jul 2017 10:42:01 UTC

Severity: normal

Found in version btrfs-progs/4.7.3-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dimitri John Ledkov <xnox@debian.org>:
Bug#866734; Package btrfs-progs. (Sat, 01 Jul 2017 10:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Russell Coker <russell@coker.com.au>:
New Bug report received and forwarded. Copy sent to Dimitri John Ledkov <xnox@debian.org>. (Sat, 01 Jul 2017 10:42:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Russell Coker <russell@coker.com.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: btrfs-progs: btrfs replace fails with unknown error
Date: Sat, 01 Jul 2017 20:40:05 +1000
Package: btrfs-progs
Version: 4.7.3-1
Severity: normal

First I don't know if this is a btrfs-progs error or a kernel error.  But when
in doubt it seems most reasonable to file against btrfs-progs to get the
attention of someone who can help work this out.  Even if the kernel is doing
the wrong thing the utility should be able to be more helpful in it's error
messages.

# btrfs replace start -B 3 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
# btrfs replace start -B /dev/sdb2 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
# btrfs replace start -B /dev/sdc2 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
# btrfs replace start -B 1 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>

The above is the result of some routine device replacement commands.

# btrfs device usage /
/dev/sda2, ID: 2
   Device size:           446.67GiB
   Device slack:              0.00B
   Data,RAID1:            329.40GiB
   Metadata,RAID1:          5.00GiB
   System,RAID1:           32.00MiB
   Unallocated:           112.24GiB

/dev/sdb2, ID: 3
   Device size:           111.32GiB
   Device slack:              0.00B
   Data,RAID1:            111.32GiB
   Unallocated:             1.02MiB

/dev/sdc2, ID: 1
   Device size:           223.10GiB
   Device slack:              0.00B
   Data,RAID1:            218.07GiB
   Metadata,RAID1:          5.00GiB
   System,RAID1:           32.00MiB
   Unallocated:             1.02MiB

From the above you can see that IDs 3 and 1 and devices /dev/sdb2 and /dev/sdc2
are part of the filesystem and suitable for replacement.

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices

btrfs-replace(8) and the above Wiki page both indicate that what I am
attempting is correct.

-- System Information:
Debian Release: 9.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages btrfs-progs depends on:
ii  e2fslibs    1.43.4-2
ii  libblkid1   2.29.2-1
ii  libc6       2.24-11+deb9u1
ii  libcomerr2  1.43.4-2
ii  liblzo2-2   2.08-1.2+b2
ii  libuuid1    2.29.2-1
ii  zlib1g      1:1.2.8.dfsg-5

btrfs-progs recommends no packages.

btrfs-progs suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Dimitri John Ledkov <xnox@debian.org>:
Bug#866734; Package btrfs-progs. (Sun, 10 Dec 2017 23:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Lukas Pirl <bugs.debian@lukas-pirl.de>:
Extra info received and forwarded to list. Copy sent to Dimitri John Ledkov <xnox@debian.org>. (Sun, 10 Dec 2017 23:21:04 GMT) (full text, mbox, link).


Message #10 received at 866734@bugs.debian.org (full text, mbox, reply):

From: Lukas Pirl <bugs.debian@lukas-pirl.de>
To: 866734@bugs.debian.org
Subject: Re: btrfs-progs: btrfs replace fails with unknown error
Date: Mon, 11 Dec 2017 00:06:54 +0100
Hi Russel,

On Sat, 01 Jul 2017 20:40:05 +1000 Russell Coker <russell@coker.com.au>
wrote:
> # btrfs replace start -B 3 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
> # btrfs replace start -B /dev/sdb2 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
> # btrfs replace start -B /dev/sdc2 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>
> # btrfs replace start -B 1 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: <illegal result value>

I just observed similar symptoms.

Check if there is a add/delete/balance/replace/resize running on the
file system.

In my case, there was a paused balance that I wasn't aware of (since
weeks? Months? …?).

Cheers,

Lukas



Information forwarded to debian-bugs-dist@lists.debian.org, Dimitri John Ledkov <xnox@debian.org>:
Bug#866734; Package btrfs-progs. (Sun, 22 Jul 2018 23:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Russell Coker <russell@coker.com.au>:
Extra info received and forwarded to list. Copy sent to Dimitri John Ledkov <xnox@debian.org>. (Sun, 22 Jul 2018 23:39:03 GMT) (full text, mbox, link).


Message #15 received at 866734@bugs.debian.org (full text, mbox, reply):

From: Russell Coker <russell@coker.com.au>
To: 866734@bugs.debian.org
Subject: sorry for the lack of follow-up
Date: Mon, 23 Jul 2018 09:27:19 +1000
When I first saw this last year Lukas correctly identified the problem, sorry 
for not mentioning this.

Now it happened again and it turned out that this bug report was one of only 2 
google hits about it.  I had forgotten about having this problem before.

Could you please patch the btrfs utility to give a hint to the user that a 
paused balance might be the culprit?

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/






Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Jul 23 23:36:49 2020; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.