Specs:
- F37 / G43
- BTRFS filesystem
- Installed on a M.2 NVMe drive, plugged in via USB 3.0 cable
Problem
After an improper shutdown and ejection of my Linux drive, my Linux drive only boots to emergency mode. I have the following errors in dmesg, journalctl, and systemctl.
systemctl:
`sysroot.mount loaded failed failed /sysroot`
dmesg and journalctl:
BTRFS: error (device sda3: state EA): open_ctree failed
BTRFS: error (device sda3: state A) in __btrfs_run_delayed_items:1153: errono=-17 Object already exists
BTRFS: error (device sda3: state EA) in cleanup_transaction:1958: errno=-17 Object already exists
BTRFS: error (device sda3: state EA) in btrfs_replay_log:2395: errno=-17 Object already exists (Failed to recover log tree)
Failed to mount sysroot.mount - /sysroot.
When I use an external live boot and try to mount the external Linux drive with:
mount /dev/sda3 /mnt
I get the following error:
mount(2) system call failed: File Exists
Cause
I use Linux in a M.2 external drive, and I accidentally unplugged my external M.2 drive while Linux was running sudo dnf upgrade -y && flatpak upgrade -y
. After the accidentally unplugging, I decided to hold down the power button as the system was hanging for several minutes; I thought it was stuck and needed a hard reset.
Upon booting the system back up, and booting to the latest kernel 6.1.9, I was met with emergency mode. I ran journalctl, dmesg, and systemctl, and received the aforementioned findings. This was the result of an improper shutdown during dnf upgrade.
I have BTRFS snapshots, but I’m unable to mount the root and home directories: /dev/sda3
due to:
mount(2) system call failed: File Exists