Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
diblOffline
15 Post subject: SOLVED /etc/fstab -- ext4 mount option "commit"  PostPosted: 02.04.2011, 21:51



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
I just noticed this -- I don't know how long this condition has been present. I use a "commit=300" mount option on my ext4 partitions, because (a) my desktop system runs on a UPS, and (b) two partitions are on a large SSD. Here's the mount line for the root filesystem in /etc/fstab:

      Code:
UUID=c70374e7-97b3-4972-a704-285e9343f776   /     ext4     defaults,noatime,errors=remount-ro,barrier=0,discard,commit=300  0    1


But, when I run the mount command to see the mounted partitions, it has apparently added to a "commit=0" which, according to the manual, reverts to the default 5-second commit cycle. Running "mount", here is what I see for the root filesystem:

      Code:
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro,barrier=0,discard,commit=300,commit=0)


What is going with ext4?

      Code:
don@aptosidbox:~$ infobash -v3
Host/Kernel/OS  "aptosidbox" running Linux 2.6.38-2.slh.2-aptosid-amd64 x86_64 [ aptosid 2010-03 Ἀπάτη - kde-lite - (201012262151) ]
CPU Info        8x Intel Core i7 950 @ 8192 KB cache flags( sse3 ht nx lm vmx ) clocked at [ 1600.000 MHz ]
Videocard       nVidia GF100 [GeForce GTX 480]  X.Org 1.9.5  [ 1920x1200@50.0hz ]
Network cards   Marvell 88E8056 PCI-E Gigabit
Processes 229 | Uptime 4days | Memory 3092.1/5978.8MB | HDD OCZ-REVODRIVE,OCZ-REVODRIVE,WDC WD1002FAEX-0,WDC WD1002FAEX-0,KINGSTON SS100S2 Size 2136GB (2%used) | GLX Renderer GeForce GTX 480/PCI/SSE2 | GLX Version 4.1.0 NVIDIA 270.30 | Client Shell | Infobash v3.35


Last edited by dibl on 07.04.2011, 14:10; edited 2 times in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhAdministrator
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 22:01



Joined: 2010-08-25
Posts: 724

Status: Online!
Please try a shorter commit intervall first, something like 10s for a start and observe what happens if you play with the values.

That said, personally I'd suggest to stay with 5 seconds or at least something in that ball park, 5 minutes is a whole long time to mess up your filesystem - not only on power outtages, but also if your kernel goes south - and modern SSDs aren't that fragile in regards to write cycles anymore.


Last edited by slh on 02.04.2011, 22:09; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
diblOffline
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 22:06



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
Good suggestion -- I'll try it and report back.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 22:14



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
Stranger yet. I edited /etc/fstab to change the commit on the root filesystem to 10, and issued
      Code:
mount -a


The mount command shows that the commit=300,commit=0 has not changed. Now I will reboot the system.


Last edited by dibl on 03.04.2011, 13:19; edited 1 time in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 22:24



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
So, after a reboot, it picked up the new commit interval. But ...

      Code:
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro,barrier=0,discard,commit=10,commit=0)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
LatOffline
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 23:12



Joined: 2010-09-19
Posts: 162

Status: Offline
show us
      Code:
grep sda1 /etc/fstab
 
 View user's profile Send private message  
Reply with quote Back to top
diblOffline
Post subject: RE: /etc/fstab -- ext4 mount option "commit" weird  PostPosted: 02.04.2011, 23:28



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
That won't work because I mount by-uuid. However, here's the line, as I have it at the moment:

      Code:
UUID=c70374e7-97b3-4972-a704-285e9343f776   /  ext4   defaults,noatime,errors=remount-ro,barrier=0,discard  0 1


HOWEVER, after rebooting, here is what is mounted (output of the mount command):

      Code:
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro,barrier=0,discard,commit=0)


Notice that it has added "commit=0" to my mount line, even though I did not use it.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 07.04.2011, 14:08



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
FIXED: The issue is triggered by a re-mount that happens during the boot process, and then the power management rule at /usr/lib/pm-utils/power.d/journal-commit is invoked. The default commit value for "AC" is commit=0, and that is appended to the existing mount. So, I edited the file and changed the value to commit=120 (same as I now have it set in /etc/fstab). Now the three ext4 filesystems on my system are mounted correctly at the end of the boot process.

FYI, this file is also invoked on resume from suspend, so the issue is seen in that situation also.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio