Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] touch: cannot touch 'test': Read-only file system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
avdb
n00b
n00b


Joined: 16 Aug 2020
Posts: 65
Location: Netherlands

PostPosted: Sat Dec 05, 2020 6:13 pm    Post subject: [SOLVED] touch: cannot touch 'test': Read-only file system Reply with quote

My installation has been stable for a few months now, but this week things started going wrong. I turn on my PC, start doing my work, something weird happens and all of a sudden my root partition becomes read-only.
Any clue how I can fix this or what the cause might be?


Last edited by avdb on Tue Dec 08, 2020 9:04 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Sat Dec 05, 2020 10:20 pm    Post subject: Reply with quote

This is typical when a hard drive fails a critical transaction, the computer then panics as it can no longer guarantee ordering correctness when writing to disk, and thus shuts off writes (read only) to preserve disk integrity or whatever's left of it.

Check 'dmesg' to ensure you don't see disk failures and chances are you may need to look into replacing the disk. It's also possible it's just a transient failure and a simple fsck will repair the inconsistency, but with most modern journaling filesystems, this shouldn't happen.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
avdb
n00b
n00b


Joined: 16 Aug 2020
Posts: 65
Location: Netherlands

PostPosted: Sun Dec 06, 2020 7:30 pm    Post subject: Reply with quote

Here's the dmesg output, nothing suspicious: https://dpaste.com/HNPT3Z58A
except for:
Code:
Unable to load firmware rtl_nic/rtl8168g-2.fw
could not read from '/sys/module/pcc_cpufreq/initstate


Note that I use Btrfs, at first changing the superblock fixed the problem, but it persisted, so I tried running `btrfs rescue zero-log /dev/mapper/extra`, but now it's running into the error over and over again randomly. I have to restart my PC every 15 minutes or so because it changes to read-only out of the blue which is really frustrating. Sorry that I didn't make most of this obvious in my first post.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Sun Dec 06, 2020 7:57 pm    Post subject: Reply with quote

Well, the trick is you need to look at the dmesg after the time you see the failure, your dpaste is 2 minutes worth, and your failure is after 15 minutes. Unfortunately this means you save it to disk so you'll need to maybe mount another USB memory stick or external hard drive, ssh and copy it to another machine perhaps, or temporarily use ramdisk to load up a web browser to post.

I still think btrfs isn't ready for primetime and fear that there may still be bugs that you're running into, you might need to do a deep down check on btrfs to ensure you have any inconsistencies in it (check it despite any journalling).
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
avdb
n00b
n00b


Joined: 16 Aug 2020
Posts: 65
Location: Netherlands

PostPosted: Mon Dec 07, 2020 9:52 am    Post subject: Reply with quote

I think some external software not installed with Portage is the cause. I tried to play around on my system to see for how long I can use it without the bug and I think I have figured out the cause. It's been begging me to update it around the same time the bug started so I hope that'll fix it.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Mon Dec 07, 2020 4:12 pm    Post subject: Reply with quote

The computer should never go read only due to a user mode program. Heck you cannot remount a partition readonly if there are any programs trying to write to the disk - it only does it if the kernel feels unsafe...

Whether some program is doing something to trigger the bug is another story - but this means there's a bug.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum