#680 Issue closed: NFS mount error

Labels: support / question

maxbur1960 opened issue at 2015-11-01 16:00:

Hello, I'm trying REAR considering to meke my default BACKUP SOFTWARE. I'm non a professional but usually I can get by using computer.
THAt's my issue: I installed REAR and configured confif file this way

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL="nfs://192.168.0.20/ServerNFS"

I have a NFS server running under openmediavault at 192.168.0.20 ad a shared folder named ServerNSF

Anytime I try to run rear -v mkbackup it terminates with this error

ERROR: Mount command 'mount -v -t nfs -o rw,noatime 192.168.0.20:/ServerNFS /tmp/rear.amNNbHNL0kIW3gr/outputfs' failed.

What am I doing wrong?

Thanks in advice

Massimo from Italy

gozora commented at 2015-11-01 20:40:

Really hard to say from the info you have provided. First and foremost, try to check/provide /var/log/rear/rear-uefi.log for more information.
My best guess would be that there is something wrong with your NFS server setup. If log file does not provide any reasonable information, try to trigger mount command separately:
mkdir -p /tmp/rear_test && mount -v -t nfs -o rw,noatime 192.168.0.20:/ServerNFS /tmp/rear_test

Output from command showmount -e 192.168.0.20 can help you to see what is actually exported from your NFS server.

V.

gdha commented at 2015-11-02 06:52:

Check your NFS exports file:

$ cat /etc/exports
/exports 192.168.122.0/24(rw,no_root_squash)

Users usually forget about the default setting root_squash, which disallow root (of the client system) to write on the exported file system.

maxbur1960 commented at 2015-11-02 16:09:

Thank you very much for the fast answer. I appreciate that.
I agree that my NFS server configuration must be wrong...
Being non familiar with NFS, I moved to SAMBA, than I know certainly better.

on my NASLEGAL with static IP adress 192.168.0.20 I creater a shared
folder named sambauser
and an user with the same name sambauser

I tred with this /etc/rear/local.conf

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=cifs://NASLEGAL/sambashare

and also trying with IP NAS address

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=cifs://192.168.0.20/SAMBASHARE

configuring also the //etc/rear/.cifs file as follows

username=sambauser
password=xxxxxxxxxxxxx
domain=WORKGROUP

I keep having this at rear-LaMiaNuvola.log (LaMia Nuvola is my Ubuntu
Server name)

/2015-11-02 17:00:48 Relax-and-Recover 1.17.2 / Git
2015-11-02 17:00:48 Command line options: /usr/sbin/rear -v mkbackup
2015-11-02 17:00:48 Using log file: /var/log/rear/rear-LaMiaNuvola.log
2015-11-02 17:00:49 Including conf/Linux-i386.conf
2015-11-02 17:00:49 Including conf/GNU/Linux.conf
2015-11-02 17:00:49 Including conf/Ubuntu.conf
2015-11-02 17:00:49 Including /etc/rear/site.conf
2015-11-02 17:00:49 Including /etc/rear/local.conf
2015-11-02 17:00:49 Running 'init' stage
2015-11-02 17:00:49 Including init/default/01_set_drlm_env.sh
2015-11-02 17:00:49 Finished running 'init' stage in 0 seconds
2015-11-02 17:00:49 Using build area '/tmp/rear.hRUclCtkWPxXrB3'
mkdir: created directory '/tmp/rear.hRUclCtkWPxXrB3/rootfs'
mkdir: created directory '/tmp/rear.hRUclCtkWPxXrB3/tmp'
2015-11-02 17:00:49 Running mkbackup workflow
2015-11-02 17:00:49 Running 'prep' stage
2015-11-02 17:00:49 Including prep/default/00_remove_workflow_conf.sh
mkdir: created directory '/tmp/rear.hRUclCtkWPxXrB3/rootfs/etc'
mkdir: created directory '/tmp/rear.hRUclCtkWPxXrB3/rootfs/etc/rear'
2015-11-02 17:00:49 Including prep/default/02_translate_url.sh
2015-11-02 17:00:49 Including prep/default/03_translate_tape.sh
2015-11-02 17:00:49 Including prep/default/04_check_output_scheme.sh
2015-11-02 17:00:49 Including
prep/NETFS/default/05_check_NETFS_requirements.sh
2015-11-02 17:00:49 Skipping ping test
2015-11-02 17:00:49 Including
prep/default/05_check_keep_old_output_copy_var.sh
2015-11-02 17:00:49 Including prep/NETFS/default/06_mount_NETFS_path.sh
mkdir: created directory '/tmp/rear.hRUclCtkWPxXrB3/outputfs'
2015-11-02 17:00:49 Mounting with 'mount -v -o rw,noatime,guest
//naslegal/sambashare /tmp/rear.hRUclCtkWPxXrB3/outputfs'
mount: no type was given - I'll assume cifs because of the // prefix
mount error: could not resolve address for naslegal: Unknown error
2015-11-02 17:00:49 ERROR: Mount command 'mount -v -o rw,noatime,guest
//naslegal/sambashare /tmp/rear.hRUclCtkWPxXrB3/outputfs' failed.
=== Stack trace ===
Trace 0: /usr/sbin/rear:251 main
Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:9 WORKFLOW_mkbackup
Trace 2: /usr/share/rear/lib/framework-functions.sh:70 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:31 Source
Trace 4: /usr/share/rear/prep/NETFS/default/06_mount_NETFS_path.sh:11 source
Trace 5: /usr/share/rear/lib/global-functions.sh:153 mount_url
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:132 StopIfError
Message: Mount command 'mount -v -o rw,noatime,guest

