Bug 216522 - divide error: 0000 btrfs_qgroup_reserve_data
Summary: divide error: 0000 btrfs_qgroup_reserve_data
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: BTRFS virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-24 03:59 UTC by MarkW
Modified: 2024-04-10 18:55 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.19.7-arch1-1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel message (6.85 KB, text/plain)
2022-09-24 03:59 UTC, MarkW
Details

Description MarkW 2022-09-24 03:59:45 UTC
Created attachment 301858 [details]
Kernel message

This is a human-induced core dump, but should be checked by the kernel/driver to prevent data loss. Two BTRFS filesystems on different drives (sde1 and sdf1 in the example below) with the same UUID were mounted on the same machine. What is needed for achieving a robust production filesystem is to warn users about this and refuse to mount multiple filesystems with the same UUID.

Example steps:
sudo mkdir /mnt/backup-drive /mnt/backup-drive2
sudo mount /dev/sde1 /mnt/backup-drive
sudo mount /dev/sdf1 /mnt/backup-drive2
sudo cp /var/backup/full/data/202209* /mnt/backup-drive/

The kernel panics at this point.

df -h yields:
Filesystem Size Used Avail Use% Mounted on
...
/dev/sde1 3.7T 2.4T 1.3T 66% /mnt/backup-drive
/dev/sdf1 3.7T 2.8T 909G 76% /mnt/backup-drive2
Comment 1 David Sterba 2024-04-10 18:55:14 UTC
Mounting same UUID on different devices is supported as the temp-fsid feature added in 6.8. On a single device this would assign a temporary UUID and will recognize that there are different devices.

Note You need to log in before you can comment on or make changes to this bug.