Skip to content

Tuesday, February 9th, 2010

New Linux User

Explanation: The Mount Options in the FSTAB File

June 6, 2006 by Jon  
Filed under Explanation

I recent wrote about the format of the fstab file. One of the columns in the file specifies to the system how each file system should be mounted. There are a lot of possible options for that column, although the most common by far is defaults. Here are the other possibilities:

  • auto: allows the system to be mounted with the -a option. In essence, mount -a will mount all file systems specified in the fstab file except those with the noauto mount option.
  • defaults: a quick way to specify read/write/ suid/ dev/exec/auto/nouser/async.
  • exec: allows applications on the file system to be executable (good security potential)
  • noauto: opposite of auto (above)
  • noexec: opposite of exec (above)
  • nosuid: prevents the suid and sgid bits (if set) from being effective on the file system
  • nouser: prevents normal users from mounting or unmounting the file system
  • ro: read only
  • rw: read/write
  • suid: allows the suid and sgid bits to be effective on the file system
  • user: allows a user to mount a file system and the same user to unmount it
  • users: allows a user to mount a file sytem and any user to unmount it
  • There are three other options that I don’t fully understand yet:

  • dev
  • sync
  • async

Anyone want to step in and clarify those for us?

  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google
  • TwitThis
  • Reddit
  • Yahoo! Buzz
  • Slashdot
  • E-mail this story to a friend!

Comments

6 Responses to “Explanation: The Mount Options in the FSTAB File”
  1. pellgarlic says:

    “sync” means that data is written to the device immediately upon the command to copy or paste a file (“synchronously”). “async” means the data may not be written straight away (“asynchronously”).

    “sync” is best used for “removable” media, such as floppy drives, usb flash drives etc, which can be physically removed from the system quite easily. this will help avoid instances where the device is removed before the data is actually written to the device.

    “async” is best used for “fixed” drives, where the likelihood of the above scenario happening is slim. this way, the system can delay the actual writing of data onto the device if it is quite busy with other processes, to avoid slowing down the other processes. it can then write the data later, when there is more cpu power available.

  2. Jon says:

    Outstanding, thanks Pellgarlic!

  3. nqsonk9 says:

    Thanks for useful guilde, guys. Are “gid, umask, ntl …” options for fstab too, then how do they work ? Can you give me an example using nouser, user and users ?
    Thanks again :)

  4. Silver Knight (subscribed) says:

    I’m fairly certain that the dev and nodev options cause that mounted filesystem to either interpret or NOT interpret special device files (named pipes, device nodes, and such).

Trackbacks

Check out what others are saying about this post...
  1. [...] My most recent posts talk about the fstab file, mount options, and file system types. Now that we have those things out of the way, we can talk more in depth about mounting a file system. [...]

  2. [...] what options are needed. The “/etc/fstab” file is read and mounts volumes during boot. Gnome Volume [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


About Us | Advertise with us | Blog for EveryJoe | Privacy Policy | Terms of Use
Get This Theme | Sitemap


All content is Copyright © 2005-2010 b5media. All rights reserved.