LinuxQuestions.org
Visit Jeremy's Blog.
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 08-26-2014, 06:09 PM   #1
panher
LQ Newbie
 
Registered: Aug 2014
Posts: 8

Rep: Reputation: Disabled
Mounting CISF/NFS Shares


Hi all,

I've been trying to figure this out for a while and can't get anywhere. I've trolled the net and to be quite honest, I'm more confused now than when I started.

Basically, I'm trying to auto-mount a CIFS/NFS share(FrreeNAS & or Openfiler) at bootup on Ubuntu Desktop 14.04.1 LTS.

So far, I can mount it (able to add delete files) using the terminal using

Code:
sudo mount -t nfs -o proto=tcp,port=2049 192.168.0.100:/mnt/FreeNAS/unixset /home/dk/Documents/nfsmount/
I can't get it to auto-mount using the fstab file with

Code:
mount -a
Fstab file contains

Code:
//192.168.0.100/dk /media/nfsmount/ cifs uid=1000,gid=1000,credentials=/home/dk/.nfsmount01credentials,iocharset=utf8,sec=ntlm 0 0
The error I get is:

Code:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I also have a file (.nfsmount01credentials) that stores the username and password and assigned it permissions (chmod 600 .nfsmount01credentials). I've also tried both the ubuntu box and nas credentials.

As mentioned, and through loads of trial and error, I can't work it out.

Please help.
 
Old 08-26-2014, 06:30 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Why are you manually mounting with NFS then trying stab with CIFS? Does CIFS mounting work when you do it manually? Why can't you just use NFS in fstab?
 
Old 08-26-2014, 06:45 PM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
Why don't you just mount the NFS share via an fstab entry? (You mentioned that it works from the command prompt.) BTW, You seem to be confusing NFS and CIFS with your fstab entry (based on references to NFS mountpoint and credential file naming).

1. Are you sure that //192.168.0.100/dk is the actual share?
Code:
smbclient -L 192.168.0.100
2. I note that you are trying to mount the cifs share within the /media tree. That is generally reserved for automatic device mounting utilized with modern desktop environments (eg udev/umount mounting). You should create/use a suitable mount-point eg /mnt/mydata, or even within your user's home directory eg ~/mydata
 
Old 08-26-2014, 06:52 PM   #4
panher
LQ Newbie
 
Registered: Aug 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
: Response to Alucard

Good point. However, from what I've read and understand, linux in general has issues with nfs authentication. I just opted for the cifs option to avoid the hassles and differences of the various nfs versions. If you could please show me a way of how to do it in nfs that would be great.

The FreeNAS box has both CIFS and NFS shares setup. For now, I'm just trying to be able to auto-mount with either at bootup.

Last edited by panher; 08-26-2014 at 06:53 PM.
 
Old 08-26-2014, 06:59 PM   #5
panher
LQ Newbie
 
Registered: Aug 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Ferrari:

Thanks for your response.

Thanks for the media tip. As for the nfs shares, the dk is my linux username (picked that from some how to guide).

I have also tried this with same result

Code:
mount -t nfs -o proto=tcp,port=2049 192.168.0.90:/mnt/data/datashare/Data /home/dk/Documents/nfsmount/
 
Old 08-26-2014, 07:19 PM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
Quote:
As for the nfs shares, the dk is my linux username (picked that from some how to guide).
No, actually I was referring to your cifs fstab entry, where you had //192.168.0.100/dk. This implies dk is the actual share. Anyway, don't get confuesed. Let's stay with NFS now.

If this works
Code:
sudo mount -t nfs -o proto=tcp,port=2049 192.168.0.100:/mnt/FreeNAS/unixset /home/dk/Documents/nfsmount/
then you can generate a NFS fstab entry eg
Code:
192.168.0.100:/mnt/FreeNAS/unixset /home/dk/Documents/nfsmount/ nfs rw 0 0
BTW, when using 'mount -a', you need root credentials, so execute it like this
Code:
sudo mount -a
 
Old 08-26-2014, 07:27 PM   #7
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
Quote:
I have also tried this with same result

Code:

mount -t nfs -o proto=tcp,port=2049 192.168.0.90:/mnt/data/datashare/Data /home/dk/Documents/nfsmount/
I don't understand what you're trying to do above. The server:/share must match the export from the NAS device, and the mount-point must exist (ie have been previously created).
 
Old 08-26-2014, 08:11 PM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
Some useful NFS options explained in simple terms:

http://linoxide.com/file-system/exam...stab-etcfstab/
 
Old 08-27-2014, 09:25 AM   #9
panher
LQ Newbie
 
Registered: Aug 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the brilliant pointer and wonderful resource. Worked like a charm.

Much appreciated.

Code:
192.168.0.100:/mnt/FreeNAS/unixset /home/dk/Documents/nfsmount/ nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
 
Old 08-27-2014, 02:53 PM   #10
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
Glad to have been on help!
 
  


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
Fedora 15 not mounting NFS shares from fstab PreacherBill Fedora 11 07-05-2011 04:16 PM
[SOLVED] NFS shares not mounting at boot time 2handband Linux - Networking 8 01-15-2010 06:48 PM
mounting NFS shares help pls mlu Linux - Networking 1 11-23-2004 10:32 PM
Conditionally mounting nfs shares eagle862 Linux - Networking 1 11-03-2004 12:46 AM
Support for mounting NFS shares glock19 Linux - General 1 05-09-2002 08:02 PM


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