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 03-14-2014, 04:26 AM   #1
AmirSI
LQ Newbie
 
Registered: Mar 2014
Posts: 13

Rep: Reputation: Disabled
Mount NAS-QNAP to Ubuntu Server


I have my QNAP on network whit a static ip, i need to mount it on Linux Ubuntu Server.

I have tryed :
sudo mount -t nfs -o username=admin,password=admin 192.168.2.12:vmware-bkp ~/mnt/QNAP-backup/

And i get error: mount.nfs: an incorrect mount option was specified

I tryed some other options and i cant get it to work.
If i look on QNAP control panel i have File System: EXT4 and it is RAID6.

What am i doing wrong?
 
Old 03-14-2014, 05:01 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by AmirSI View Post
I have my QNAP on network whit a static ip, i need to mount it on Linux Ubuntu Server.

I have tryed :
Code:
sudo mount -t nfs -o username=admin,password=admin 192.168.2.12:vmware-bkp ~/mnt/QNAP-backup/
And i get error: mount.nfs: an incorrect mount option was specified
Two thoughts on that.

Is the NAS unit really using NFS for its shares? I'd rather think it uses Samba, in which case you would mount it with -t cifs instead of -t nfs.

Whenever I saw network shares being accessed, they're always prepended with two slashes: //host/share This is independent from whether you use a host name or just an IP. And finally, in mount operations, there's even a colon in front of all that, so it's
Code:
://host/share
Quote:
Originally Posted by AmirSI View Post
If i look on QNAP control panel i have File System: EXT4 and it is RAID6.
That's not relevant. This is an internal affair of the NAS, it is not exposed to the outside when accessing a network share. In the same way, you can access a share on a Windows PC without caring whether the Windows machine is using NTFS or FAT. That's the Black Box principle: You have an interface with certain well-specified properties; don't bother about what's beyond it.

[X] Doc CPU
 
Old 03-14-2014, 05:55 AM   #3
AmirSI
LQ Newbie
 
Registered: Mar 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks, it worked.It was really Samba.
Is it possible, to make this folder mounted permanent?

The working command:
sudo mount -t cifs -o username=admin,password=admin //192.168.2.12/vmware-bkp ~/mnt/QNAP-backup/

Last edited by AmirSI; 03-14-2014 at 05:59 AM.
 
Old 03-14-2014, 06:51 AM   #4
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by AmirSI View Post
Thanks, it worked. It was really Samba.
fine, at least some success up to a point.

Quote:
Originally Posted by AmirSI View Post
Is it possible, to make this folder mounted permanent?

The working command:
Code:
sudo mount -t cifs -o username=admin,password=admin //192.168.2.12/vmware-bkp ~/mnt/QNAP-backup/
Yes, it is. You'd have to add a line corresponding to the above command in /etc/fstab.
Roughly, it should look like this:

Code:
//192.168.2.12/vmware-bkp  /home/<username>/mnt/QNAP-backup  cifs username=admin,password=admin  0  0
Of course, you have to replace <username> with your actual user name, or choose a different mountpoint altogether (outside your home directory, e.g. in /mnt or /media). That's because fstab is processed under the root account, so it doesn't know what you actually mean by '~'.
Note that you have to edit /etc/fstab as root (or at least using sudo), and for good reason. Messing up this file can cause your system not to boot any more!
As a safety precaution, make a backup copy of that file before you edit it:

Code:
sudo cp /etc/fstab /etc/fstab.bak
That way, you can boot your computer from a CD or USB Live system, mount your HDD partition manually and then restore the fstab file from the saved copy if anything fails badly.

There may be another issue with mounting network shares in fstab: A friend of mine tried that on his Raspberry Pi running Raspbian, a Debian variant. He found that this wouldn't work on Raspbian, obviously that system tries to mount the network shares even before the network is up. I suspect that this may be a problem on other systems as well, but I've never tried it myself. I worked around that potential issue by using autofs for mounting my network shares only when they're accessed.

[X] Doc CPU
 
Old 03-14-2014, 07:23 AM   #5
AmirSI
LQ Newbie
 
Registered: Mar 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks Doc CPU, everthing is working.
 
  


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
Best practice for accessing Qnap NAS from linux Mint Manganus Linux - Newbie 3 11-11-2013 08:15 AM
nas which one between qnap ts-219p+ and synology ds211+ Gatemaze Linux - Networking 4 05-24-2011 07:37 PM
Unable to Copy Files Over To Qnap Nas spaxz Linux - Newbie 2 05-02-2011 07:25 PM
LXer: QNAP TS-409U Turbo NAS LXer Syndicated Linux News 0 07-15-2008 10:30 AM
QNAP NAS-server under Linux? ronald-be Linux - Hardware 2 09-16-2007 06:31 AM

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

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