You are not logged in.
Pages: 1
Earlier this week I wanted to wipe an sd card for some temporary files, at the time I was on the fly eating a sandwich talking to my wife and ended wiping my /media disk what a nightmare with gparted
Obviously my system would not boot after this point, managed to format the disk and create a new BTRFS partition and modified my /etc/fstab to suit the new drive - new UUID etc
Today I was playing Lies Of P when the system crashed, tried to reboot and now I have a problem:
BTRFS error (device sda2 state E): open_ctree failed: -5
Ok have tried an Arch live iso and can see my disks using fdisk -l
I can mount sda1 using command: mount /dev/sda1 /mnt but trying the same command with sda2 is giving me /mnt: cant read superblock on /dev/sda2
Have tried to do a bit of reading online but am struggling, been using Arch for about 5 years dont know much but can usually wing it with most issues, this one has me stumped
Am I right in thinking I should have updated mkinitcpio -p and this is the problem or is it because my main disk and my media disk have different version of btrfs, again my knowledge is pretty limited
The disk is fine never ever had an issue in years till two days ago when a single key press caused me no end of problems
Is there any way I can recover from this?
Last edited by gap30 (2025-06-27 19:05:36)
Offline
giving me /mnt: cant read superblock on /dev/sda2
This is the SD card?
Are there IO error (in dmesg or the system journal) along this?
What's the output of
sudo file -s /dev/sda2?
https://wiki.archlinux.org/title/File_r … d_PhotoRec
TestDisk can find and restore partittions, but you need to check the HW integrity first.
Unfortunately an SD card would rather not support any https://wiki.archlinux.org/title/SMART data ![]()
Sidebar:
Obviously my system would not boot after this point, managed to format the disk and create a new BTRFS partition and modified my /etc/fstab to suit the new drive - new UUID etc
Why is the drive listed in your fstab? However, "noauto,x-systemd.automount" will skip the filesystem until you try to access the mount path.
Offline
/dev/sda1 is my EFI system
/dev/dsa2 is my Linux Filesystem
As I said I currently have a live Arch iso on the system just so I can access my drives
/dev/sda2 is showing: cant read superblock so my system will not boot
Sidebar:
I have my /media SSD in /etc/fstab so its accessible on boot? again my knowledge is limited thats a side issue atm
Offline
Are there IO error (in dmesg or the system journal) along this?
This is the SD card?
Otherwise also check the https://wiki.archlinux.org/title/SMART data
You *need* to rule out any hardware issues first.
Offline
Have just started the shot test: smartctl -t short /dev/sda2 and it passed
Now starting long test will report back in 10 minutes
Offline
Have just started the shot test: smartctl -t short /dev/sda2 and it passed
What's the output of
smartctl -a /dev/sdaEdit: and check for IO errors in dmesg when trying to mount the drive - next to a broken disk there also can be bus issues (cable…)
Last edited by seth (2025-06-27 20:05:44)
Offline
long test has passed
smartctl -a /dev/sda
SMART Error Log Version: 1
No Errors Logged
Extended offline completed without error
Short offline completed without error
LifeTime (hours) - 12005
dmesg how do I scroll up and down?
Sorry dont know how to post logs ![]()
Last edited by gap30 (2025-06-27 20:22:53)
Offline
smartctl -a /dev/sda | curl -F 'file=@-' 0x0.st
dmesg | curl -F 'file=@-' 0x0.stwill upload both to 0x0.st (internet access provided) and hand you a url.
Last edited by seth (2025-06-27 20:59:13)
Offline
The second command you posted I keep getting a parse error near '|'#
Does this help?
I commented out the first pipe I used dmesg | curl -F 'file-@-' 0x0.st
Last edited by gap30 (2025-06-27 21:08:01)
Offline
Typo, see the edit.
Speaking of which: the url you posted is 404 - https://0x0.st/8lDK.txt ![]()
Edit: drive isn't quite "fresh" but also doesn't look overly concerning, so let's look for bus related IO errors.
Then you'll have to fix the filesystem.
Make sure you're not running into https://wiki.archlinux.org/title/Btrfs# … ree_failed
Last edited by seth (2025-06-27 21:06:07)
Offline
I actually did take a look at that earlier, listen if you think this is a lost cause no worries it is a WD BLUE 500gb SSD that I got donkeys years ago ![]()
I have a 1tb nvme which is the /media disk
Its probably time I upgraded my main disk to an nvme
Moving forward is it worth me sticking with btrfs or shall I just go for ext4 from now on I usually just pick the default options in 'archinstall' and use KDE really simple system purely for gaming
Btw thanks for your time very much appreciated
Last edited by gap30 (2025-06-27 21:14:35)
Offline
@gap30, no I originally typo'd a second pipe into the call.
Edit:wait, no - you mean you're url … your mixing up "l" and "1", that's all.
[ 78.923147] BTRFS: device fsid 4d0b2ce0-2808-449a-933e-9d0e85bf73f1 devid 1 transid 399511 /dev/sda2 (8:2) scanned by mount (1231)
[ 78.923610] BTRFS info (device sda2): first mount of filesystem 4d0b2ce0-2808-449a-933e-9d0e85bf73f1
[ 78.923627] BTRFS info (device sda2): using crc32c (crc32c-x86) checksum algorithm
[ 78.923633] BTRFS info (device sda2): using free-space-tree
[ 78.962038] BTRFS info (device sda2): start tree-log replay
[ 79.014538] BTRFS: error (device sda2) in btrfs_replay_log:2104: errno=-5 IO failure (Failed to recover log tree)
[ 79.025781] ------------[ cut here ]------------
[ 79.025783] WARNING: CPU: 14 PID: 1231 at fs/btrfs/block-rsv.c:452 btrfs_release_global_block_rsv+0xb0/0xd0
[ 79.025788] Modules linked in: vfat fat ccm qrtr algif_aead crypto_null des3_ede_x86_64 cbc des_generic libdes algif_skcipher cmac md4 algif_hash af_alg snd_hda_codec_realtek snd_hda_codec_generic amd_atl snd_hda_scodec_component intel_rapl_msr snd_hda_codec_hdmi ee1004 intel_rapl_common snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec eeepc_wmi snd_hda_core sp5100_tco polyval_clmulni snd_hwdep asus_wmi snd_pcm platform_profile snd_timer snd i8042 soundcore i2c_piix4 sparse_keymap polyval_generic serio ghash_clmulni_intel i2c_smbus cfg80211 ccp k10temp asus_wmi_sensors wmi_bmof sha1_ssse3 joydev mousedev rfkill mac_hid rapl pcspkr gpio_amdpt gpio_generic pkcs8_key_parser dm_mod nfnetlink ip_tables x_tables overlay squashfs loop isofs cdrom hid_glorious hid_generic amdgpu uas amdxcp usb_storage usbhid gpu_sched drm_panel_backlight_quirks drm_buddy video drm_exec drm_suballoc_helper igb sha512_ssse3 drm_ttm_helper nvme sha256_ssse3 ttm mxm_wmi dca aesni_intel nvme_core ptp crypto_simd drm_display_helper
[ 79.025864] pps_core cryptd nvme_auth cec i2c_algo_bit wmi
[ 79.025870] CPU: 14 UID: 0 PID: 1231 Comm: mount Not tainted 6.14.9-arch1-1 #1 b1f151dd96221c005b8930ad08f5fe03d2956910
[ 79.025873] Hardware name: System manufacturer System Product Name/ROG STRIX B450-F GAMING, BIOS 5302 10/20/2023
[ 79.025875] RIP: 0010:btrfs_release_global_block_rsv+0xb0/0xd0
[ 79.025877] Code: 01 00 00 00 74 aa 0f 0b 48 83 bb 40 01 00 00 00 74 a8 0f 0b 48 83 bb 48 01 00 00 00 74 a6 0f 0b 48 83 bb 70 01 00 00 00 74 a4 <0f> 0b 48 83 bb 78 01 00 00 00 74 a2 0f 0b 48 83 bb a8 01 00 00 00
[ 79.025879] RSP: 0018:ffffd36cc5567ad0 EFLAGS: 00010286
[ 79.025881] RAX: 000000000daa8000 RBX: ffff8cae51883000 RCX: 000000000daa8000
[ 79.025883] RDX: 000000000daa8000 RSI: ffff8cae52287400 RDI: ffff8cae52287408
[ 79.025884] RBP: ffff8cae52281800 R08: ffff8cae52281800 R09: 000000000020000e
[ 79.025885] R10: 0000000000000000 R11: ffff8cae52287400 R12: ffff8cae518836c8
[ 79.025886] R13: ffff8cae51883098 R14: 0000000000000000 R15: dead000000000100
[ 79.025888] FS: 00007f0594c84b80(0000) GS:ffff8cb16f100000(0000) knlGS:0000000000000000
[ 79.025889] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 79.025890] CR2: 000056205578c880 CR3: 0000000111bd0000 CR4: 0000000000f50ef0
[ 79.025892] PKRU: 55555554
[ 79.025893] Call Trace:
[ 79.025895] <TASK>
[ 79.025897] btrfs_free_block_groups+0x36f/0x450
[ 79.025901] open_ctree+0x83d/0x13e0
[ 79.025906] btrfs_get_tree.cold+0xb/0x132
[ 79.025909] ? vfs_dup_fs_context+0x2f/0x1e0
[ 79.025915] vfs_get_tree+0x29/0xd0
[ 79.025918] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025921] fc_mount+0x12/0x40
[ 79.025924] btrfs_get_tree+0x294/0x670
[ 79.025927] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025929] ? syscall_exit_to_user_mode_prepare+0x17e/0x1f0
[ 79.025932] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025933] ? syscall_exit_to_user_mode+0x37/0x1c0
[ 79.025938] vfs_get_tree+0x29/0xd0
[ 79.025940] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025941] vfs_cmd_create+0x57/0xd0
[ 79.025944] __do_sys_fsconfig+0x4b3/0x640
[ 79.025948] do_syscall_64+0x7b/0x190
[ 79.025952] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025954] ? syscall_exit_to_user_mode_prepare+0x17e/0x1f0
[ 79.025956] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025957] ? syscall_exit_to_user_mode+0x37/0x1c0
[ 79.025960] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025962] ? syscall_exit_to_user_mode_prepare+0x17e/0x1f0
[ 79.025964] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025965] ? syscall_exit_to_user_mode+0x37/0x1c0
[ 79.025968] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025969] ? do_syscall_64+0x87/0x190
[ 79.025972] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025973] ? syscall_exit_to_user_mode_prepare+0x17e/0x1f0
[ 79.025975] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025977] ? syscall_exit_to_user_mode+0x37/0x1c0
[ 79.025979] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025981] ? do_syscall_64+0x87/0x190
[ 79.025984] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025985] ? syscall_exit_to_user_mode_prepare+0x17e/0x1f0
[ 79.025987] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025989] ? syscall_exit_to_user_mode+0x37/0x1c0
[ 79.025991] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025993] ? do_syscall_64+0x87/0x190
[ 79.025995] ? srso_alias_return_thunk+0x5/0xfbef5
[ 79.025997] ? irqentry_exit_to_user_mode+0x2c/0x1b0
[ 79.025999] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 79.026002] RIP: 0033:0x7f0594dd9efe
[ 79.026011] Code: 73 01 c3 48 8b 0d 12 be 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 49 89 ca b8 af 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e2 bd 0c 00 f7 d8 64 89 01 48
[ 79.026012] RSP: 002b:00007ffce6375708 EFLAGS: 00000246 ORIG_RAX: 00000000000001af
[ 79.026014] RAX: ffffffffffffffda RBX: 000055a4a1c1f550 RCX: 00007f0594dd9efe
[ 79.026016] RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003
[ 79.026017] RBP: 00007ffce6375740 R08: 0000000000000000 R09: 0000000000000000
[ 79.026018] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0594f03980
[ 79.026019] R13: 0000000000000000 R14: 000055a4a1c21000 R15: 00007f0594ef88e0
[ 79.026023] </TASK>
[ 79.026024] ---[ end trace 0000000000000000 ]---sudo file -s /dev/sda2Then you'll have to run btrfs-check
Last edited by seth (2025-06-27 21:10:42)
Offline
Offline
So can you now mount it?
Offline
Trying: mount /dev/sda2 /mnt
Gives me the error
open_ctree failed: -5
/mnt cant read superblock on /dev/sda2
Is it linked to me messing around with the UUID of the /media disk the other day and not updating mkinitcpio
Last edited by gap30 (2025-06-27 21:34:00)
Offline
How exactly did you "mess around"? Did you write anything directly into the device?
It's more likely that over-aggressive trimming or a power loss have left the latest writes in an inconsistent state.
https://man.archlinux.org/man/btrfs-rescue.8.en#zero
btrfs rescue zero-log /dev/sda2Edit: you can also first try
btrfs rescue super-recover /dev/sda2If there's anything besides the OS on that partition, it might be a good idea to dd_rescue a backup first.
Last edited by seth (2025-06-27 21:47:05)
Offline
I can mount it now what is the next step shall I try to reboot or chroot in?
Btw your a fing legend
Offline
Offline
You can try to reboot, if it doesn't work because critical files are corrupted you'll have to boot the iso again and repair the system offline.
sudo LC_ALL=C pacman --root /mnt -Qkk | grep -v ', 0 altered files' | grep -v backupto check the integrity of the packages if the partition is mounted to /mnt
Then have a look at https://wiki.archlinux.org/title/Solid_state_drive#TRIM and cross-check that w/ your configuration
Also https://wiki.archlinux.org/title/Power_ … Management might be an issue, "medium_power" being the safe bet
Offline
So back up and running as we speak will just have to monitor it, no biggie if I have to buy an nvme and do a fresh install
Will check the links you posted and keep you updated, can we leave this thread open for now
I am probably gonna buy a new nvme and do a fresh install
Again your a legend thank you very much
Last edited by gap30 (2025-06-27 22:03:20)
Offline
Pages: 1