You are not logged in.

#1 2020-03-20 21:20:53

Nox997
Member
Registered: 2013-03-31
Posts: 9

btrfs mounts become read-only during operation

Hello all,

quite recently, I have installed Arch on a J5005-ITX system as a file server operating system.
I chose a 120GB SATA SSD as the main hard drive for the OS, and installed arch on a LUKS-encrypted btrfs subvolue.
This went all well and fine.

Then I started a first backup to this server (and to other hard disks that are connected and that I use for the backups).
This backup was running since ~6days - and today I noticed after logging into the system via ssh that it behavious in a weird way:

- zsh was informing me that it cannot write to its history file
- zsh was giving me "input output errors" for some commands like dmesg
- mount showed that all my btrfs subvolumes that are mounted (home / root / snapshots) became READ ONLY (where /etc/fstab clearly lists them as "rw")

After a (hard) reboot (because arch claimed it could not unmount the fileystems), everything is back to normal.
I do not know where I can start to look for the root cause of this.

Some side info
- linux-hardened is used
- zfs on linux is there for the backup drives
- barely 4GB of space are used of the 120GB "OS drive"
- btrfs check reports no errors

Any ideas what might have gone wrong that I ended up with read-only btrfs fileystems?

Thank you very much in advance.

Offline

#2 2020-03-22 18:40:03

Nox997
Member
Registered: 2013-03-31
Posts: 9

Re: btrfs mounts become read-only during operation

bump...
Can anyone maybe point me into the direction to understand WHEN the kernel would decide to make a mounted BTRFS filesystem read only?

Thank you very much in advance!

Offline

#3 2020-03-22 18:55:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 9,074

Re: btrfs mounts become read-only during operation

Don't do this: https://wiki.archlinux.org/index.php/Co … ct#Bumping

Check your dmesg/journal logs from when it happened and run a long SMART test and post the output of

smartctl -a $device

after the mentioned testing time has elapsed.

If you can't actively reproduce this and it became read only while writing the journal and you didn't write out the in memory dmesg or journals at that point in time, there's unlikely to be much to be done here, until you run into it again.

Offline

#4 Today 04:40:26

cmurf
Member
Registered: 2019-09-06
Posts: 20

Re: btrfs mounts become read-only during operation

>Any ideas what might have gone wrong that I ended up with read-only btrfs fileystems?

There's not enough information. Needs a complete dmesg which will include events leading up to read-only. Btrfs goes read-only when it becomes confused due to file system corruption, to avoid further corrupting the file system. Has this Btrfs ever been written to with any kernel version 5.2.0 through 5.2.14? There's a known corruption bug there, and the newer tree checker catches this problem in later kernels, so it could be a case of old Btrfs bug causing it. Or it could be a case of hardware induced corruption. But dmesg is needed. Chances are you'll get a faster response about such problems from linux-btrfs@ list.

Last edited by cmurf (Today 04:40:58)

Offline

#5 Today 05:44:47

tomz12
Member
Registered: 2019-08-02
Posts: 18

Re: btrfs mounts become read-only during operation

I ran a similar setup on my laptop, luks + btrfs + ssd, and had my drive go into ro randomly with nothing unusual in the logs. After months of troubleshooting, multiple OS reinstallations, different OS and multiple crashes a day the conclusion was a drive / driver incompatibility. Dell sent me a new ssd (Toshiba instead of Samsung), and my system is rock solid ever since.
If you have a spare ssd at hand, maybe this is something to test.

Offline

Board footer

Powered by FluxBB