Koozali.org: home of the SME Server

Unable to mount NFS share from a qnap nas

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Unable to mount NFS share from a qnap nas
« on: June 22, 2012, 06:55:59 AM »
Code: [Select]
# mount -t nfs 192.168.178.99:/Public /mnt/Public
mount: wrong fs type, bad option, bad superblock on 192.168.178.99:/Public,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Checking dmesg output produces no clues. On the QNAP device, /etc/exports contains the following:
Code: [Select]
[~] # exportfs
/share/MD0_DATA/Public
                <world>

I've also tried importing /share/MD0_DATA/Public instead of /Public, but the result is the same. Any ideas what might be going wrong? I just want to backup sme to the qnap box, over NFS.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #1 on: June 22, 2012, 07:05:28 AM »
Replying to my own post, it might be that nfs-utils are missing: https://www.centos.org/modules/newbb/viewtopic.php?topic_id=32801

Could this be the problem? If so, should I only do a yum install nfs-utils, or is some sort of post-configuration needed as well?

The sole purpose of mounting over NFS, is to be able to use the backup to workstation SME facility.
« Last Edit: June 22, 2012, 07:09:08 AM by reqman »

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #3 on: June 26, 2012, 08:48:04 AM »
Hello Franco,

first, let me say that perhaps this thread should perhaps not be moved into the contribs. SME is supposed to have a base functionality for becoming a NFS client, in order to be able to make backups to an NFS share. This does not work in my case, hence for the poster.

Obviously, others do not encounter such an issue. So, what I am looking here for is some help to be able to just make a backup over NFS to the qnap.

I did encounter references in Centos forums of having to install nfs-utils. And I did install them, albeit with no special SME configuration. This time, trying to mount the NFS share, using the same command as in the original poster just made my mount command halt there. Nothing was output'ed. No mount was done as well.

In Franco's reference, I can see that the following were executed after nfs-utils got installed:
Code: [Select]
config setprop portmap status enabled
service portmap start
Should I do them as well? Is it "safe" for production servers?

Offline nicolatiana

  • *
  • 721
  • +0/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #4 on: June 26, 2012, 01:37:43 PM »
Hi reqman
 
Yes, enabling portmap is necessary for both client and server NFS function.
 
http://wiki.contribs.org/NFS
 
If you leave Your /etc/exports file empty nothing is shared by your SME over NFS, so security issue is minimal.
 
Nicola
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #5 on: June 26, 2012, 06:21:32 PM »
@nicolatiana: thank you for your post.

Both of you suggest to install smeserver-nfs smecontribs. And this is confusing a bit for me: does this mean that one can not backup to nfs, using the built-in backup functionality of SME, unless a contribs package is installed?

If smeserver-nfs is needed for backup to NFS to work, why isn't it included in the first place? Should a bug be opened for this?

Perhaps I am missing out something here and my question is stupid, please bear with me...

Offline nicolatiana

  • *
  • 721
  • +0/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #6 on: June 26, 2012, 07:57:26 PM »
Definitively: yes you have to install. Backup (formerly Backup with Dar) is a pre-built module of Sme distribution while NFS not.
 
Bug or not bug ? Maybe it's necessary to add a warning in the manual page http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter10#Backup_or_restore and here -> http://wiki.contribs.org/Backup_with_dar
 
Nicola
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

Offline nicolatiana

  • *
  • 721
  • +0/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #7 on: June 26, 2012, 08:06:46 PM »
http://wiki.contribs.org/Backup_with_dar#Backup_file_slices_are_NOT_autonomous
 
Made some changes just to warn users; I can confirm that I use several flavours of Qnap as backup destination for Affa all of them mounted in SME folders.
 
Nicola
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #8 on: June 27, 2012, 12:00:50 PM »
Thank you for the clarification. From the looks of it, it seems like a bug: that is, if the package was required, for the backup functionality of SME to work, then smeserver-nfs should be installed in the first place.

EDIT: I have opened bug 7006 for this.
« Last Edit: June 27, 2012, 12:15:27 PM by reqman »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #9 on: June 27, 2012, 02:22:40 PM »
I do not believe that you specifically need smeserver-nfs to mount a remote system FROM your SME server.

This contrib allows you to enable and configure your SME server as a NFS server itself. If you look inside the RPM there is no executable file - just templates for configuring NFS on your SME server.

However, smeserver-nfs understandably depends on nfs-utils for the server part, so installing it will automatically bring in the nfs-utils with both client and server binaries.

As a client you really only need nfs-utils, which is in base, but it does not look like it is installed by default. That should be followed up in your bug report.

I'll make a note on the wiki page.

HTH
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
Re: Unable to mount NFS share from a qnap nas
« Reply #10 on: June 29, 2012, 03:13:17 AM »
The backup panel says "This requires that you provide a writable share (cifs or nfs)" so clearly there is a bug, either in the text or in the missing functionality. I'll follow-up in the bug report.
............

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #11 on: July 11, 2012, 07:18:16 AM »
Although the bug will be eventually worked upon, in the meantime would someone be kind enough and provide information in what exactly I should do, after I install nfs-utils, in order to mount a remote NFS system? Should some config take place? Have some daemons automatically start up perhaps?

