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

2017-12-10 Thread Lukas Pirl
Hi Russel,

On Sat, 01 Jul 2017 20:40:05 +1000 Russell Coker 
wrote:
> # btrfs replace start -B 3 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 
> # btrfs replace start -B /dev/sdb2 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 
> # btrfs replace start -B /dev/sdc2 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 
> # btrfs replace start -B 1 /dev/sdd2 /
> ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 

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



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

2017-07-01 Thread Russell Coker
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: 
# btrfs replace start -B /dev/sdb2 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 
# btrfs replace start -B /dev/sdc2 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 
# btrfs replace start -B 1 /dev/sdd2 /
ERROR: ioctl(DEV_REPLACE_START) on '/' returns error: 

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  e2fslibs1.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  libuuid12.29.2-1
ii  zlib1g  1:1.2.8.dfsg-5

btrfs-progs recommends no packages.

btrfs-progs suggests no packages.

-- no debconf information