Koozali.org: home of the SME Server

[SOLVED] Connecting to a NFS share for backups.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
[SOLVED] Connecting to a NFS share for backups.
« on: December 08, 2014, 11:51:11 PM »
I need a walk-through or a link to documentation on how to use the server-manager to set up backups to a NFS share.  I am backing to a NAS4Free server.  In the NFS service configuration, I have set up a share /mnt/TEST/.

In the server-manager under "backup or restore", I have tried various permutations of a file name, /mnt/, /mnt, /mnt/TEST/, /mnt/TEST, etc, etc, etc, but when I try "verify workstation backup", I am getting an error,

Code: [Select]
Unable to mount workstation shared folder mount: wrong fs type, bad option, bad superblock on XXX.XXX.XXX.XXX:/mnt/TEST/, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so
Is it the wrong path, am I missing a setting on the NAS?  How can I troubleshoot this problem?
« Last Edit: December 11, 2014, 07:11:08 PM by LANMonkey »

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #1 on: December 09, 2014, 12:18:00 AM »
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #2 on: December 09, 2014, 12:51:24 AM »
Have you read the wiki http://wiki.contribs.org/Backup_with_dar#NFS
and relevant Bug http://bugs.contribs.org/show_bug.cgi?id=7006

That worked.

Now I am getting a different error:

Code: [Select]
No directory for your host in shared folder. Maybe your host name is different from backup ones
I had some confusion over the "authorized network".  My LAN is like 123.123.123.1, 123.123.123.2, etc.  So I assume the setting is 123.123.123.0/24.  Right?

The shares I have set up are /mnt, /mnt/TEST.

What else might be causing a problem?

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #3 on: December 09, 2014, 03:48:28 AM »
I don't see a Item called  "authorized network" but there is a "Workstation IP or hostname" put the local ip of the NAS here eg 192.168.1.69

The backup share is simply the directory ie  "TEST" or "mnt/test" whatever you have called it.

Also you may need this from the cli
ln -s /etc/init.d/portmap /etc/rc7.d/S92portmap

See Bug 7006
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #4 on: December 09, 2014, 08:43:52 PM »
No progress.

In SME, I apply "showmount -e XXX.XXX.XXX.XXX"  and return,

"Export list for XXX.XXX.XXX.XXX:
/mnt           XXX.XXX.XXX.0
/mnt/TEST   XXX.XXX.XXX.0"

In the export settings in my NAS4Free BSD box GUI for these two mount points I have XXX.XXX.XXX.XXX for the allowed host for /mnt and denied is blank. For /mnt/TEST both allowed and denied is blank.

Here is your reference in Bug 7006 in comment 5:

http://bugs.contribs.org/show_bug.cgi?id=7006#c5

Quote
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 though.

I tried to install the utilities and it was already installed.  I tried adding the link and I still see the error, "No directory for your host in shared folder. Maybe your host name is different from backup ones" when I check the configuration in the Backup or Restore section of the SME GUI.

I try the command,  "mount -t nfs 192.168.1.3:/mnt/TEST /TEST/" on a directory I made, "mkdir /TEST" and after a period of time, I get an error, "mount.nfs: Input/output error".

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #5 on: December 09, 2014, 11:36:47 PM »
Ok so lets see your backup config

[root@smevm ~]# db configuration show backupwk

NAS must have the dir you specify "shared" or "allowed" or whatever terminology is used.
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #6 on: December 10, 2014, 12:02:01 AM »
And here is some more information showing what I have to work with from the configuration panel:

http://wiki.nas4free.org/doku.php?id=documentation:setup_and_user_guide:nfs

http://wiki.nas4free.org/doku.php?id=documentation:setup_and_user_guide:services_nfs_shares

In setting up shares, I use XXX.XXX.XXX.0/24.  This is where I have the most doubts.

db configuration show backupwk:

Code: [Select]
backupwk=service
    BackupTime=20:00
    Compression=6
    CompressionProg=gzip
    DaysInSet=1
    FullDay=7
    IncNum=0
    IncOnlyTimeout=no
    Login=
    Password=
    Program=dar
    SetNum=1
    SetsMax=3
    SmbHost=192.168.1.3
    SmbShare=mnt/TEST/
    Timeout=8
    VFSType=nfs
    status=enabled

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #7 on: December 10, 2014, 12:08:03 AM »
Config looks good, the only point is I would suggest to perhaps set the

