Page 1 of 1

Default atime/relatime/noatime setting: Udisks2

Posted: Thu Dec 17, 2020 6:05 pm
by Roland
What is the default value used in 'our' Kernel 5.x versions for saving time stamps when reading files: atime, relatime or noatime? I know it can be changed in fstsab for individual partitions, but can it be changed systemwide? I'm going to test a SSD drive with amiga Linuxes, and would definitely like to use 'noatime' as default for the whole system! That would avoid needless writings to the disk.

Also: what is the correct way to partition a SSD drive for Linux, so that there would not be unnecessary writing on the disk?

Re: Default atime/relatime/noatime setting in Kernel 5.x?

Posted: Fri Dec 18, 2020 3:32 pm
by xeno74
Hi Roland,

I haven't found any kernel config options for atime. If you have any hints, please let me know.

Thanks,
Christian

Re: Default atime/relatime/noatime setting in Kernel 5.x?

Posted: Fri Dec 18, 2020 4:26 pm
by Roland
xeno74 wrote: Fri Dec 18, 2020 3:32 pm I haven't found any kernel config options for atime. If you have any hints, please let me know.
How about the

Code: Select all

./fs/namespace.c
which was found here:

https://askubuntu.com/questions/59179/h ... ts-default

Re: Default atime/relatime/noatime setting: Udisks2

Posted: Sat Dec 19, 2020 11:11 am
by Roland
@xeno74

I found out that since v. 2.9.0 of Udisks2 it is possible to set filesystem spesific mount parameters in the file '/etc/udisks2/mount_options.conf'.
(http://storaged.org/doc/udisks2-api/lat ... tions.html).

But what is the version of Udisks2 in Fienix, MintPPC and Ubuntu 16.04.7 ? Due to Xmas holidays I cannot access my own X5000 for a while to check this...

Re: Default atime/relatime/noatime setting in Kernel 5.x?

Posted: Sat Dec 19, 2020 12:49 pm
by xeno74
I will try to figure out the versions of Udisks2 after the merge window.

Re: Default atime/relatime/noatime setting: Udisks2

Posted: Tue Mar 30, 2021 10:02 pm
by Roland
Roland wrote: Sat Dec 19, 2020 11:11 am @xeno74

I found out that since v. 2.9.0 of Udisks2 it is possible to set filesystem spesific mount parameters in the file '/etc/udisks2/mount_options.conf'.
(http://storaged.org/doc/udisks2-api/lat ... tions.html).
I cheched that both Fienix and MintPPC have an Uudisk version which is fresh enough to allow setting system level defaults for disks...
But for unknown some reason I cannot get Udisk2 to set noatime/nodiratime as defaults!

I have these lines at the beginning of the "/etc/udisks2/mount_options.conf":

Code: Select all

[defaults]
allow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,ro,rw,sync,dirsync,noload
But when I mount a partition (which has no entry in fstab) e.g. by opening it in Caja and check it with 'mount' command, instead of having 'noatime/nodiratime', it has 'relatime' which is the default set in the kernel.

So, what is wrong, why doesn't the 'mount_options.conf' has any effect?! Is it formulated in wrong way...?

If you have time, Christian, could you please see if you can get it to work...?

Re: Default atime/relatime/noatime setting: Udisks2

Posted: Sat Apr 10, 2021 9:47 pm
by Roland
Found finally a solution to the Udisk2 issue, just by testing... The "allow=" string was not able prevent the system from using the 'relatime' default for randomly mounted volumes. In addition, "default=noatime" was needed! Also "nodiratime" can be made default the same way.

Thus, the '/etc/udisks2/mount_options.conf' should look like this:

Code: Select all

[defaults]
allow=exec,noexec,nodev,nosuid,noatime,nodiratime,ro,rw,sync,dirsync,noload
defaults=noatime,nodiratime 
I recommend anyone who has a SSD drive (and wants to extend it's life by eliminating unnecessary writing operations) to use this config in Fienix and MintPPC !-) Unfortunately Ubuntu 16.04 cannot use it as the Udisks2 version is too old (2.9.0 is the minimun).

NOTE: It is important to add the 'noatime' (and 'nodiratime') parameter(s) also to '/etc/fstab', for each partition defined there, as fstab definitions override those made by Udisks2!