Package: btrfs-progs
Version: 4.20.1-2
Severity: normal
Dear Maintainer,
1. created some subvolumes, transfered them successfully to another BTRFS file
system with send/receive
2. created new subvolume, cp -a --reflink=always files, send to the same system
and got error
Another system has set "default subvolume" to mount.
### HERE IS TESTING SCRIPT:
#!/bin/bash
mkdir bugtest
cd bugtest
for i in 1 2; do
mkdir -p mnt/$i
truncate -s 4G mnt/$i.img
mkfs.btrfs mnt/$i.img
mount -o loop mnt/$i.img mnt/$i
done
# make default subvol on 2, remount
btrfs sub create mnt/2/subDEF
btrfs sub set-default "$(btrfs sub list mnt/2 | egrep subDEF | cut -f 2 -d '
')" mnt/2
umount mnt/2
mount -o loop mnt/2.img mnt/2
# create subvA in 1, send it to mnt/2
btrfs sub create mnt/1/subvA
dd if=/dev/urandom of=mnt/1/subvA/fileX bs=15M count=1
btrfs sub snap mnt/1/subvA -r mnt/1/subvA_ro
btrfs send mnt/1/subvA_ro | btrfs receive mnt/2/
# copy subvA to subvB, modify, send to mnt/2 (subvA as parent)
btrfs sub snap mnt/1/subvA mnt/1/subvB
mv mnt/1/subvB/fileX mnt/1/subvB/fileY
date >> mnt/1/subvB/fileY
btrfs sub snap mnt/1/subvB -r mnt/1/subvB_ro
btrfs send -p mnt/1/subvA_ro mnt/1/subvB_ro | btrfs receive mnt/2/
# relink files from subvA and subvB to new subvolume C, snap C as read only
btrfs sub create mnt/1/subvC
cp -a --reflink=always mnt/1/subvA_ro mnt/1/subvB_ro mnt/1/subvC
btrfs sub snap mnt/1/subvC -r mnt/1/subvC_ro
# now send subvC to mnt/2... but ERRORS:
# ERROR: cannot open subDEF/subvA_ro/fileX: No such file or directory
btrfs send -c mnt/1/subvA_ro -c mnt/1/subvB_ro mnt/1/subvC_ro | btrfs receive
mnt/2/
# ERROR: cannot open subDEF/subvA_ro/fileX: No such file or directory
# btrfs send -p mnt/1/subvA_ro mnt/1/subvC_ro | btrfs receive mnt/2/
cd ..
umount bugtest/mnt/{1,2}
rm -rf bugtest/
# END OF TESTING SCRIPT
# OUTPUT OF TESTING BEGIN
btrfs-progs v4.20.1
Seehttp://btrfs.wiki.kernel.org for more information.
Label: (null)
UUID: 814d12e2-d639-4b96-93b2-a9cdb3af080a
Node size: 16384
Sector size: 4096
Filesystem size: 4.00GiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 204.75MiB
System: DUP 8.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 1
Devices:
ID SIZE PATH
1 4.00GiB mnt/1.img
btrfs-progs v4.20.1
Seehttp://btrfs.wiki.kernel.org for more information.
Label: (null)
UUID: 26d2fc51-8d81-4e04-9a17-a32339e5ac88
Node size: 16384
Sector size: 4096
Filesystem size: 4.00GiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 204.75MiB
System: DUP 8.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 1
Devices:
ID SIZE PATH
1 4.00GiB mnt/2.img
Create subvolume 'mnt/2/subDEF'
Create subvolume 'mnt/1/subvA'
1+0 przeczytanych rekordów
1+0 zapisanych rekordów
skopiowane 15728640 bajtów (16 MB, 15 MiB), 0,101825 s, 154 MB/s
Create a readonly snapshot of 'mnt/1/subvA' in 'mnt/1/subvA_ro'
At subvol mnt/1/subvA_ro
At subvol subvA_ro
Create a snapshot of 'mnt/1/subvA' in 'mnt/1/subvB'
Create a readonly snapshot of 'mnt/1/subvB' in 'mnt/1/subvB_ro'
At subvol mnt/1/subvB_ro
At snapshot subvB_ro
Create subvolume 'mnt/1/subvC'
Create a readonly snapshot of 'mnt/1/subvC' in 'mnt/1/subvC_ro'
At subvol mnt/1/subvC_ro
ERROR: parent determination failed for 263
ERROR: empty stream is not considered valid
# END OF OUTPUT
Someone has had the same problem:
https://www.spinics.net/lists/linux-btrfs/msg69286.html
https://www.spinics.net/lists/linux-btrfs/msg47650.html
-- System Information:
Debian Release: 10.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8),
LANGUAGE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages btrfs-progs depends on:
ii libblkid1 2.33.1-0.1
ii libc6 2.28-10
ii liblzo2-2 2.10-0.1
ii libuuid1 2.33.1-0.1
ii libzstd1 1.3.8+dfsg-3
ii zlib1g 1:1.2.11.dfsg-1
btrfs-progs recommends no packages.
Versions of packages btrfs-progs suggests:
pn duperemove <none>
-- no debconf information