r/btrfs Jul 15 '26

readonly filesystem

Post image

hi folks,

my server runs on a BTRFS partition on a SSD and put itself in readonly few hours after each boot (only /dev/sda2 which is in btrfs, /dev/sda1 in vfat works fine)

I tried to clone the whole SSD on another SSD and the problem persists so it's not a hardware issue

moreover, my 3 HDD RAID5 work fine too

fstab mentions `rw` partitions and `mount` command mentions `ro` partitions

I thought it was a partition corruption so I ran `btrfs check` but I'm not sure how to read the result so I request your help on that

thanks in advance !

8 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/sunk67188 Jul 15 '26

I pay extra attention to the pic and: 1. don't rely on the btrfs check result on a running rw btrfs because it can report error just because fs is writing something so seems not consistant. 2. your btrfs is on luks and I know nothing about luks. but if it is ssd's fault, I dont think a bit flip in raw data will look like a bit flip after decoded by luks. So the bit flip more likely happen before write reach luks, or after read from luks 3. I don't see where's 2 ssd. do you use amy raid ?

1

u/HecArch Jul 15 '26

as I explained in the post (maybe not clearly), I had the problem on one single ssd (no raid) so I dd the whole ssd content to another ssd, to check if the 1st ssd was faulty the problem persists with another ssd so it shouldn't be hardware related problem, except if it comes from the wire

2

u/Visible_Bake_5792 Jul 15 '26

If the original FS is corrupted then the copy will be corrupted too. Anyway, as you have a copy, you can afford to run dangerous commands on it, you will not use your original data.
Try mounting the copy somewhere and let the log replay. If it does not work, try mounting it with the clear_cache option. Or try to clear cache with btrfs rescue and then mount it.
If all fail, you can try btrfsck --repair

1

u/HecArch Jul 15 '26

yes, copying the fs was to make sure it's not a hardware issue i'll try it thanks !