Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to mount a hostname specific nfs Filesystem in /etc/fstab.

10.0.0.1:/testmy/<hostname> /nfs_for_host

if there any Variable to do this ?

share|improve this question

2 Answers 2

I don't think you can do it in fstab, but you can use NIS and automount to accomplish the same thing.

See this: http://www.timgalyean.com/2010/03/automounting-home-directories-with-nis-and-nfs/

share|improve this answer

Try to add the following to your /etc/fstab :

10.0.0.1:/testmy/<hostname>  /nfs_for_host nfs _netdev,defaults,user,auto,noatime,intr   0 0

Explanation of the options (from man 8 mount and man 5 nfs):

  • _netdev: The filesystem resides on a device that requires network access.
  • defaults: Use default options: rw, suid, dev, exec, auto, nouser, async, and relatime.
  • user: Allow an ordinary user to mount the filesystem .
  • auto: Can be mounted with the -a option.
  • noatime: Access timestamps are not updated when a file is read.
  • intr: Allow signals to interrupt file operations on this mount point.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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