#2559 Issue closed: Kaspersky Endpoint Security has to be stopped before running ReaR otherwise "ERROR: Unmounting '/tmp/rear.XXX/outputfs' failed."

Labels: support / question, fixed / solved / done

blackjack65 opened issue at 2021-01-28 19:54:

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

  • OS version: Debian 10.7 buster

  • ReaR configuration files ("/etc/rear/local.conf"):

OUTPUT=USB
OUTPUT_URL=usb:///dev/disk/by-label/REAR-EFI
BACKUP=NETFS
BACKUP_URL=usb:///dev/disk/by-label/REAR-EFI
BACKUP_RPOG_EXCLUDE=( '/home/*' )
USB_DEVICE_FILESYSTEM_LABEL=REAR-EFI
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    PC

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    X86
    Prozessor Intel Xeon E-2224 / 3,4 GHz
    RAM 1 x 16 GB (DDR4)

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

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

  • Storage layout ("lsblk"):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 223,6G  0 disk
├─sda1   8:1    0 186,3G  0 part /
├─sda2   8:2    0  22,4G  0 part [SWAP]
└─sda3   8:3    0  14,9G  0 part /boot/efi
sdb      8:16   0   1,8T  0 disk
└─sdb1   8:17   0   1,8T  0 part /home
sdc      8:32   1 465,8G  0 disk
└─sdc1   8:33   1 465,8G  0 part
sdd      8:48   1 468,8G  0 disk
├─sdd1   8:49   1   200M  0 part
└─sdd2   8:50   1 468,6G  0 part /tmp/rear-efi.YE74S
  • Description of the issue (ideally so that others can reproduce it):
    Aborting due to an error, check /var/log/rear/rear-xxx.log for details
    Exiting rear mkbackup (PID 27631) and its descendant processes
    Running exit tasks

  • Workaround, if any:
    ???

  • Attachments, as applicable ("end" of log file):

rear-xxx.log

....
2021-01-28 19:52:53.681058087 Writing MBR of type msdos to /dev/sdd
1+0 records in
1+0 records out
440 bytes copied, 0.0027457 s, 160 kB/s
2021-01-28 19:52:53.707149784 Including output/default/940_grub2_rescue.sh
2021-01-28 19:52:53.726437462 Including output/default/940_grub_rescue.sh
2021-01-28 19:52:53.734410947 Including output/default/950_copy_result_files.sh
2021-01-28 19:52:53.745845699 Copying resulting files to usb location
'/usr/share/rear/conf/templates/RESULT_usage_USB.txt' -> '/tmp/rear.Nam5Ymoj1A4mdx4/tmp/README'
2021-01-28 19:52:53.767472238 Saving /var/log/rear/rear-xxx.log as rear-xxx to usb location
2021-01-28 19:52:53.769111297 Copying result files '/tmp/rear.Nam5Ymoj1A4mdx4/tmp/VERSION /tmp/rear.Nam5Ymoj1A4mdx4/tmp/README /tmp/rear.Nam5Ymoj1A4mdx4/tmp/rear-xxx.log' to /tmp/rear.Nam5Ymoj1A4mdx4/outputfs/xxx at usb location
'/tmp/rear.Nam5Ymoj1A4mdx4/tmp/VERSION' -> '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs/xxx/VERSION'
'/tmp/rear.Nam5Ymoj1A4mdx4/tmp/README' -> '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs/xxx/README'
'/tmp/rear.Nam5Ymoj1A4mdx4/tmp/rear-xxxlog' -> '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs/xxx/rear-xxx.log'
2021-01-28 19:52:53.796584750 Including output/default/950_email_result_files.sh
2021-01-28 19:52:53.807310632 Including output/default/970_remove_lock.sh
2021-01-28 19:52:53.819177754 Including output/default/980_umount_output_dir.sh
2021-01-28 19:52:53.826193113 Unmounting '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs'
umount: /tmp/rear.Nam5Ymoj1A4mdx4/outputfs: target is busy.
2021-01-28 19:52:53.843281608 Forced unmount of '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs'
umount: /tmp/rear.Nam5Ymoj1A4mdx4/outputfs: target is busy.
2021-01-28 19:52:53.846670535 Unmounting '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs' failed.
2021-01-28 19:52:53.848002260 ERROR: Unmounting '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs' failed.
==== Stack trace ====
Trace 0: /usr/sbin/rear:543 main
Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:24 WORKFLOW_mkbackup
Trace 2: /usr/share/rear/lib/framework-functions.sh:101 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:49 Source
Trace 4: /usr/share/rear/output/default/980_umount_output_dir.sh:11 source
Trace 5: /usr/share/rear/lib/global-functions.sh:489 umount_url
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:371 StopIfError
Message: Unmounting '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs' failed.
== End stack trace ==
2021-01-28 19:52:53.891845089 Exiting rear mkbackup (PID 27631) and its descendant processes
2021-01-28 19:52:54.911855870 rear,27631 /usr/sbin/rear -v mkbackup
  `-rear,9859 /usr/sbin/rear -v mkbackup
      `-pstree,9860 -Aplau 27631