Looking for some clean/complete steps to throw in a shell and have NFS client working like a charm. Any help will be appreciated

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
Re: Unable to mount NFS share from a qnap nas
« Reply #12 on: July 11, 2012, 07:24:13 AM »
There is a wiki page on this, although I have not verified it myself.

http://wiki.contribs.org/NFS

that looks a very simple 5 step process
............

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #13 on: July 11, 2012, 10:31:16 AM »
The problem is that the wiki article includes steps not needed for my case: I do not need to turn my SME box to a server, no need to install smeserver-nfs at all.

So the steps are definitely different.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #14 on: July 11, 2012, 10:57:38 AM »
The problem is that the wiki article includes steps not needed for my case: I do not need to turn my SME box to a server, no need to install smeserver-nfs at all.

So the steps are definitely different.

Google is your friend (well, not for its privacy policy) or DuckDuckGo

http://nfs.sourceforge.net/
http://www.brennan.id.au/19-Network_File_System.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-nfs.html
http://www.cyberciti.biz/faq/centos-fedora-rhel-nfs-v4-configuration/

This is just a standard mount.

One thing to beware is the problem of matching UIDs & GIDs

http://www.troubleshooters.com/linux/nfs.htm

Quote
"NFS passes the numeric value for both gid and uid, the simplest solution is to have the gid and uid mappings consistent on all machines sharing the nfs mount."

I had all sorts of fun & games trying to match them from my Xubuntu client to the server so be careful......

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #15 on: July 11, 2012, 12:59:46 PM »
Google is your friend (well, not for its privacy policy) or DuckDuckGo
Christ, what is this DuckDuckGo thing? I've been rendered obsolete, that's a certainty :D

Quote
http://nfs.sourceforge.net/
http://www.brennan.id.au/19-Network_File_System.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-nfs.html
http://www.cyberciti.biz/faq/centos-fedora-rhel-nfs-v4-configuration/

This is just a standard mount.
I do have some basic knowledge on NFS mounts. The question here is:
Quote
...provide information in what exactly I should do, after I install nfs-utils, in order to mount a remote NFS system? Should some config take place? Have some daemons automatically start up perhaps?
... all in the context of SME. For example, if it was my FreeBSD box, I'd just have to modify /etc/fstab for the mounting of the remote NFS share to take place. What should be done in the case of SME, considering the SME configuration specifics and templating?

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #16 on: July 11, 2012, 02:00:16 PM »
Christ, what is this DuckDuckGo thing? I've been rendered obsolete, that's a certainty :D

Hehehehe.... I feel the same these days :-) Must be getting old cos I've got more cynical with the data thieves. Google are one of the worst IMHO so I rarely use it these days. There are a few newer search engines about that are a bit more privacy orientated so I prefer them......

Quote
I do have some basic knowledge on NFS mounts. The question here is:... all in the context of SME. For example, if it was my FreeBSD box, I'd just have to modify /etc/fstab for the mounting of the remote NFS share to take place. What should be done in the case of SME, considering the SME configuration specifics and templating?

If you search the forums, it would appear that fstab is one file you can manually edit and it shouldn't lose the changes. Suggest you put your mount line/s in there and give it a whirl :-)



...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #17 on: July 12, 2012, 05:11:57 AM »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #18 on: July 14, 2012, 05:30:00 PM »
@mary: I have not forgotten to use google, my comment above was more of a joke :)

BTW, is it possible to move this thread back to the SME 8? This is not about a contrib, but rather for the base system.

Now, I don't know if this is useful (and correct for that matter), but I did find what should be done in order to be able to mount foreign NFS shares
Code: [Select]
yum install nfs-utils
ln -s /etc/init.d/portmap /etc/rc7.d/S92portmap

The first command is definitely needed, not sure about the second one though at least in the context of SME templating etc. What is certain is that if portmap is not running, I can not mount anything... The choice of rc7.d and S92 (in S92portmap) were arbitraty: when bug 7006 is fixed, I'm certain that proper choices will be made :)

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #19 on: July 15, 2012, 02:07:11 AM »

Now, I don't know if this is useful (and correct for that matter), but I did find what should be done in order to be able to mount foreign NFS shares
Code: [Select]
yum install nfs-utils
ln -s /etc/init.d/portmap /etc/rc7.d/S92portmap

The first command is definitely needed, not sure about the second one though at least in the context of SME templating etc. What is certain is that if portmap is not running, I can not mount anything... The choice of rc7.d and S92 (in S92portmap) were arbitraty: when bug 7006 is fixed, I'm certain that proper choices will be made :)

Would suggest you add this to your bug (which is where any bug related info should really go).

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Re: Unable to mount NFS share from a qnap nas
« Reply #20 on: July 17, 2012, 10:23:57 AM »
Would suggest you add this to your bug (which is where any bug related info should really go).

B. Rgds
John
Done.