Default partitioning tool adds `noatime` mount option for the swap partition entry

As evidenced by this thread, the partitioning tool (on at least the GNOME .iso) adds noatime as a mount option for the swap partition ─ as well as for swap files ─ in /etc/fstab. :arrow_down:

A swap partition doesn’t have any filesystem on it, and therefore adding noatime to the mount options is nonsensical, because if there isn’t any filesystem, then there also aren’t any inodes, and thus no ctime, mtime or atime fields to be updated.

The same holds true in the event of a swap file. The swap file itself is located by the kernel by way of the filesystem layer, but once mounted, the contents of the swap file are just raw drive blocks, without any filesystem structures or inodes.

The swap file itself does have ctime, mtime and atime fields because it is a file and thus it has an inode, but in that case, the noatime mount option should be set on the filesystem containing the swap file, not in the mount options for the swap file itself.

:man_teacher:

7 Likes