5

I work with an NFS partition on a mac. Commands like du take a very long time, and I was considering unmounting the NFS and remounting it with noatime and nodirtime. The partitions have been mounted since I started my job, so I don't know if the NFS partition is already mounted with noatime or nodirtime.

How can I tell if a mount has noatime and/or nodirtime enabled?

7

To check which options a partition was mounted with, you can use the mount -l command. This will output a bunch of lines that look like this:

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

I've highlighted the part you should be looking at. Just check the line for the partition you're interested in to see if it says noatime/nodirtime.

  • 2
    Usually mount by itself is enough. – Rui F Ribeiro Dec 12 '15 at 11:35
  • The OSX mount manual doesn't mention a -l flag. Is there a way to do this that works in OSX? – Dan Dec 14 '15 at 17:36
  • Dan - You should just be able to do mount by itself, and look at the part of the output I mentioned above. The -l flag just tells it to include labels, but isn't actually necessary for what you want to do. – J. Taylor Dec 15 '15 at 1:54
5

In addition to using

mount

you might find additional information looking at the dmesg output.

Note however that you should expect no improvement when running du which will walk down within subdirectories and do a stat on each file (not like df which will return immediately)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.