/usr/share/rear/lib/_input-output-functions.sh: line 157: kill: (9863) - No such process
2021-01-28 19:52:54.935974659 Running exit tasks
umount: /tmp/rear.Nam5Ymoj1A4mdx4/outputfs (/dev/sdd2) unmounted
removed directory '/tmp/rear.Nam5Ymoj1A4mdx4/outputfs'
2021-01-28 19:52:55.023832472 Finished in 77 seconds
2021-01-28 19:52:55.025485882 Removing build area /tmp/rear.Nam5Ymoj1A4mdx4
removed directory '/tmp/rear.Nam5Ymoj1A4mdx4'
2021-01-28 19:52:55.169671651 End of program reached

xxx = (like) Server-33

  • Additional Information:
    /dev/sdd USB-Stick 500 GiB (Intenso)
root@xxx:~# rear format -v -- --efi /dev/sdd
Relax-and-Recover 2.4 / Git
Using log file: /var/log/rear/rear-xxx.log
USB device /dev/sdd is not formatted with ext2/3/4 or btrfs filesystem
Type exactly 'Yes' to format /dev/sdd with ext3 filesystem
(default 'No' timeout 300 seconds)
Yes
Repartitioning '/dev/sdd'
The --efi toggle was used with format - making an EFI bootable device '/dev/sdd'
Creating GUID partition table (GPT) on '/dev/sdd'
Creating EFI system partition with size 200 MiB aligned at 8 MiB on '/dev/sdd'
Creating ReaR data partition up to 100% of '/dev/sdd'
Setting 'boot' flag on /dev/sdd
Creating vfat filesystem on EFI system partition on '/dev/sdd1'
Creating ext3 filesystem with label 'REAR-EFI' on '/dev/sdd2'
Adjusting filesystem parameters on '/dev/sdd2'
Exiting rear format (PID 18989) and its descendant processes
Running exit tasks
  • What did I wrong?

jsmeix commented at 2021-01-29 10:49:

Umounting fails because

umount: /tmp/rear.Nam5Ymoj1A4mdx4/outputfs: target is busy.

but I cannot know why it is still in use by something.

Your lsblk output

sdd      8:48   1 468,8G  0 disk
├─sdd1   8:49   1   200M  0 part
└─sdd2   8:50   1 468,6G  0 part /tmp/rear-efi.YE74S

indicates that you may have your USB disk already mounted
and that could interfere with what ReaR tries to do.

By the way:
ReaR version 2.4 is rather old - from June 2018
and many changes were done since then, cf.
https://github.com/rear/rear/blob/master/doc/rear-release-notes.txt
so you may better first and foremost upgrade to our current version
or at least "Testing current ReaR upstream GitHub master code" cf.
https://en.opensuse.org/SDB:Disaster_Recovery#Testing_current_ReaR_upstream_GitHub_master_code

blackjack65 commented at 2021-01-29 11:12:

Thank you very much for your info (sorry i'm german an my english ist rusty)

The lsblk output was made after rear has stopped. The only i did befor was to run rear format and there befor sdd was unmount.
But I did not unmount the USB stick between "format" and "mkbackup".

Anyway, i try to install latest version an run rear again.
Thanky very much

blackjack65 commented at 2021-01-29 13:49:

Additional Info:

Kaspersky Endpoint Security 11 for LINUX has to be stopped befor running ReaR.

jsmeix commented at 2021-01-29 14:02:

@blackjack65
thank you for your feedback what the actual root cause was!

gdha commented at 2021-01-29 14:10:

Additional Info:

Kaspersky Endpoint Security 11 for LINUX has to be stopped befor running ReaR.

@blackjack65 How did you found this out? Any specifi error reported by Kaspersky EPS?

blackjack65 commented at 2021-01-29 14:35:

First ReaR Version 2.6 was installed
next run of ReaR caused same ERROR: Unmounting ...
lsof /dev/sdd2 showed no process on /dev/sdd2 (sorry for my english...)
What process might on runtime of ReaR interfere with ReaR (or any other)?
Therefor I stopped Kaspersky (systemctl stop kesl) und run ReaR again.
Now ReaR runs (but recover is not proofed yet)

Probably Kaspersky interfere with ReaR, because Kaspersky runs the AntiCryptor task on the server.
But I really don't know, sorry, it is (and was) only a guess...

jsmeix commented at 2021-01-29 15:12:

Another idea what could make a USB drive "in use"
that I experience on my homeoffice laptop with openSUSE Leap 15.2
and its default Gnome desktop stuff:

Each time I plug in a USB drive it gets used by some automatism that mounts it
and provides a Gnome desktop notification asking what I like to do with it.

Unfortunately ;-) I want to use it for ReaR so I need to umount it
to get rid of that automatism that had mounted it automatically.


[Export of Github issue for rear/rear.]