LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 12:02 PM   #1
jzoudavy
Member
 
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:

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, 12: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, 12:18 PM   #3
jzoudavy
Member
 
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
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
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
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:30 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
Open Source Consulting | Domain Registration