#973 Issue closed: mount command for cifs is successful, but rear is showing it failed ( 0 != 0) and fails

Labels: support / question, won't fix / can't fix / obsolete

ksquires opened issue at 2016-08-19 19:04:

Relax-and-Recover (rear) Issue Template

Please fill in the following items before submitting a new issue:

  • rear version (/usr/sbin/rear -V): Relax-and-Recover 1.17.2 / Git
  • OS version (cat /etc/rear/os.conf or lsb_release -a):
    OS_VENDOR=RedHatEnterpriseServer
    OS_VERSION=7
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
OUTPUT=ISO
OUTPUT_URL=cifs://192.168.1.131/backups
BACKUP=NETFS
BACKUP_URL=cifs://192.168.1.131/backups
SSH_ROOT_PASSWORD="hidden"
NETFS_KEEP_OLD_BACKUP_COPY=
BACKUP_OPTIONS="cred=/etc/rear/.cifs"

++ StopIfError 'Mount command '\''mount -v -o cred=/etc/rear/.cifs //192.168.1.131/backups /tmp/rear.H4BQSEvRnMGJjOn/outputfs'\'' failed.'
++ ((  0 != 0  ))

the mount command works manually, but as you can see, rear is saying 0 != 0 and calling it failed

gdha commented at 2016-08-20 11:02:

Rename /etc/rear/.cifsinto /etc/rear/cifs and retry. In 1.19 the dot file will be supported. The documentation was saying .cifs, but it should have been cifs

ksquires commented at 2016-08-20 15:09:

so i renamed /etc/rear/.cifs to /etc/rear/cifs
updated the following line in /etc/rear/local.conf
BACKUP_OPTIONS="cred=/etc/rear/cifs"

and now it seems to not recognize the cred= at all, and tries to mount using guest:
ERROR: Mount command 'mount -v -o rw,noatime,guest //192.168.1.131/backups /tmp/rear.fiajS97vY00vJxr/outputfs' failed.

gdha commented at 2016-08-21 10:48:

@ksquires please check the rear-.log file - perhaps the real reason for not using the BACKUP_OPTIONS is shown in there?

ksquires commented at 2016-08-23 14:19:

looks like the same (0!=0) issue:
++ StopIfError 'Mount command '''mount -v -o cred=/etc/rear/cifs //192.168.1.131/backups /tmp/rear.BOI3rMrL0vt5CmF/outputfs''' failed.'
++ (( 0 != 0 ))

gdha commented at 2016-09-05 16:00:

@ksquires I cannot reproduce your problem...

++ mount_cmd='mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs'
++ Log 'Mounting with '\''mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs'\'''
++ test 1 -gt 0
+++ Stamp
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ echo '2016-09-05 17:55:49.758768611 Mounting with '\''mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs'\'''
2016-09-05 17:55:49.758768611 Mounting with 'mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs'
++ eval mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs
+++ mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs
domain=MYGROUP
mount.cifs kernel mount options: ip=192.168.33.15,unc=\\server\homes,user=vagrant,,domain=MYGROUP,pass=********
++ StopIfError 'Mount command '\''mount -v -o cred=/etc/rear/.cifs //server/homes /tmp/rear.YNLgWyVZcvMPLDy/outputfs'\'' failed.'
++ ((  0 != 0  ))
++ AddExitTask 'umount -f -v '\''/tmp/rear.YNLgWyVZcvMPLDy/outputfs'\'' >&2'

Please investigate your log file in-depth - there must be another reason

gdha commented at 2016-09-05 16:01:

@ksquires Perhaps remove OUTPUT_URL=cifs://192.168.1.131/backups as it is the same as the BACKUP_URL anyway?

gdha commented at 2016-09-29 09:33:

No feedback received and we cannot reproduce this case - we will close it - it can be re-opened if needed


[Export of Github issue for rear/rear.]