Hi, I am trying out btrfs and when I try to run an update and I get errors the file system turns in to read-only.
This has never been the case with ext4. Any having this same issue, any solutions to make the filesystem writeable again without booting?
Thanks
Manjaro on intel, gnome, linux515, btrfs
btrfs goes readonly if there are severe errors !!!
like wrong crc …
Do not continue without searching for the real reason
andreas
Zesko
23 May 2022 19:38
3
Check what are outputs of these:
journactl -p3 --since "today" | grep BTRFS
sudo btrfs scrub status /
sudo btrfs device stats /
Does read-only
not imply readable
?
2 Likes
After timeshift restore.
journactl -p3 --since "today" | grep BTRFS
kernel: BTRFS critical (device nvme0n1p2): leaf free space ret -4194162, leaf data size 16283, used 4210445 nritems 214
sudo btrfs scrub status /
UUID: fe032e32-92c5-4beb-8b1c-9fda892e88f1
no stats available
Total to scrub: 14.11GiB
Rate: 0.00B/s
Error summary: no errors found
sudo btrfs device stats /
[/dev/nvme0n1p2].write_io_errs 0
[/dev/nvme0n1p2].read_io_errs 0
[/dev/nvme0n1p2].flush_io_errs 0
[/dev/nvme0n1p2].corruption_errs 0
[/dev/nvme0n1p2].generation_errs 0
thanks!
Zesko
23 May 2022 20:24
7
It looks like you did not scrub.
Run scrub: sudo btrfs scrub start -B -R /
Wait for about 5 min until the end of scrub.
Then see result if error appears.
sudo btrfs scrub start -B -R /
scrub done for fe032e32-92c5-4beb-8b1c-9fda892e88f1
Scrub started: Mon May 23 22:29:08 2022
Status: finished
Duration: 0:00:09
data_extents_scrubbed: 409402
tree_extents_scrubbed: 87972
data_bytes_scrubbed: 13711331328
tree_bytes_scrubbed: 1441333248
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 4859
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectable_errors: 0
unverified_errors: 0
corrected_errors: 0
last_physical: 16144924672
Looks like no errors…
Zesko
23 May 2022 20:39
9
remark:
Duration: 0:00:09
It took 9 seconds?
What is the size of this partition?
lsblk -f
Yes a minimal fresh install
nvme0n1p2 btrfs fe032e32-92c5-4beb-8b1c-9fda892e88f1 70,2G 17% /var/log
│ /var/cache
│ /
Zesko
23 May 2022 20:53
11
Okay, no idea, why has BTRFS forced to change subvolumes to read-only subvolumes.
But that might be related to the error from Journalctl log.
remark:
journactl -p3 --since "today" | grep BTRFS
kernel: BTRFS critical (device nvme0n1p2): leaf free space ret -4194162, leaf data size 16283, used 4210445 nritems 214
That the leaf free space ret -4194162
a negative amount?
Managed to do an update after multiple times restoring to post installation state. Used Wezterm as terminal. That seem to be less on cpu resources but more on gpu… but yeah I don’t know if that was it. Definitely not a solution though…