Page 1 of 1

fsck after every reboot; why dirty ext4 fs ?

Posted: Sat Dec 21, 2013 2:43 am
by shmick
after each reboot / is detected as dirty, remounts ro and fsck's after 30s pausing
how do i get / to umount cleanly ???
what shutdown events aren't umounting it cleanly - open files, ... ?

Dec 20 23:00:00 kernel: [ 37.730434] EXT4-fs (sda6): INFO: recovery required on readonly filesystem
Dec 20 23:00:00 kernel: [ 37.730438] EXT4-fs (sda6): write access will be enabled during recovery
Dec 20 23:00:00 kernel: [ 38.321496] EXT4-fs (sda6): orphan cleanup on readonly fs
Dec 20 23:00:00 kernel: [ 38.393024] EXT4-fs (sda6): 3 orphan inodes deleted
Dec 20 23:00:00 kernel: [ 38.393026] EXT4-fs (sda6): recovery complete
Dec 20 23:00:00 kernel: [ 39.102078] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)

fstab;

# / was on /dev/sda6 during installation
UUID=3....................2 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda3 during installation
UUID=6....................8 /boot ext2 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=2...........................9 none swap sw 0 0

tune2fs -l /dev/sda6
Maximum mount count: -1

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sat Dec 21, 2013 5:03 am
by eanfrid
The cause is probably not a dirty umounting of the root file-system per se but rather a failing drive which tries to read/write on bad/reallocated sectors, triggering fsck. What are the S.M.A.R.T. stats of this drive ?

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sat Dec 21, 2013 9:56 am
by shmick
smartctl is fine
no re-allocated sectors
short offline test ok
ssd drive

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sat Dec 21, 2013 2:11 pm
by kukamuumuka
I think that it is an ext4 problem. Ext3 works better with some hardware .. :wink:
https://ext4.wiki.kernel.org/index.php/Ext4_Howto

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Tue Dec 24, 2013 10:30 pm
by shmick
I think that it is an ext4 problem. Ext3 works better with some hardware .. :wink:
https://ext4.wiki.kernel.org/index.php/Ext4_Howto
hmm, but do you have any advice as to how to troubleshoot and fix the current ext4 situation ?

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Wed Dec 25, 2013 11:37 am
by kukamuumuka
shmick wrote:
I think that it is an ext4 problem. Ext3 works better with some hardware .. :wink:
https://ext4.wiki.kernel.org/index.php/Ext4_Howto
hmm, but do you have any advice as to how to troubleshoot and fix the current ext4 situation ?
You could try

Code: Select all

sudo /sbin/shutdown -h +1
http://docstore.mik.ua/orelly/linux/run/ch05_05.htm
The problem is that if the system were to be suddenly powered down or rebooted, the buffers in memory would not be written to disk, and data could be lost or corrupted. /sbin/update is a program started from /etc/rc.d/rc.sysinit on most systems; it flushes dirty buffers (ones that have been changed since they were read from the disk) back to disk every five seconds to prevent serious damage from occurring should the system crash. However, to be completely safe, the system needs to undergo a "safe" shutdown before rebooting. This will not only ensure that disk buffers are properly synchronized, but also allow all running processes to exit cleanly.

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Thu Dec 26, 2013 9:16 am
by shmick
shutdown -h +1 didn't help ...

if i boot into an earlier kernel there is no fsck but that's not a fix to the problem ...

next step anyone ?

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Thu Dec 26, 2013 9:46 am
by eanfrid
Which kernels are you using ? Maybe a newer release does solve the bug/regression you hit.

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Thu Dec 26, 2013 12:44 pm
by shmick
3.2.0-57-generic

i don't see any newer kernels

this has just happened to me otherwise everybody would be affected

the problem is i dont know how this happened and why; more importantly how to fix it...

as an aside i cannot remove/upgrade/install any software currently

see http://forums.linuxmint.com/viewtopic.php?f=47&t=153648

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Thu Dec 26, 2013 1:00 pm
by eanfrid
The last kernel (easily) installable is the 3.11 series from Ubuntu saucy. If you activated backports (looks like you did, because you installed Cinnamon 2.0) these newer kernels are available to download and install amongst other kernels available for Mint 13 like 3.5 and 3.8.

You say that the drive is a SSD but I don't see any "discard" option in your fstab. So do you use instead the "fstrim" command regularly to manage TRIM operations (recommended, rather than the "discard" option in fstab for ext4 partitions) ?

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Fri Dec 27, 2013 5:16 am
by shmick
thing is i can't install newer kernels - im stuck

everything from apt is stuck trying to re-configure the kernel cruft i wanted to clean up

see the related link to kernel ticket

right, i run a fstrim sporadically, no real pattern, probably few times / fornight

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Fri Dec 27, 2013 5:34 am
by Paulm
The last stable Linux Kernel is 3.12.6 which you can compile and use.
https://www.kernel.org/
or perhaps use the Liquorix compiled kernel (works good with LMDE)
http://liquorix.net/
Follow the instructions and install using Synaptic package Manager

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sun Dec 29, 2013 6:11 am
by shmick
can anybody alternatively suggest solutions or troubleshooting techniques to fix what i *have* and not suggest something else to *get* ?
i don't like like to get the modem working by turning it off and on - it works, but it doesnt solve the current issues and we dont get to know why and how to fix them

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sun Dec 29, 2013 6:16 am
by shmick
lets keep keep it simple
compiling a kernel isnt exactly simple - millions of things can and do go wrong
if my car aint working, i dont buy another one, i check over the basics
essentially, what is the best way to diagnose and go over apt, dpkg and repair accordingly ?
essentially, if my HDD is fine according to smartctl, what else to check next ?
going whole hog and updating the kernal is a drastic last resort - if you disagree, then why ?

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sun Dec 29, 2013 11:21 am
by kukamuumuka
shmick wrote:lets keep keep it simple
compiling a kernel isnt exactly simple - millions of things can and do go wrong
if my car aint working, i dont buy another one, i check over the basics
essentially, what is the best way to diagnose and go over apt, dpkg and repair accordingly ?
essentially, if my HDD is fine according to smartctl, what else to check next ?
going whole hog and updating the kernal is a drastic last resort - if you disagree, then why ?
Compiling is not needed, you can install 3.8 kernel via Synaptic. Search word is linux-image

Re: fsck after every reboot; why dirty ext4 fs ?

Posted: Sun Dec 29, 2013 1:06 pm
by shmick
cannot update any kernel anyway in synaptic - mentioned this many times already

see again link to my other ticket Re cannot update kernel