Package: btrfs-progs Version: 7.0-1+b1 Severity: normal Hi,
I have an interesting which was triggered by fsarchiver, a tool to backup and restore file systems. When fsarchiver restores a file system, it tries to use the same UUID as before (the UUID is recorded in the archive). With btrfs, this fails though. You can reproduce the issue easily: # truncate -s 2G /tmp/image.img # DEVICE=$(losetup -fP /tmp/image.img --show) # mkfs.btrfs -f -q -L Test -U 'f42896b1-3815-4e1e-a01a-9261c5bab6f8' $DEVICE < now run it a second time> # mkfs.btrfs -f -q -L Test -U 'f42896b1-3815-4e1e-a01a-9261c5bab6f8' $DEVICE ERROR: cannot open device '/dev/nvme0n1p12': Device or resource busy ERROR: open ctree failed < interestingly, running it once again then works again > # mkfs.btrfs -f -q -L Test -U 'f42896b1-3815-4e1e-a01a-9261c5bab6f8' $DEVICE ERROR: superblock magic doesn't match Regards, Michael -- System Information: Debian Release: forky/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 7.1.4+deb14-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set 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.42.2-2 ii libc6 2.42-17 ii libcom-err2 1.47.4-1 ii libext2fs2t64 1.47.4-1 ii liblzo2-2 2.10-3+b2 ii libudev1 261.1-3 ii libuuid1 2.42.2-2 ii libzstd1 1.5.7+dfsg-3+b2 ii zlib1g 1:1.3.dfsg+really1.3.2-3 btrfs-progs recommends no packages. Versions of packages btrfs-progs suggests: pn duperemove <none> -- no debconf information