//naslegal/sambashare /tmp/rear.hRUclCtkWPxXrB3/outputfs' failed.

2015-11-02 17:00:49 Running exit tasks.
rmdir: removing directory, '/tmp/rear.hRUclCtkWPxXrB3/outputfs'
2015-11-02 17:00:49 Finished in 1 seconds
2015-11-02 17:00:49 Removing build area /tmp/rear.hRUclCtkWPxXrB3
rmdir: removing directory, '/tmp/rear.hRUclCtkWPxXrB3'
2015-11-02 17:00:49 End of program reached

What can do?
I'm desperate!!!
Thanks

Il 02/11/2015 07:52, gdha ha scritto:

Check your NFS exports file:

|$ cat /etc/exports /exports 192.168.122.0/24(rw,no_root_squash) |

Users usually forget about the default setting |root_squash|, which
disallow root (of the client system) to write on the exported file system.


Reply to this email directly or view it on GitHub
https://github.com/rear/rear/issues/680#issuecomment-152933371.

maxbur1960 commented at 2015-11-02 16:17:

Hello, I forgot: seeing in the log file that the mount command in dosing
with a "guest" name, I gave to the SAMBA folder the GUESTS permissions.
Same result....
Thanks
Massimo

Il 02/11/2015 07:52, gdha ha scritto:

Check your NFS exports file:

|$ cat /etc/exports /exports 192.168.122.0/24(rw,no_root_squash) |

Users usually forget about the default setting |root_squash|, which
disallow root (of the client system) to write on the exported file system.


Reply to this email directly or view it on GitHub
https://github.com/rear/rear/issues/680#issuecomment-152933371.

gozora commented at 2015-11-02 16:20:

@maxbur1960 no reason to be desperate ;-).
Despite I'm not running ReaR on CIFS anywhere, I've took a quick look into ReaR docu:

Do you have BACKUP_OPTIONS variable set correctly? (e.g.)

BACKUP_OPTIONS="cred=/etc/rear/.cifs"

maxbur1960 commented at 2015-11-02 17:06:

Hello, sorry for bothering you.
After the changes you suggested me, now Ubuntu Server stacks on this message

Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-LaMiaNuvola.log
Creating disk layout

and doesn't go further.

In I CTRL-C the backup I get nolog

But If I try to access via command line to the SAMBA SHARED FOLDER with

smbclient //server/share -U user%password

I have access granted and I can read and write files with no problems at all.

I'm beginning to think that REAR and its awsome feature are beyond my possibility.

Thanks in advice for answering

Massimo

Il 02/11/2015 17:20, Vladimir Gozora ha scritto:

@maxbur1960 https://github.com/maxbur1960 no reason to be desperate ;-).
Despite I'm not running ReaR on CIFS anywhere, I've took a quick look
into ReaR docu
https://github.com/rear/rear/blob/master/doc/user-guide/03-configuration.adoc#using-netfs-as-backup-strategy-internal-archive-method:

Do you have |BACKUP_OPTIONS| variable set correctly? (e.g.)

|BACKUP_OPTIONS="cred=/etc/rear/.cifs" |


Reply to this email directly or view it on GitHub
https://github.com/rear/rear/issues/680#issuecomment-153071807.

gozora commented at 2015-11-02 17:22:

sometimes it it takes a while (couple of minutes) until layout/boot ISO is created.
Are you sure you just wasn't too hasty with ^C ?

gdha commented at 2015-11-02 19:05:

@maxbur1960 Use rear with verbose option to see what is happening:

rear -v mkbackup

maxbur1960 commented at 2015-11-03 15:15:

Hello, now with SAMBA/CIFS it works!
Is it a good protocol standard or have I to study NFS until I can get
by? Since now with NFS it semms to fail 'cause is unable to mkdir to the
"rsync destination".
Mistery... Sound Japanese to me!
Anyway, I'll give a try to REAR and hope I can use as my Backup. In case
I'll make for sure a donation, that is not enought to pay your help, but
is a simple way to tell THANK YOU.
I'll keep in touch.
See you
Massimo

Il 02/11/2015 18:22, Vladimir Gozora ha scritto:

sometimes it it takes a while (couple of minutes) until layout/boot
ISO is created.
Are you sure you just wasn't too hasty with ^C ?


Reply to this email directly or view it on GitHub
https://github.com/rear/rear/issues/680#issuecomment-153089748.

gozora commented at 2015-11-03 15:51:

Hello Massimo,

Samba vs NFS is a matter of view. I personally prefer NFS as it is easier to configure, have better performance and permission/user mappings are not pain in the a** (however it have lot of cons as well). You can certainly find lot of pages on the Internet, comparing all pros and cons of both protocols, so the decision is yours ;-)

I'm happy that it works for you finally.

Good luck with your further studies!

Vlado

gdha commented at 2015-11-25 12:22:

@maxbur1960 May this be closed?

maxbur1960 commented at 2015-11-27 15:38:

Yes gentleman, it can be close. Thank you very much indeed.


[Export of Github issue for rear/rear.]