Mount all filesystems "relatime"

Since I will be using a SSD instead of a HD soon, I'd like to reduce the disk Writes.

Essentially, the updates to the "Read a file or Dir" time stamp are not needed (at least by me) and I'd like to remove that.


On Linux, the best option is to add the "relatime" option to the mount options (in /etc/fstab).

"relatime" prevents the "read" time stamp updates on files or directories (except if the read access time would be less than the last write).


On Mac OS Lion, how would I do that?

- /etc/fstab does not seem to contain the current filesystems entries (like '/')

- where/what is the equivalent of /etc/fstab on Lion

- what is the "relatime" option on Lion (if there is one)?


Thanks

Mac mini, Mac OS X (10.7.3), Lion

Posted on Apr 29, 2012 9:57 PM

Reply
1 reply

Apr 29, 2012 10:20 PM in response to ring_0

You want to disable noatime, i.e., the recording of last access time on the ssd files (man mount). You do this by creating a launch daemon in /Library/LaunchDaemons. It would look like this:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.enable.boot.noatime</string>

<key>ProgramArguments</key>

<array>

<string>mount</string>

<string>-vuwo</string>

<string>noatime</string>

<string>/</string>

</array>

<key>RunAtLoad</key>

<true/>

</dict>

</plist>


This will run when the drive is mounted during boot.


This and a few other ssd optimizations are discussed in the following:


Optimizing Mac OS X for SSD drives


Incidentally I am using the launch daemon on my mac pro for its ssd.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mount all filesystems "relatime"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.