#2202 Issue closed: 2.4 CIFS Mount fail

Labels: support / question, fixed / solved / done

chumunga opened issue at 2019-08-06 22:15:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    2.4 / Git

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    OS_VENDOR=RedHatEnterpriseServer
    OS_VERSION=7

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
    OUTPUT=ISO
    BACKUP=NETFS
    BACKUP_PROG=tar
    BACKUP_TYPE=incremental
    FULLBACKUPDAY="Mon"
    FULLBACKUP_OUTDATED_DAYS=5
    BACKUP_INTEGRITY_CHECK=1
    #--- Backup Destination
    BACKUP_URL=cifs://192.168.0.95/VMs
    BACKUP_OPTIONS="cred=/root/.confid/.cifs"

  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    KVM Guest

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86_64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    BIOS and GRUB

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    local disk

  • Description of the issue (ideally so that others can reproduce it):
    According to the /var/log/rear/rear.log file the error occurs when rear try to mount the backup destination.

race 6: /usr/share/rear/lib/_input-output-functions.sh:372 StopIfError
++ echo 'Message: Mount command '''mount -v -o cred=/root/.confid/.cifs
//192.168.0.95/VMs
/tmp/rear.siQhBqYx0ObcX4a/outputfs''' failed.'
Message: Mount command 'mount -v -o cred=/root/.confid/.cifs
//192.168.0.95/VMs
/tmp/rear.siQhBqYx0ObcX4a/outputfs' failed.

I am able to run the command without an issue
mount.cifs -o cred=/root/.confid/.cifs //192.168.0.95/VMs /mnt/test
or
mount -v -o cred=/root/.confid/.cifs //192.168.0.95/VMs /mnt/test

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
    debug.log

jsmeix commented at 2019-08-07 12:05:

@chumunga
the actual error in your 'debug.log' file is

+++ mount -v -o $'credentials=/root/.confid/.cifs\r' $'//192.168.0.95/VMs\r' /tmp/rear.OGqvl1K61fL8dT2/outputfs
error 2 (No such file or directory) opening credential file /root/.confid/.cifs

chumunga commented at 2019-08-07 16:16:

Correct I saw that, however I can run the mount commanded independently using that same credential file without an issue.

mount.cifs -o cred=/root/.confid/.cifs //192.168.0.95/VMs /mnt/test
or
mount -v -o cred=/root/.confid/.cifs //192.168.0.95/VMs /mnt/test

chumunga commented at 2019-08-08 16:35:

Any ideas?

chumunga commented at 2019-08-08 18:39:

I also tried rear -v mkbackuponly and I get a different error right, strange (let me know if you want the debug file)
Annotation 2019-08-08
113903

gozora commented at 2019-08-08 19:39:

@chumunga
Are you sure that local.conf you've provided in issue description and one you've used are one and the same file ?
Because I can see in your debug log:

+ source /etc/rear/local.conf
++ OUTPUT=$'ISO\r'
++ BACKUP=$'NETFS\r'
++ BACKUP_PROG=$'tar\r'
++ BACKUP_TYPE=$'incremental\r'
++ FULLBACKUPDAY=$'Mon\r'
++ FULLBACKUP_OUTDATED_DAYS=$'5\r'
++ BACKUP_INTEGRITY_CHECK=$'1\r'
++ BACKUP_URL=$'cifs://192.168.0.95/VMs\r'
++ BACKUP_OPTIONS=$'credentials=/root/.confid/.cifs\r'

Notice the $ and \r ...

Can it be that your editor is somehow "misconfigured" ?

V.

chumunga commented at 2019-08-09 16:13:

huh....interesting i wonder if it has something to do with the fact that i wrote it in windows notepadd++ then transferred the file via WinSCP I will type the file out and see what happens.

gozora commented at 2019-08-09 16:29:

Well yes, this can be the problem indeed.

v.

chumunga commented at 2019-08-09 17:46:

That was it, i manually typed out the local.conf file and the backup works. I am glad since I have 3 more servers that is having the same issues.

jsmeix commented at 2019-08-12 12:42:

@gozora
thank you for taking such little details seriously.
I had noticed that strange looking values but I thought
it is not real but just some kind of "optical noise".

chumunga commented at 2019-08-14 18:26:

Thanks again, I thought that was just the debug file format and wasn't literally what was being thrown at the command line.

And if anyone ever runs into a similar situation, you can use a program called dos2unix


[Export of Github issue for rear/rear.]