SmbShare=mnt/TEST/

to just TEST

and my experience has been it is case sensitive, certainly as far as windows goes anyway.

Can you confirm the ip of your NAS is 192.168.1.3

I have no experience with NAS settings etc...
--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #8 on: December 10, 2014, 12:15:56 AM »
I do think your issues are not with SME but the NAS setup..you will need someone familiar with that interface.
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #9 on: December 10, 2014, 12:16:23 AM »
Something is not right.  This is supposed to be an NFS backup, not an SMB.  Here is my report in the server-manager:

"Backup is Enabled.
Backup is made on LAN workstation 192.168.1.3 via nfs
Destination backup share folder is mnt/TEST/
Number of rotating backup sets is 3
Number of daily backups contained in each set is 1
Compression level (0-9) of backup is 6
Daily backup occurs at 20:00
Each daily backup session is cleanly timed out after 8 hours.
Full backup sessions (new backup set) are allowed everyday"

So doesn't SmbShare refer to a SMB share?

Yes, the IP address of my NAS is correct.

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #10 on: December 10, 2014, 12:27:22 AM »
This is my setup for a backup to the ip 192.168.2.1 using NFS

Backup is Enabled.
Backup is made on LAN workstation 192.168.2.1 via nfs
Destination backup share folder is backup
Number of rotating backup sets is 2
Number of daily backups contained in each set is 2
Compression level (0-9) of backup is 0
Daily backup occurs at 22:30
Each daily backup session is cleanly timed out after 8 hours.except full backups which are cleanly timed out after 24 hours
Full backup sessions (new backup set) are allowed everyday

So did you reset the "Destination backup share folder " ?

The original message is telling you there are issues with that setting/ip or on the NAS setting

"No directory for your host in shared folder. Maybe your host name is different from backup ones"

--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #11 on: December 10, 2014, 07:21:44 PM »
I have created a new share nfs at /mnt/nfs and tried to apply it as instructed as just "nfs".  Now my report says, "Unable to mount workstation shared folder mount: 192.168.1.3:/nfs failed, reason given by server: Permission denied"

Here are some of my settings for that share:

"Map all users to root:  No

Authorised network 192.168.1.0/24"

Here is the export list from SME,

"[root@xxxxx ~]# showmount  -e 192.168.1.3
Export list for 192.168.1.3:
/mnt/nfs  192.168.1.0
/mnt/TEST 192.168.1.0"

Is the problem the share location?  Authorised networks?

From "db configuration show backupwk" I get for SmbHost and SmbShare,

"SmbHost=192.168.1.3
SmbShare=nfs"

Attempting to mount gives the same error, so at least I think I have a reliable diagnostic tool, I don't have to go into the server-manager to see if things are working at this level.

"[root@finch ~]# mount -t nfs 192.168.1.3:nfs /TEST
mount: 192.168.1.3:nfs failed, reason given by server: Permission denied"

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Connecting to a NFS share for backups.
« Reply #12 on: December 10, 2014, 09:48:58 PM »
So doesn't SmbShare refer to a SMB share?
Not really.  The Smb properties refer to any network share used, whether SMB or NFS.  FWIW, I did have my SME 8 server backing up regularly to an NFS share on a FreeNAS server, and I now have my SME 9 server doing the same.  It required only installing the nfs-utils package.  So yes, it can be done, though it may be tricky.  My server's down at the moment, but when it comes back up I can give my configuration if it'll help.
......

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Connecting to a NFS share for backups.
« Reply #13 on: December 10, 2014, 10:17:19 PM »
What is the IP of your SME box?

Í have no experience with a NAS so can't advise there, but I do think the issue lies with the config there.


« Last Edit: December 10, 2014, 10:25:30 PM by TerryF »
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Connecting to a NFS share for backups.
« Reply #14 on: December 10, 2014, 10:30:22 PM »
The IP of my SME server is 192.168.1.11

Quote
Í have no experience with a NAS so can't advise there, but I do think the issue lies with the config there.

"there" being on my NAS?

To be clear, I say again that my NAS is NAS4Free, not FreeNAS.  I know they are related but there might be differences.