Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ext4 filesystem remounting itself readonly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Aug 10, 2009 7:24 pm    Post subject: ext4 filesystem remounting itself readonly Reply with quote

With increasing regularity my /home partition is remounting itself readonly. This is the last part of dmesg
Code:
[ 1076.704027] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 1076.704036] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 1076.704037]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1076.704041] ata1.00: status: { DRDY }
[ 1076.704048] ata1: hard resetting link
[ 1077.162013] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1077.167876] ata1.00: configured for UDMA/133
[ 1077.167888] end_request: I/O error, dev sda, sector 175669291
[ 1077.167906] ata1: EH complete
[ 1077.167938] Aborting journal on device sda3:8.
[ 1077.170322] journal commit I/O error
[ 1077.313191] ext4_abort called.
[ 1077.313194] EXT4-fs error (device sda3): ext4_journal_start_sb: Detected aborted journal
[ 1077.313198] Remounting filesystem read-only
I'm running 2.6.30-gentoo-r4 on amd64. I don't know what other info to provide and sorry if this is the wrong section. Any help much appreciated.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Mon Aug 10, 2009 7:30 pm    Post subject: Reply with quote

When this happens, it's usually because the filesystem is encountering a lot of errors, so it remounts itself ro to protect the data...you need to run fsck on that filesystem. Based on the few error messages I see there, it seems to be a problem with the journal on that filesystem.
Back to top
View user's profile Send private message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Aug 10, 2009 7:43 pm    Post subject: Reply with quote

It forces a fsck on that partition everytime it reboots after the problem, it always passes with no errors.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Mon Aug 10, 2009 7:55 pm    Post subject: Re: ext4 filesystem remounting itself readonly Reply with quote

forkboy wrote:
Code:
[ 1077.167888] end_request: I/O error, dev sda, sector 175669291

It looks like it was having trouble writing a new sector for the journal. If a forced fsck on the disk reports no errors, (first I'd back up the disk ASAP as it may be on its last legs) then check the disk with smartmontools.

Was the journal clean or does it have uncommitted blocks in the journal? Probably the latter?
_________________
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
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Aug 10, 2009 8:21 pm    Post subject: Re: ext4 filesystem remounting itself readonly Reply with quote

Quote:
Was the journal clean or does it have uncommitted blocks in the journal? Probably the latter?
I don't know... how do I find out? Its all backed up, just in case the drive is dying.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Mon Aug 10, 2009 10:00 pm    Post subject: Reply with quote

I'm just curious of the state of the disk, how much of it is corrupt. What happens if you explicitly tried mounting the filesystem read-only? It shouldn't muck with the journal...will it still emit this error? I'm not too familiar with ext4 but if fsck is clean then it should have replayed outstanding journal entries (or discarded them, which is also OK). Just hoping you have a consistent backup and not a half baked one -- that's what journaling is supposed to help prevent.

This is somewhat weird as usually when a bad sector is written to, it will also cause the hard drive to reallocate it to a spare, unless it ran out of spares. It wasn't clear what it was trying to do -- perhaps it was trying to read the journal to commit additional writes to the filesystem?

Probably should just go check how bad it is according to SMART and bank on buying a new disk...
_________________
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
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Sat Aug 15, 2009 9:52 am    Post subject: Reply with quote

Deleted and recreated the partition... It still happens. Ran the manufacturers diagnostic tool, it passed without errors and yet it still happens. Don't know what else to do so am reformatting back to ext3 and see if it still happens.
Back to top
View user's profile Send private message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Sat Aug 15, 2009 9:26 pm    Post subject: Reply with quote

Found this on the red hat bugzilla. Guess this is my problem, especially
Quote:
Some people had this problem with Samsung disks with kernels after 2.6.27.5
Guess I'm stuck with ext3 then.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun Aug 16, 2009 9:02 am    Post subject: Reply with quote

forkboy wrote:
Guess I'm stuck with ext3 then.

If it is really the barrier=1 default which causes this, then I would use the "nobarrier" option (together with data=ordered) with ext4 as suggested: Whether you use ext3 or ext4 with nobarrier is equally unsafe. No matter how you decide, switch off your harddisk cache (using hdparm) - then both solutions are equally safe, but ext4 is still preferrable for several other reasons.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sun Aug 30, 2009 9:23 pm    Post subject: Reply with quote

mv wrote:
forkboy wrote:
Guess I'm stuck with ext3 then.

If it is really the barrier=1 default which causes this, then I would use the "nobarrier" option (together with data=ordered) with ext4 as suggested: Whether you use ext3 or ext4 with nobarrier is equally unsafe. No matter how you decide, switch off your harddisk cache (using hdparm) - then both solutions are equally safe, but ext4 is still preferrable for several other reasons.


I saw similar behavior starting to show with reiserfs and barrier=flush (barrier enabled) on a new Samsung drive so I guess disabling barrier will "fix" it

thanks !


what is the cause of this strange behavior ?

a faulty firmware ?

the drive's firmware can't take the pressure ?
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Aug 31, 2009 2:51 pm    Post subject: Reply with quote

Quote:

I saw similar behavior starting to show with reiserfs and barrier=flush (barrier enabled) on a new Samsung drive so I guess disabling barrier will "fix" it

thanks !


what is the cause of this strange behavior ?

a faulty firmware ?

the drive's firmware can't take the pressure ?

God knows, I can only reproduce this on one of my disks, the other has been fine with barriers for a long time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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