Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-22-2015, 12:02 PM   #1
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Rep: Reputation: Disabled
are these two mount statements the same

hi experts

I got an NFS mount that I want to make permanent. So I know I have to added it in etc/fstab. but all I have is the mount shown below:

mount /home
correspondingly, I have googled a sample nfs mount entry for fstab and made this:

#in fstab    /home    nfs  rw,soft,intr    0       0
are they same? I mean like permission wise and everything?

Old 01-22-2015, 12:08 PM   #2
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
The below imposes a few options that aren't specified by the above.
It permits read-write (rw) soft & intr (not sure what they do) & says no to dumping & fsck will not be enabled.
Man fstab for details.

I don't see anything wrong though, reboot with it & see if it works?
Old 01-22-2015, 12:18 PM   #3
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Original Poster
Rep: Reputation: Disabled
so when you do the mount command, how does it know which of those options to use?
Old 01-22-2015, 12:35 PM   #4
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,298

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
There are default which would be used if nothing specific is entered. You could try opening a terminal and entering: man nfs
to read the manual entry for nfs to see if you can find what the defaults are or just try doing an online search.
Old 01-22-2015, 03:13 PM   #5
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 3,542

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
When you run the mount command with just one name argument (either the device or the mount point), it will look in /etc/fstab for the remaining name and the default options. When you specify both the device and mount point in the command, /etc/fstab is not consulted at all and the default options are whatever was compiled into the kernel.
Old 01-22-2015, 05:51 PM   #6
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,707

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
From the manpage:
       soft / hard    Determines the recovery behavior of the NFS client after
                      an NFS request times out.  If neither option  is  speci‐
                      fied  (or if the hard option is specified), NFS requests
                      are retried indefinitely.  If the soft option is  speci‐
                      fied,  then  the  NFS  client fails an NFS request after
                      retrans retransmissions have been sent, causing the  NFS
                      client to return an error to the calling application.

                      NB:  A  so-called  "soft"  timeout can cause silent data
                      corruption in certain  cases.  As  such,  use  the  soft
                      option only when client responsiveness is more important
                      than data integrity.  Using NFS over TCP  or  increasing
                      the value of the retrans option may mitigate some of the
                      risks of using the soft option.
       intr / nointr  Selects whether to allow signals to interrupt file oper‐
                      ations on this mount point. If neither option is  speci‐
                      fied  (or if nointr is specified), signals do not inter‐
                      rupt NFS file operations. If intr is  specified,  system
                      calls  return  EINTR  if an in-progress NFS operation is
                      interrupted by a signal.

                      Using the intr option is preferred  to  using  the  soft
                      option because it is significantly less likely to result
                      in data corruption.

                      The intr / nointr mount option is deprecated after  ker‐
                      nel  2.6.25.   Only  SIGKILL can interrupt a pending NFS
                      operation on these kernels, and if specified, this mount
                      option  is  ignored  to  provide backwards compatibility
                      with older kernels.
The basic difference is that "hard" is the default to prevent silent data corruption. This doesn't happen that often, especially for local network mount use, and occurs much less when using a TCP connection, as TCP has protocol to ensure packet delivery where UDP does not.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] if statements Chupakabra Linux - Newbie 1 07-28-2011 04:09 PM
if statements and case statements not working in bourne shell script mparkhurs Programming 3 06-12-2004 02:41 AM
if statements thesnaggle Linux - Software 1 02-16-2004 09:52 AM
How do I use X =< Y w/ IF statements? dolvmin Linux - Software 11 09-24-2003 10:39 PM
if then statements vapor Programming 4 07-16-2003 06:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration