#1154 Issue closed
: ReaR uses nfs4 need to change it to use nfs3¶
Labels: support / question
, fixed / solved / done
unix1adm opened issue at 2017-01-05 13:04:¶
Relax-and-Recover (rear) Issue Template¶
Please fill in the following items before submitting a new issue (quick response is not guaranteed with free support):
- rear version (/usr/sbin/rear -V): Relax-and-Recover 1.17.2 / Git
- OS version (cat /etc/rear/os.conf or lsb_release -a): Rhel 6.8 /7.3
- rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
- Brief description of the issue
Good Day I am new to gethub and I am having an issues getting it to
mount an NFS3 partition from and AIX system.
The issue I am facing is that I am trying to mount an NFS share from an
AIX system to use this as my backup storage location. This will then be
backed up by TSM and has the most disk to take the Linux system backed
up images.
ReaR works fine if I go to a Red Hat Linux system. I have configured a test Linux system and made it the place I put the files on for testing. I am able to recover a system and use the ISO etc.
When I looked at the ReaR logs I see that it is trying to mount an NFS4. AIX is exporting and needs an NFS3 setting.
I did find this posting in Red Hat site
mount.nfs: Remote I/O error
https://access.redhat.com/solutions/61602
When I try the mount by hand it mounts fine.
mount -o vers=3 server_ip_addr:dir local_mount_point
The AIX mount works like a charm.
Is there a command line option or a file I need to change to tell ReaR
to use NFS3 not 4.
Any help on how to make this work with NFS3 would be appreciated.
Thank you in advance for your time.
Update log info:
I did see that is calls the script 👍 /usr/share/rear/prep/NETFS/default/06_mount_NETFS_path.sh
However there is no reference to the nfs mount version in there.
In the log i do see this line:
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 -t nfs -o rw,noatime
my.ip.here:/images/linux /tmp/rear.iM25Yf4jnEdrYae/outputfs' failed.
If I can add the -v nfs3 to the line that should fix it???
jsmeix commented at 2017-01-05 13:15:¶
I didn't check any details - for now only a quick hint:
For me
BACKUP_OPTIONS="nfsvers=3,nolock"
always worked, see the examples in
usr/share/rear/conf/examples/
jsmeix commented at 2017-01-05 13:18:¶
FYI:
https://access.redhat.com/solutions/61602
is unaccessible for me because for me it shows
Subscriber exclusive content A Red Hat subscription provides unlimited access to our knowledgebase...
I do not have a Red Hat subscription.
unix1adm commented at 2017-01-05 13:41:¶
Ok sorry about that. Here is the document.
Also I dont have this dir on the system
"usr/share/rear/conf/examples/"
There is one usr/share/rear/conf/templates
I am assuming this is the same.
If it is not OK to repost this sorry and you can let me know /remove it.
While mounting AIX nfs share on RHEL6 error "mount.nfs: Remote I/O
error" is seen
Solution Verified - Updated May 23 2016 at 12:48 PM - English
Environment
NFS Server: IBM System p5 51A, OS - AIX
IBM X3950
NFS Client: Red Hat Enterprise Linux(RHEL) 6 - All Releases
Issue
While mounting AIX nfs shares, the following error is obtained:
Raw
mount.nfs: Remote I/O error
Resolution
Aix NFS server with NFSv4 protocol support
This may be due to a misconfiguration of NFSv4 on the Aix NFS server. For more information, see https://access.redhat.com/solutions/1463043
Aix NFS server without NFSv4 protocol support
To resolve the issue, mount the nfs share with an option vers=3. Eg:
Raw
# mount -o vers=3 server_ip_addr:dir local_mount_point
This option can be added to /etc/fstab file so that the share will be
mounted automatically. See Mounting NFS File Systems using /etc/fstab in
the Storage Administration Guide for more details.
Root Cause
The NFS client tries to use NFSv4 on Red Hat Enterprise Linux 6 by default. When talking to the old (AIX-based) NFS servers, in order to be able to mount the NFS shares we need to add options -o vers=3.
unix1adm commented at 2017-01-05 13:46:¶
I ran it with the modifications that were suggested.
rear -d -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-myserver.log
mkdir: created directory `/var/lib/rear/output'
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
ERROR: Mount command 'mount -v -t nfs -o rw,noatime my_ip:/images/linux
/tmp/rear.R7yjcESHBvykqRl/outputfs' failed.
Aborting due to an error, check /var/log/rear/rear-myserver.log for
details
You should also rm -Rf /tmp/rear.R7yjcESHBvykqRl
Terminated
unix1adm commented at 2017-01-05 13:47:¶
From the log file. Looks like it is not passing the options as I was
hoping.
notice no version 3 on the command line.
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:132
StopIfError
Message: Mount command 'mount -v -t nfs -o rw,noatime
10.110.4.205:/images/linux /tmp/rear.R7yjcESHBvykqRl/outputfs' failed.
unix1adm commented at 2017-01-05 13:48:¶
This is my /etc/rear/local.conf file
OUTPUT=ISO
BACKUP_OPTIONS="nfsvers=3,nolock"
OUTPUT_URL=nfs://my_ip/images/linux
BACKUP=NETFS
BACKUP_URL=nfs://my_ip/images/linux
SSH_ROOT_PASSWORD="fp!Gr0up"
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/media'
'/var/tmp' '/var/crash')
NETFS_KEEP_OLD_BACKUP_COPY=
unix1adm commented at 2017-01-05 13:59:¶
I looked in here /usr/share/rear/conf and the only place I can find for this BACKUP_OPTIONS= is in this file default.conf
From the file
# BACKUP=RBME ## # This mode allows restoring a RBME backup from NFS shares. # As NFSv4 is not fully supported with rear (yet) it is safer to # use BACKUP_OPTIONS="nfsvers=3,nolock" in the local.conf file. # Also, do not forget to open the TCP/UDP ports on the NFS server (iptables)!
jsmeix commented at 2017-01-05 14:02:¶
For me it works with this etc/rear/local.conf
OUTPUT=ISO BACKUP=NETFS BACKUP_OPTIONS="nfsvers=3,nolock" BACKUP_URL=nfs://10.160.4.244/nfs
when I run "rear -d -D mkrescue"
I get in my log file (excerpts)
++ BACKUP_OPTIONS=nfsvers=3,nolock ++ OUTPUT_OPTIONS=nfsvers=3,nolock ++ mount_url nfs://10.160.4.244/nfs /tmp/rear.D3Oix3D2tXnQ5nO/outputfs nfsvers=3,nolock ++ local options=nfsvers=3,nolock ++ mount_cmd='mount -v -t nfs -o nfsvers=3,nolock 10.160.4.244:/nfs /tmp/rear.D3Oix3D2tXnQ5nO/outputfs' ... +++ mount -v -t nfs -o nfsvers=3,nolock 10.160.4.244:/nfs /tmp/rear.D3Oix3D2tXnQ5nO/outputfs ... +++ mount -v -t nfs -o nfsvers=3,nolock 10.160.4.244:/nfs /tmp/rear.D3Oix3D2tXnQ5nO/outputfs
But when I specify an additional OUTPUT_URL
OUTPUT=ISO BACKUP=NETFS BACKUP_OPTIONS="nfsvers=3,nolock" BACKUP_URL=nfs://10.160.4.244/nfs OUTPUT_URL=nfs://10.160.4.244/nfs
then I get after "rear -d -D mkrescue" in my log
++ BACKUP_OPTIONS=nfsvers=3,nolock ++ mount_url nfs://10.160.4.244/nfs /tmp/rear.TyKAjkNUJMIPVVx/outputfs nfsvers=3,nolock ++ local options=nfsvers=3,nolock ... +++ mount -v -t nfs -o nfsvers=3,nolock 10.160.4.244:/nfs /tmp/rear.TyKAjkNUJMIPVVx/outputfs ... +++ mount -v -t nfs -o rw,noatime 10.160.4.244:/nfs /tmp/rear.TyKAjkNUJMIPVVx/outputfs
Note that "OUTPUT_OPTIONS=nfsvers=3,nolock" is missing
and then "nfsvers=3,nolock" is missing for the second
mount command.
jsmeix commented at 2017-01-05 14:08:¶
Accordingly with
OUTPUT=ISO BACKUP=NETFS BACKUP_OPTIONS="nfsvers=3,nolock" BACKUP_URL=nfs://10.160.4.244/nfs OUTPUT_URL=nfs://10.160.4.244/nfs OUTPUT_OPTIONS="nfsvers=3,nolock"
both mount commands have "nfsvers=3,nolock"
but I think it is simpler to only specify
BACKUP_URL and BACKUP_OPTIONS.
See usr/share/rear/conf/default.conf
# specify the location of the output # when OUTPUT_URL is not specified it inherits the BACKUP_URL value OUTPUT_URL= OUTPUT_OPTIONS=
jsmeix commented at 2017-01-05 14:13:¶
I assume the issue is solved by my above comments
so that I close it - if not @unix1adm you can reopen it.
unix1adm commented at 2017-01-05 14:16:¶
No it was not resolved. I will try this again. i still have the issue.
I just reread this and saw you added a 2nd option for the output url.
I made the change and ran a test.
Seems to have backed up as expected.
Thank you so much for the help. Made my day :)
[Export of Github issue for rear/rear.]