LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-27-2008, 12:38 PM   #1
ttsang123
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
Problem mounting directory between servers


Hi All,

I am having problem mounting a directory between two servers.

I have two servers both running rhel4 on the same subnet 192.168.1.10 and 192.168.1.2 and I am trying (and failing) to mount a directory from one to another.

I have tried the following:

>mount 192.168.1.10/var/www/html /root/www/
mount: special device 192.168.1.10/var/www/html does not exist

>mount 192.168.1.10:/var/www/html /root/www/
ount: mount to NFS server '192.168.1.10' failed: RPC Error: Program not registered.

>mount //192.168.1.10/var/www/html /root/www/
Password: <correct password inserted>
mount error 13 = Permission denied

>mount -o root //192.168.1.10/var/www/html /root/www/
Password: <correct password inserted>
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

>mount //192.168.1.10:/var/www/html /root/www/
mount: can't get address for //192.168.1.10

I have set full access on both directories.

I can ping each machine from the other.

I know I have missed something. Can anyone let me know what it is?

Thanks

T
 
Old 06-27-2008, 01:13 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,604
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Hi,

You will need to setup your systems for a 'NFS' Network Filesystem. Look at 'Linux NFS' and 'Linux Networking HOWTO' to get some good online reference.

You should setup the following;

Code:
/etc/hosts     /etc/hosts.deny
/etc/hosts.allow
Code:
excerpt from 'man hosts'
HOSTS(5)                   Linux Programmer's Manual                  HOSTS(5)

NAME
       hosts - The static table lookup for host names

SYNOPSIS
       /etc/hosts

DESCRIPTION
       This  manual  page  describes  the format of the /etc/hosts file.  This
       file is a simple text file that associates IP addresses with hostnames,
       one line per IP address.  For each host a single line should be present
       with the following information:

              IP_address canonical_hostname [aliases...]
Code:
excerpt from 'man nfs';

NFS(5)                                                                  NFS(5)

NAME
       nfs - fstab format and options for the nfs and nfs4 file systems

SYNOPSIS
       /etc/fstab

DESCRIPTION
       NFS  is  an  Internet  Standard protocol created by Sun Microsystems in
       1984. NFS was developed to allow file sharing between systems  residing
       on  a local area network.  The Linux NFS client supports three versions
       of the NFS protocol: NFS version 2 [RFC1094], NFS version 3  [RFC1813],
       and NFS version 4 [RFC3530].

       The  mount(8) command attaches a file system to the system's name space
       hierarchy at a given mount point.  The /etc/fstab  file  describes  how
       mount(8)  should  assemble  a system's file name hierarchy from various
       independent file  systems  (including  file  systems  exported  by  NFS
       servers).   Each  line  in  the /etc/fstab file describes a single file
       system, its mount point, and a set of default mount  options  for  that
       mount point.
       For NFS file system mounts, a line in the /etc/fstab file specifies the
       server name, the path name of the exported server directory  to  mount,
       the  local  directory  that is the mount point, the type of file system
       that is being mounted, and a list of mount options that control the way
       the filesystem is mounted and how the NFS client behaves when accessing
       files on this mount point.  The fifth and sixth fields on each line are
       not  used  by NFS, thus conventionally each contain the digit zero. For
       example:

            server:path    /mountpoint    fstype    option,option,...   0 0

       The server's hostname and export pathname are  separated  by  a  colon,
       while  the  mount options are separated by commas. The remaining fields
       are separated by blanks or tabs.   The  server's  hostname  can  be  an
       unqualified  hostname,  a fully qualified domain name, or a dotted quad
       IPv4 address.  The fstype field contains either "nfs" (for version 2 or
       version  3  NFS  mounts) or "nfs4" (for NFS version 4 mounts).  The nfs
       and nfs4 file system types  share  similar  mount  options,  which  are
       described below.
Don't forget the '/etc/exports'.

Code:
excerpt from 'man exports';

EXPORTS(5)                 Linux File Formats Manual                EXPORTS(5)

NAME
       exports - NFS file systems being exported (for Kernel based NFS)

SYNOPSIS
       /etc/exports

DESCRIPTION
       The  file  /etc/exports serves as the access control list for file sys-
       tems which may be exported to NFS clients.  It is used  by  exportfs(8)
       to  give  information  to  mountd(8)  and  to the kernel based NFS file
       server daemon nfsd(8).

       The file format is similar to the SunOS exports file.  Each  line  con-
       tains  an  export  point  and  a  whitespace-separated  list of clients
       allowed to mount the file system at that point. Each listed client  may
       be  immediately  followed  by  a parenthesized, comma-separated list of
       export options for that client. No whitespace is  permitted  between  a
       client and its option list.
Don't forget 'exportfs';

Code:
excerpt from 'man exportfs';

exportfs(8)                                                        exportfs(8)

NAME
       exportfs - maintain list of NFS exported file systems

SYNOPSIS
       /usr/sbin/exportfs [-avi] [-o options,..] [client:/path ..]
       /usr/sbin/exportfs -r [-v]
       /usr/sbin/exportfs [-av] -u [client:/path ..]
       /usr/sbin/exportfs [-v]
       /usr/sbin/exportfs -f

DESCRIPTION
       The  exportfs command is used to maintain the current table of exported
       file systems for NFS. This list  is  kept  in  a  separate  file  named
       /var/lib/nfs/xtab  which  is read by mountd when a remote host requests
       access to mount a file tree, and parts of the list which are active are
       kept in the kernel's export table.

       Normally  this  xtab file is initialized with the list of all file sys-
       tems named in /etc/exports by invoking exportfs -a.
This link and others are available from 'Slackware-Links'. More than just SlackwareŽ links!

Good luck!

Last edited by onebuck; 06-27-2008 at 01:15 PM. Reason: grammar an punctuation
 
Old 06-27-2008, 05:56 PM   #3
ttsang123
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the info.

I will go through it and let everyone know how i get on.

Cheers!
 
Old 06-27-2008, 06:48 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,604
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Hi,

Don't forget to make sure you have the daemons started and running . You will need the 'rpc' (RPC 'NFS' daemons).
 
  


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
Discovering and mounting Apple servers 144419855310001 Linux - Networking 1 01-03-2007 02:24 PM
SAMBA home directory mounting problem in mandriva 2006 gokulnath Mandriva 1 09-26-2006 11:23 AM
SAMBA home directory mounting problem in mandriva 2006 gokulnath Linux - Networking 1 09-20-2006 08:49 AM


All times are GMT -5. The time now is 12:23 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