LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-05-2016, 04:22 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 235

Rep: Reputation: Disabled
Learning Linux: Understanding remote mount command


I saw this example about remote mounting:

mount servername:/projects /mnt/nfs/projects

As I understand it, servername:/projects, is the filesystem on a device (e.g. some sd? partition) at remote servername. And /mnt/nfs/projects is the mount point.

Where does /mnt/nfs/projects resides? On your local host or at remote host, servername?

What does servername syntax looks like? Is it just a host name?
Some example of a real remote mounting usage with fake names would help.


Thank you.
 
Old 03-05-2016, 04:42 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Code:
mount servername:/projects /mnt/nfs/projects
Where: servername is hostname of remote system, /projects is absolute path to directory on remote system, /mnt/nfs/projects is absolute path to mount point (directory name) on local machine.

Note that the remote server must include an entry in /etc/exports to allow remote mounting of the /projects directory.

An anonomyzed example from my own machine (includes mount options from /etc/fstab)...
Code:
mount phobos:/exports/data/user /mnt/phobos

Or, with this line added to /etc/fstab:

phobos:/exports/data/user /mnt/phobos    nfs     noauto,tcp,soft

Then simply...

mount /mnt/phobos
 
1 members found this post helpful.
Old 03-05-2016, 04:50 PM   #3
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,090

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
Where does /mnt/nfs/projects resides?
On your local system.

Quote:
What does servername syntax looks like?
It can be a fully qualified name; www.someserver.org for example, or it can be a simple name on your local network. By simple, something like 'myserver' will work, if that is what you set the hostname to.

The larger part of this exercise is to set up NFS on the remote system. There are plenty of How To documents on this.
 
1 members found this post helpful.
Old 04-27-2016, 10:25 PM   #4
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Could you please / Do you mind simply paste

reference link document how to

please again?
 
Old 04-28-2016, 01:55 AM   #5
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
Does mount follow the standard cp syntax like:

cp source destination

mount source destination


Or for mount command the source and destination is interchangeable?

Last edited by JJJCR; 04-28-2016 at 01:55 AM. Reason: edit
 
Old 04-28-2016, 07:22 AM   #6
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,090

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
The mount command is mount 'device' followed by 'mount point'. There is a detailed man page, see man mount for all the details.

If I wanted to mount a DVD to a mount point in my home directory, the command would look like this ( as root user ).

Quote:
mount /dev/sr0 /home/myusername/mnt
The device is /dev/sr0 and the mount point is /home/mysuername/mnt. Note, the mount point is an empty directory.

A NFS mount would look like this:

Quote:
mount -F nfs [-o mount-options] server:/directory /mount-point
The -F nfs is the file system type. The server: is the name of the NFS server.

Of course this only works if you have NFS configured. Here is one link that can help with that:

-->http://www.linuxquestions.org/linux/...rking/Easy_NFS

Hope this helps.

Last edited by camorri; 04-28-2016 at 07:28 AM.
 
Old 05-12-2016, 11:07 PM   #7
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Code:
mount -F nfs [-o mount-options] server:/directory /mount-point
like this ok?
Code:
mount -F 192.168.0.1:/directory /directory
 
Old 05-13-2016, 09:16 AM   #8
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,090

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
mount -t nfs 192.168.0.100:/nfsshare /mnt/nfsshare
Like this...

-t nfs tells the system what type of share it is.

192.168.0.100 is the remote systems IP address, and nfsshare is the exported share on that system you are trying to mount.

/mnt/nfsshare is the empty directory mount point where you want the share mounted.

If you look at 'man mount' you can find an explanation of the F option.
 
1 members found this post helpful.
Old 05-21-2016, 10:11 PM   #9
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
ok =)
Code:
 #mount -t nfs 192.168.0.100:/nfsshare /mnt/nfsshare
if there was error ... superblock...
what was that ? meaning like...
 
  


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
LXer: Understanding the Top command on Linux LXer Syndicated Linux News 0 08-29-2012 11:30 AM
Help understanding Linux command synopsis notation. AlexTee Linux - Newbie 8 02-01-2011 12:43 PM
I'm working with symlinks with mount command to mount remote shares lhorace Linux - Newbie 1 11-21-2009 05:05 PM
Learning Linux command kizersouzay Linux - Newbie 4 07-30-2005 05:38 AM
long remote mount time for samba with cifs command luna6 Linux - Networking 1 04-01-2005 12:43 PM


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

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