Your message dated Sat, 31 May 2025 13:00:05 -0400
with message-id <[email protected]>
and subject line Re: Bug#1024269: btrfs-progs: Different sizes reported for
"btrfs replace /dev/sda2" abd "btrfs replace 2"
has caused the Debian Bug report #1024269,
regarding btrfs-progs: Different sizes reported for "btrfs replace /dev/sda2"
abd "btrfs replace 2"
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1024269: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024269
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: btrfs-progs
Version: 5.10.1-2
Severity: normal
When trying to replace device in BTRFS
different numbers of required free space are reported.
When using device name:
# btrfs replace start /dev/sda3 /dev/sdb3 /
ERROR: target device smaller than source device (required 5982920449536
bytes)
When using device number:
# btrfs replace start 2 /dev/sdb3 /
ERROR: target device smaller than source device (required 5968961802240
bytes)
Other people also had this problem:
https://unix.stackexchange.com/a/513352
-- System Information:
Debian Release: 11.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-19-amd64 (SMP w/8 CPU threads)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages btrfs-progs depends on:
ii libblkid1 2.36.1-8+deb11u1
ii libc6 2.31-13+deb11u5
ii libcom-err2 1.46.2-2
ii libext2fs2 1.46.2-2
ii libgcc-s1 10.2.1-6
ii liblzo2-2 2.10-2
ii libmount1 2.36.1-8+deb11u1
ii libuuid1 2.36.1-8+deb11u1
ii libzstd1 1.4.8+dfsg-2.1
ii zlib1g 1:1.2.11.dfsg-2+deb11u2
btrfs-progs recommends no packages.
Versions of packages btrfs-progs suggests:
pn duperemove <none>
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 6.14-1
Control: tag -1 upstream fixed-upstream
Hello Leszek,
Leszek Dubiel <[email protected]> writes:
> When trying to replace device in BTRFS
> different numbers of required free space are reported.
>
>
> When using device name:
>
> # btrfs replace start /dev/sda3 /dev/sdb3 /
> ERROR: target device smaller than source device (required 5982920449536
> bytes)
>
>
> When using device number:
>
> # btrfs replace start 2 /dev/sdb3 /
> ERROR: target device smaller than source device (required 5968961802240
> bytes)
I'm sorry no one replied to this bug until now. The good news is that
I've confirmed the bug is no longer present in trixie.
$ qemu-img create btrfs-a 1G
Formatting 'btrfs-a', fmt=raw size=1073741824
$ qemu-img create btrfs-b 1G
Formatting 'btrfs-b', fmt=raw size=1073741824
$ sudo losetup /dev/loop0 btrfs-a
$ sudo losetup /dev/loop0 btrfs-b
$ qemu-img create btrfs-c 0.97G
Formatting 'btrfs-c', fmt=raw size=1041529569
$ sudo losetup /dev/loop1 btrfs-b
$ sudo losetup /dev/loop2 btrfs-c
$ mkfs.btrfs -d raid1 -m raid1 /dev/loop0 /dev/loop1
btrfs-progs v6.14
See https://btrfs.readthedocs.io for more information.
Performing full device TRIM /dev/loop0 (1.00GiB) ...
Performing full device TRIM /dev/loop1 (1.00GiB) ...
NOTE: several default settings have changed in version 5.15, please make sure
this does not affect your deployments:
- DUP for metadata (-m dup)
- enabled no-holes (-O no-holes)
- enabled free-space-tree (-R free-space-tree)
Label: (null)
UUID: 3a0ef91a-bc04-4457-a522-71ed8bc80e39
Node size: 16384
Sector size: 4096 (CPU page size: 4096)
Filesystem size: 2.00GiB
Block group profiles:
Data: RAID1 102.38MiB
Metadata: RAID1 102.38MiB
System: RAID1 8.00MiB
SSD detected: yes
Zoned device: no
Features: extref, skinny-metadata, no-holes, free-space-tree
Checksum: crc32c
Number of devices: 2
Devices:
ID SIZE PATH
1 1.00GiB /dev/loop0
2 1.00GiB /dev/loop1
$ sudo mount /dev/loop0 /mnt
# Then I filled it with ~0.4GiB of data
$ sudo btrfs replace start 2 /dev/loop2 /mnt
ERROR: target device smaller than source device (required 1073741824 bytes)
$ sudo btrfs replace start /dev/loop1 /dev/loop2 /mnt
ERROR: target device smaller than source device (required 1073741824 bytes)
signature.asc
Description: PGP signature
--- End Message ---