Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReaR backup fails due to "dd" input/ouput error #2551

Closed
danydany1 opened this issue Jan 5, 2021 · 3 comments
Closed

ReaR backup fails due to "dd" input/ouput error #2551

danydany1 opened this issue Jan 5, 2021 · 3 comments
Assignees
Labels
no-issue-activity not ReaR / invalid The root cause is not in the ReaR code or ReaR is misused. support / question

Comments

@danydany1
Copy link

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: Relax-and-Recover 2.6 / 2020-06-17

  • OS version: CentOS Linux release 7.8.2003 (Core)

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

OUTPUT=ISO
OUTPUT_URL=cifs://10.236.9.216/sdnc/Backup_serveurs_stations/a78c-stf-tst
OUTPUT_OPTIONS="vers=3.0,cred=/root/.smbcredentials"
BACKUP=NETFS
BACKUP_URL=cifs://10.236.9.216/sdnc/Backup_serveurs_stations/a78c-stf-tst
BACKUP_OPTIONS="vers=3.0,cred=/root/.smbcredentials"
BACKUP_PROG_EXCLUDE+=( '/media' '/var/tmp' '/var/crash' '/mnt' '/tmp' )
UEFI_BOOTLOADER=/boot/efi/EFI/centos/shimx64.efi
COPY_AS_IS+=( /root/.smbcredentials )
BACKUP_PROG_COMPRESS_OPTIONS=("--gzip")
BACKUP_PROG_COMPRESS_SUFFIX=".gz"
  • Hardware or virtual machine: VM Microsoft Hyper-V 10.0.14393.0

  • System architecture : x86_64

  • Firmware : UEFI

  • Description of the issue (ideally so that others can reproduce it):
    Sometimes I have the following error using "rear -v -d mkbackup":

