LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-22-2015, 01:02 PM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

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:

Code:
mount test.com:/vol/myhome /home
correspondingly, I have googled a sample nfs mount entry for fstab and made this:

Code:
#in fstab
test.com:/vol/myhome    /home    nfs  rw,soft,intr    0       0
are they same? I mean like permission wise and everything?

Thanks
 
Old 01-22-2015, 01:08 PM   #2
Miati
Member
 
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, 01:18 PM   #3
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

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, 01:35 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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, 04:13 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
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, 06:51 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
From the manpage:
Code:
       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.
 
  


Reply


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 05:09 PM
if statements and case statements not working in bourne shell script mparkhurs Programming 3 06-12-2004 03:41 AM
if statements thesnaggle Linux - Software 1 02-16-2004 10:52 AM
How do I use X =< Y w/ IF statements? dolvmin Linux - Software 11 09-24-2003 11:39 PM
if then statements vapor Programming 4 07-16-2003 07:44 AM


All times are GMT -5. The time now is 06:51 AM.

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