LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2009, 07:10 AM   #1
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
trying to automount an NFS share


hi,

I am trying to automount an NFS share, the NFS share is on 192.168.0.30 Linux server, want to share it on Linux server with the ip address 192.168.0.100, I have editied the /etc/auto.master file as follow

/najo /etc/auto.najo


and in /etc/auto.najo file looks like

* -fstype=nfs,rw,nosuid,soft 192.168.0.30:/inst/&

I restart the autofs daemon, and when ls there is nothing shared.

what can be wrong.
 
Old 07-18-2009, 07:33 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Why don't you put the entry in your /etc/fstab file?
 
Old 07-18-2009, 07:38 AM   #3
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
is it right entry within the /etc/fstab file

192.168.0.30:/inst /inst nfs rw,nosuid,soft 0 0

thanks

Last edited by shahz; 07-18-2009 at 07:46 AM.
 
Old 07-18-2009, 07:54 AM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Here is an example. This is what I have in mine:
Code:
<remote address or ip>:<name of remote directory to be shared> <location to mount remote share locally> nfs rsize=8192,wsize=8192,nosuid,soft 0 0
You need to ensure the local mount point exists. What you have is correct, you just need to make sure you have created the inst directory locally.
 
Old 07-18-2009, 09:41 AM   #5
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
With autofs, make sure you have smbfs installed as well.

Use the auto.smb that comes with it. Uncomment its line in auto.master and set the root mount directory to something other than /smb if you want. Note that you do not have to create this directory as autofs takes care of that.

Identify the file server by name in hosts as that make things easier.

Create a credentials file with ID and password as /etc/auto.smb.[hostname]

restart autofs and ls the mount directory - you should see the smb servers on the network. ls one of them and you'll see the available shares.

see also Automatic discovery and mounting of the SMB network and Accessing Windows Or Samba Shares Using AutoFS

auto.smb is a script - you can run it and see what it does. you can also change the mount options if need be (as sometimes is needed to handle permissions or timestamp translations).
 
Old 07-21-2009, 03:47 AM   #6
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
need a complete automount tutorial or howto please provide a link.
 
Old 07-21-2009, 05:20 AM   #7
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by shahz View Post
need a complete automount tutorial or howto please provide a link.
Automount NFS HowTo & Tutorial

Last edited by {BBI}Nexus{BBI}; 07-21-2009 at 05:24 AM.
 
Old 07-21-2009, 07:00 AM   #8
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
why the following command doesn't work for me

#mount -t nfs 192.168.0.30:/inst /inst

the error it shows

mount:RPC: Timed out

whats wrong?????
 
Old 07-21-2009, 09:04 AM   #9
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
if its a samba share, the type is cifs, not nfs
 
Old 07-22-2009, 04:45 AM   #10
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by bryanl View Post
if its a samba share, the type is cifs, not nfs
its not a samba share its nfs share from another linux system.
 
Old 07-22-2009, 05:30 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Consider adding the _netdev mount option. The startup scripts will defer mounting entries with this option until the network is ready.
 
  


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
A loop device mounted within an NFS share is not accessible via NFS? srikanthnv Linux - Software 17 12-18-2011 09:31 AM
Placing a SMB share inside an NFS share grittyminder Linux - Networking 0 05-14-2008 03:49 AM
In NFS server. I want to share directory but i dont want to share subdirectories. aashishdhabarde Linux - Server 1 01-16-2008 03:48 AM
How to automount the nfs share in Mandriva 2007.1 deepugopi Linux - Server 4 10-12-2007 09:51 PM
Share Won't Automount Ingla Linux - General 1 08-07-2007 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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