0

I'm installing Mongo 3.4 according to this article and is saying to set noatime in /etc/fstab

In the example given it looks like:

LABEL=cloudimg-rootfs   /        ext4   defaults,noatime,discard        0 0

But mine, a droplet on digital ocean with Debian 8 (upgraded from 7) looks like this:

UUID=5bc31ecc-d864-44dc-bea4-d409696cb577 /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

I'm just starting up with sys admin stuff and want to make sure everything will work. How should I add noatime?

Alexandru R
  • 150
  • 1
  • 11

1 Answers1

1

Your fstab is formed like so on each line:

If you with to specify a filesystem option, you must do so on the fourth field. This is the same place that you have errors=remount-ro (which is itself an option). Multiple options must be separated by commas, as is in your example above. The option "defaults" is only a field placeholder that does nothing, and can be omitted if there is at least one other option specified.

Be careful to not make mistakes, as your filesystem will fail to mount rather than ignoring a malformed option. You should be checking to see if your fstab entries work after you've modified them. The easiest way to do this is to attempt to mount these devices as specified in your fstab.

To do this, you must use the mount command, which follows a very similar syntax to the fstab itself. It's prudent to read the mount man page for this and future use, as you'll likely be using it often to do various tasks. In this case, the most simple way to make sure your fstab entries function is to instruct mount to run through your entire /etc/fstab file via this command: mount -a. After using this to attempt mounts, check dmesg to see if you had any errors.

Spooler
  • 7,046
  • 18
  • 29