....
2021-01-05 09:26:01.558388400 Including backup/default/010_pre_backup_script.sh
2021-01-05 09:26:01.563060400 Including backup/NETFS/default/100_mount_NETFS_path.sh
mkdir: created directory '/tmp/rear.b04D88M3KpAnOXY/outputfs'
2021-01-05 09:26:01.566031300 Added 'rmdir -v /tmp/rear.b04D88M3KpAnOXY/outputfs >&2' as an exit task
2021-01-05 09:26:01.571774900 Mounting with 'mount -v -o vers=3.0,cred=/root/.smbcredentials //10.236.9.216/sdnc/Backup_serveurs_stations/a78c-stf-tst /tmp/rear.b04D88M3KpAnOXY/outputfs'
domain=sdnc.dgfip
mount.cifs kernel mount options: ip=10.236.9.216,unc=\\10.236.9.216\sdnc,vers=3.0,user=stf_tst,domain=sdnc.dgfip,prefixpath=Backup_serveurs_stations/a78c-stf-tst,pass=********
2021-01-05 09:26:01.642590600 Added 'umount -f -v '/tmp/rear.b04D88M3KpAnOXY/outputfs' >&2' as an exit task
2021-01-05 09:26:01.654183400 Including backup/NETFS/default/150_save_copy_of_prefix_dir.sh
2021-01-05 09:26:01.659979000 Including backup/NETFS/default/200_check_rsync_relative_option.sh
2021-01-05 09:26:01.664195000 Added option '--relative' to the BACKUP_RSYNC_OPTIONS array during mkbackup workflow
2021-01-05 09:26:01.669191300 Including backup/NETFS/default/200_make_prefix_dir.sh
2021-01-05 09:26:01.686730800 Including backup/NETFS/default/250_create_lock.sh
2021-01-05 09:26:01.720388100 Including backup/NETFS/GNU/Linux/310_stop_selinux.sh
2021-01-05 09:26:01.724401800 Temporarily stopping SELinux enforce mode with BACKUP=NETFS and BACKUP_PROG=tar backup
2021-01-05 09:26:01.730297400 Including backup/NETFS/default/400_create_include_exclude_files.sh
2021-01-05 09:26:01.736037000 Including backup/NETFS/default/500_make_backup.sh
2021-01-05 09:26:01.743548600 Making backup (using backup method NETFS)
2021-01-05 09:26:01.745494700 Backup include list (backup-include.txt contents):
2021-01-05 09:26:01.747274900   /app
2021-01-05 09:26:01.749046700   /produits
2021-01-05 09:26:01.750796400   /
2021-01-05 09:26:01.752550500   /tmp
2021-01-05 09:26:01.754319600   /var
2021-01-05 09:26:01.756070500   /var/log
2021-01-05 09:26:01.757790400   /boot/efi
2021-01-05 09:26:01.759537200   /boot
2021-01-05 09:26:01.761257100 Backup exclude list (backup-exclude.txt contents):
2021-01-05 09:26:01.763041700   /tmp/*
2021-01-05 09:26:01.764783700   /dev/shm/*
2021-01-05 09:26:01.766551900   /var/lib/rear/output/*
2021-01-05 09:26:01.768262200   /media
2021-01-05 09:26:01.769994500   /var/tmp
2021-01-05 09:26:01.771729500   /var/crash
2021-01-05 09:26:01.773448200   /mnt
2021-01-05 09:26:01.775165100   /tmp
2021-01-05 09:26:01.776880300   /tmp/rear.b04D88M3KpAnOXY
2021-01-05 09:26:01.778869600 Creating tar archive '/tmp/rear.b04D88M3KpAnOXY/outputfs/a78c-stf-tst/backup.tar.gz'
2021-01-05 09:26:01.791372500 tar --warning=no-xdev --sparse --block-number --totals --verbose --no-wildcards-match-slash --one-file-system --ignore-failed-read --anchored --xattrs --xattrs-include=security.capability --xattrs-include=security.selinux --acls --gzip -X /tmp/rear.b04D88M3KpAnOXY/tmp/backup-exclude.txt -C / -c -f - /app /produits / /tmp /var /var/log /boot/efi /boot /var/log/rear/rear-a78c-stf-tst.log | dd of=/tmp/rear.b04D88M3KpAnOXY/outputfs/a78c-stf-tst/backup.tar.gz bs=1M
stat: missing operand
Try 'stat --help' for more information.
2021-01-05 09:39:44.297981000 ERROR: openssl failed with return code 1 and below output:
  ---snip---

  ----------
This means that the archiving process ended prematurely, or did
not even start. As a result it is unlikely you can recover this
system properly. Relax-and-Recover is therefore aborting execution.

===== Stack trace =====
Trace 0: /usr/sbin/rear:541 main
Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:26 WORKFLOW_mkbackup
Trace 2: /usr/share/rear/lib/framework-functions.sh:116 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:56 Source
Trace 4: /usr/share/rear/backup/NETFS/default/500_make_backup.sh:313 source
=== End stack trace ===
2021-01-05 09:39:44.311832700 Exiting rear mkbackup (PID 33349) and its descendant processes ...
2021-01-05 09:39:47.360702500 rear,33349 /usr/sbin/rear -v -d mkbackup
  `-rear,61301 /usr/sbin/rear -v -d mkbackup
      `-pstree,61302 -Aplau 33349
/usr/share/rear/lib/_input-output-functions.sh: line 151: kill: (61305) - No such process
2021-01-05 09:39:47.443393100 Running exit tasks
2021-01-05 09:39:47.445388700 Exit task 'umount -f -v '/tmp/rear.b04D88M3KpAnOXY/outputfs' >&2'
umount: /tmp/rear.b04D88M3KpAnOXY/outputfs (//10.236.9.216/sdnc/Backup_serveurs_stations/a78c-stf-tst) unmounted
2021-01-05 09:39:48.036068200 Exit task 'rmdir -v /tmp/rear.b04D88M3KpAnOXY/outputfs >&2'
rmdir: removing directory, '/tmp/rear.b04D88M3KpAnOXY/outputfs'
2021-01-05 09:39:48.049797900 Exit task 'cleanup_build_area_and_end_program'
2021-01-05 09:39:48.051671000 Finished in 927 seconds
2021-01-05 09:39:48.053688400 You should also rm -Rf /tmp/rear.b04D88M3KpAnOXY
2021-01-05 09:39:48.056066700 End of program reached
2021-01-05 09:39:48.058616400 Exit task '(( EXIT_FAIL_MESSAGE )) && echo 'rear mkbackup failed, check /var/log/rear/rear-a78c-stf-tst.log for details' 1>&8'
2021-01-05 09:39:48.060294100 Exit task 'exec 8>&-'
2021-01-05 09:39:48.061967200 Exit task 'exec 7>&-'
2021-01-05 09:39:48.063741800 Exit task 'exec 6<&-'
2021-01-05 09:39:48.065459200 Exit task ''

At the end of the file /tmp/rear.RSoiKQtYLwt4v25/tmp/backup.log, I get:

...
block 35287237: /boot/config-3.10.0-1127.8.2.el7.x86_64
block 35287540: /boot/symvers-3.10.0-1127.8.2.el7.x86_64.gz
block 35288169: /boot/vmlinuz-3.10.0-1127.8.2.el7.x86_64
block 35301381: /boot/initramfs-3.10.0-1127.8.2.el7.x86_64.img
block 35344020: /boot/initramfs-0-rescue-dfa2d891ef0f4dde962104bac34b6d27.img
block 35474153: /boot/vmlinuz-0-rescue-dfa2d891ef0f4dde962104bac34b6d27
block 35487365: /boot/initramfs-3.10.0-327.28.3.el7.x86_64.img
block 35527751: /var/log/rear/rear-a78c-stf-tst.log
Total bytes written: 18190213120 (17GiB, 22MiB/s)
dd: closing output file '/tmp/rear.b04D88M3KpAnOXY/outputfs/a78c-stf-tst/backup.tar.gz': Input/output error

Maybe there's some issue related to the CIFS share where the backup is stored.

  • Workaround, if any:
    None for the moment.
@gdha gdha self-assigned this Jan 12, 2021
@gdha
Copy link
Member

gdha commented Jan 12, 2021

@danydany1 a dd I/O error can have several reasons why it happens:

  • network glitch with CIFS
  • out-of-space issue
    We do not expect this is a ReaR issue as such, but rather environmental one.

@danydany1
Copy link
Author

Yes you're right.

I use Rear backup in crontab.
I tried to change the moment when rear backup is launched and it works better.
I have probably a CIFS or a network issue so I try to Rear backup when network is less "busy".
I have to inspect further and check exactly why "dd" sometimes fails.

@gdha gdha added the not ReaR / invalid The root cause is not in the ReaR code or ReaR is misused. label Jan 22, 2021
@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity not ReaR / invalid The root cause is not in the ReaR code or ReaR is misused. support / question
Projects
None yet
Development

No branches or pull requests

3 participants