Creating a bug report/issue
Required Information
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=19
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
- Distro version |
trixie
- Kernel version |
Linux Prometheus 6.12.57+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/Linux
- SBC model |
Native PC (x86_64)
- Power supply used | N/A
- SD card used | N/A
Additional Information (if applicable)
- Software title | dietpi-drive_manager
Steps to reproduce
Note: Probably not accurate
- Have NTFS formatted drive
- Enter format, whole drive, new GPT, XFS
- Drive manager swaps to another drive and fails with 'device is busy'
- Force-unmount the target drive letter (/dev/sdb) in a subshell
- Drive manager does something (lost to shell scrollback)
- After reboot, partition table gone on non-target drive /dev/sdc - complete file structure loss, manual recovery with new partition table and xfs_repair, files named after inode numbers.
Expected behaviour
Drive manager should format the correct drive
Actual behaviour
Drive manager swaps drive letter mid-format
Extra details
Unfortunately all the evidence of the original data loss incident is lost to a reboot and a corrupted XFS filesystem. However after multiple hours of troubleshooting and attempt at data recovery I have caught drive_manager in the act of swapping the letter of the drive mid-format.
Data on /dev/sdc is permanently lost, as while the data is there in lost+found, the filesystem structure is gone.
The log from a later reformat to btrfs (after data loss and me giving up on the data on sdc) - I thought it was an issue with XFS:
root@Prometheus:~# dietpi-drive_manager
[ INFO ] DietPi-Drive_Manager | Detecting drives, please wait...
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sda2 > /
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sda1 > /boot/efi
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/nvme0n1p1 > /mnt/adata-nvme
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sdb1 > /mnt/exos
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sdc1 > /mnt/backups
[ OK ] DietPi-Drive_Manager | mv .fstab /etc/fstab
[ OK ] DietPi-Drive_Manager | systemctl daemon-reload
[ INFO ] DietPi-Drive_Manager | Checking for required APT packages: e2fsprogs
[ OK ] DietPi-Drive_Manager | sync
[ INFO ] DietPi-Drive_Manager | Checking for required APT packages: btrfs-progs
[ INFO ] DietPi-Drive_Manager | Skipping APT update, as last call was less than an hour ago and neither sources lists nor architectures changed since.
[ INFO ] DietPi-Drive_Manager | APT install btrfs-progs, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
libcurl3-nss nss-plugin-pem
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libreiserfscore0t64
Suggested packages:
duperemove
The following NEW packages will be installed:
btrfs-progs libreiserfscore0t64
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 989 kB of archives.
After this operation, 5493 kB of additional disk space will be used.
Get:1 http://ftp.debian.org/debian stable/main amd64 libreiserfscore0t64 amd64 1:3.6.27-9 [80.7 kB]
Get:2 http://ftp.debian.org/debian stable/main amd64 btrfs-progs amd64 6.14-1 [908 kB]
Fetched 989 kB in 0s (5319 kB/s)
Selecting previously unselected package libreiserfscore0t64.
(Reading database ... 91437 files and directories currently installed.)
Preparing to unpack .../libreiserfscore0t64_1%3a3.6.27-9_amd64.deb ...
Unpacking libreiserfscore0t64 (1:3.6.27-9) ...
Selecting previously unselected package btrfs-progs.
Preparing to unpack .../btrfs-progs_6.14-1_amd64.deb ...
Unpacking btrfs-progs (6.14-1) ...
Setting up libreiserfscore0t64 (1:3.6.27-9) ...
Setting up btrfs-progs (6.14-1) ...
Processing triggers for man-db (2.13.1-1) ...
Processing triggers for initramfs-tools (0.148.3) ...
update-initramfs: Generating /boot/initrd.img-6.12.57+deb13-amd64
Processing triggers for libc-bin (2.41-12) ...
[ OK ] DietPi-Drive_Manager | APT install btrfs-progs
[. ]umount: /mnt/exos: target is busy.t/exos
[FAILED] DietPi-Drive_Manager | umount /mnt/exos
[ OK ] DietPi-Drive_Manager | umount /mnt/exos
[ OK ] DietPi-Drive_Manager | systemctl stop mnt-exos.automount
[ OK ] DietPi-Drive_Manager | rmdir /mnt/exos
[ INFO ] DietPi-Drive_Manager | Detecting drives, please wait...
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sda2 > /
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sda1 > /boot/efi
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/nvme0n1p1 > /mnt/adata-nvme
[ INFO ] DietPi-Drive_Manager | - Detected mounted physical drive: /dev/sdc1 > /mnt/backups
[ INFO ] DietPi-Drive_Manager | - Detected unmounted drive: /dev/sdb1
[ OK ] DietPi-Drive_Manager | mv .fstab /etc/fstab
[ OK ] DietPi-Drive_Manager | systemctl daemon-reload
[ OK ] DietPi-Drive_Manager | sync
[ INFO ] DietPi-Drive_Manager | Erasing partition: /dev/sdc1
[ OK ] DietPi-Drive_Manager | dd if=/dev/zero of=/dev/sdc1 bs=4K count=1337
[. ]ERROR: /dev/sdc1 is mounteds.btrfs -f /dev/sdc1
btrfs-progs v6.14
See https://btrfs.readthedocs.io for more information.
[FAILED] DietPi-Drive_Manager | mkfs.btrfs -f /dev/sdc1
[FAILED] DietPi-Drive_Manager | Unable to continue, DietPi-Drive_Manager will now terminate.
Creating a bug report/issue
Required Information
trixieLinux Prometheus 6.12.57+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/LinuxNative PC (x86_64)Additional Information (if applicable)
Steps to reproduce
Note: Probably not accurate
Expected behaviour
Drive manager should format the correct drive
Actual behaviour
Drive manager swaps drive letter mid-format
Extra details
Unfortunately all the evidence of the original data loss incident is lost to a reboot and a corrupted XFS filesystem. However after multiple hours of troubleshooting and attempt at data recovery I have caught drive_manager in the act of swapping the letter of the drive mid-format.
Data on /dev/sdc is permanently lost, as while the data is there in lost+found, the filesystem structure is gone.
The log from a later reformat to btrfs (after data loss and me giving up on the data on sdc) - I thought it was an issue with XFS: