Mounting image failed

After upgrading server from 2.1.20 to 2.2.8, mounting image (“Compressed VHD” format) failed with error :

Nothing help in server’s log …

However, it works through CLI :

root@urb-vsnas:~# su urbackup
urbackup@urb-vsnas:/root$ urbackup_mount_helper test
MOUNT TEST OK
urbackup@urb-vsnas:/root$ urbackup_mount_helper mount SV2K16 180313-1332_Image_C Image_C_180313-1332.vhdz
guestunmount: /media/backups/SV2K16/180313-1332_Image_C/contents is not mounted: fusermount: entry for /media/backups/SV2K16/180313-1332_Image_C/contents not found in /etc/mtab
fusermount: entry for /media/backups/SV2K16/180313-1332_Image_C/device not found in /etc/mtab
fusermount: entry for /media/backups/SV2K16/180313-1332_Image_C/device not found in /etc/mtab
Loading FUSE kernel module...
Starting VHD background process...
Waiting for background process to become available...
Mounting...
Mounted successfully.
urbackup@urb-vsnas:/root$ls -l  /media/backups/SV2K16/180313-1332_Image_C/contents
total 393777
-rwxrwxrwx 1 urbackup root    384322 juil. 16  2016 bootmgr
-rwxrwxrwx 1 urbackup root         1 juil. 16  2016 BOOTNXT
drwxrwxrwx 1 urbackup root      4096 avril  7  2017 DeltaCopy
lrwxrwxrwx 2 urbackup root        60 avril  6  2017 Documents and Settings -> /sysroot/Users
drwxrwxrwx 1 urbackup root      4096 mai   18  2017 driverview-x64
-rwxrwxrwx 2 urbackup root     58897 mai   18  2017 driverview-x64.zip
drwxrwxrwx 1 urbackup root      4096 mai   18  2017 installeddriverslist-x64
-rwxrwxrwx 2 urbackup root     69136 mai   18  2017 installeddriverslist-x64.zip
-rwxrwxrwx 1 urbackup root 402653184 mars  13 13:27 pagefile.sys
drwxrwxrwx 1 urbackup root         0 juil. 16  2016 PerfLogs
drwxrwxrwx 1 urbackup root      4096 déc.  22 12:23 ProgramData
drwxrwxrwx 1 urbackup root      4096 sept.  7  2017 Program Files
drwxrwxrwx 1 urbackup root      4096 juil. 16  2016 Program Files (x86)
drwxrwxrwx 1 urbackup root         0 avril  6  2017 Recovery
drwxrwxrwx 1 urbackup root         0 avril  7  2017 $Recycle.Bin
drwxrwxrwx 1 urbackup root         0 avril  7  2017 ReplicaNas21
drwxrwxrwx 1 urbackup root      4096 mars  13 13:32 System Volume Information
drwxrwxrwx 1 urbackup root      4096 avril  7  2017 Users
drwxrwxrwx 1 urbackup root     24576 janv.  9 18:26 Windows
urbackup@urb-vsnas:/root$

Backups are stored on a NFS share.

Any suggestions ?

Regards,

Hi Tom,
Do you have “user_allow_other” in /etc/fuse.conf ? If yes, can you do a stat on /boot/vmlinuz-* and make sure the access is 604 (read to other).

Sam

Hi Sam,
Thanks for reply.
user_allow_other was commented in /etc/fuse.conf, i commented it out but does not change anything.
And access on /boot/vmlinuz-* is 644 :

root@urb-vsnas:~# stat /boot/vmlinuz-*
  Fichier : /boot/vmlinuz-3.16.0-4-amd64
   Taille : 3129184   	Blocs : 6112       Blocs d'E/S : 4096   fichier
Périphérique : fe01h/65025d	Inœud : 522299      Liens : 1
Accès : (0644/-rw-r--r--)  UID : (    0/    root)   GID : (    0/    root)
 Accès : 2017-10-17 10:14:40.694204433 +0200
Modif. : 2017-08-16 07:13:30.000000000 +0200
Changt : 2017-09-07 19:02:54.100000000 +0200
  Créé : -
  Fichier : /boot/vmlinuz-4.9.0-4-amd64
   Taille : 4212512   	Blocs : 8232       Blocs d'E/S : 4096   fichier
Périphérique : fe01h/65025d	Inœud : 522626      Liens : 1
Accès : (0644/-rw-r--r--)  UID : (    0/    root)   GID : (    0/    root)
 Accès : 2018-03-13 13:15:40.000000000 +0100
Modif. : 2017-12-23 01:39:51.000000000 +0100
Changt : 2018-03-13 13:17:21.543619116 +0100
  Créé : -
  Fichier : /boot/vmlinuz-4.9.0-6-amd64
   Taille : 4224800   	Blocs : 8256       Blocs d'E/S : 4096   fichier
Périphérique : fe01h/65025d	Inœud : 522613      Liens : 1
Accès : (0644/-rw-r--r--)  UID : (    0/    root)   GID : (    0/    root)
 Accès : 2018-03-13 14:21:10.549792229 +0100
Modif. : 2018-03-02 08:52:22.000000000 +0100
Changt : 2018-03-13 13:18:25.317663012 +0100
  Créé : -
root@urb-vsnas:~#

Regards,

For information, error message doesn’t occur anymore on GUI with setting USER=“root” in /etc/default/urbackup and restarting urbackup service …
BUT it run “forever” after clicking on the “Mount image” button :

root@urb-vsnas:~# ps faxu | grep urb
root      1140  0.0  0.0  12784   944 pts/0    S+   00:06   0:00          \_ grep urb
root      1037  0.5  4.6 1391744 47296 ?       Sl   mars13   0:04 /usr/bin/urbackupsrv run --config /etc/default/urbackupsrv --daemon --pidfile /var/run/urbackupsrv.pid
root      1122  0.0  0.0   4288   716 ?        S    00:02   0:00  \_ sh -c /usr/bin/urbackup_mount_helper mount "SV2K16" "180313-1408_Image_C" "Image_C_180313-1408.vhdz" 2>1
root      1123  0.0  0.3  23752  3200 ?        S    00:02   0:00      \_ /usr/bin/urbackup_mount_helper mount SV2K16 180313-1408_Image_C Image_C_180313-1408.vhdz
urbackup  1127  0.1  1.1 113100 11920 ?        S    00:02   0:00          \_ /usr/bin/urbackupsrv mount-vhd -f /media/backups/SV2K16/180313-1408_Image_C/Image_C_180313-1408.vhdz -m /media/backups/SV2K16/180313-1408_Image_C/contents -t /media/backups/SV2K16/180313-1408_Image_C/device -o uid=108,gid=114,allow_root --guestmount
root      1131  0.0  1.6 188816 17036 ?        Sl   00:02   0:00 /usr/bin/urbackupsrv mount-vhd -f /media/backups/SV2K16/180313-1408_Image_C/Image_C_180313-1408.vhdz -m /media/backups/SV2K16/180313-1408_Image_C/contents -t /media/backups/SV2K16/180313-1408_Image_C/device -o uid=108,gid=114,allow_root --guestmount
root@urb-vsnas:~#

The strange thing is that it just work fine through CLI under the urbackup account.

Regards,

For information, it works fine with ZFS backend with exactly the same base setup (Debian 9 / Server 2.2.8).
So it seems to be related to VHDZ (and maybe VHD) backup file format …

You are running it as root with ZFS (I couldn’t get it to work otherwise when I tested)?

Yes running as root with ZFS …

Sorry, this is Debian 8 for the ZFS based server (OpenMediaVault) and Debian 9 for the server storing VHDZ on NFS share …

Regards,

It works fine now with 2.2.9, thanks !

Hello, everyone, I am using 2.2.9 version now, the system environment is centos7.5+BTRFS, Image mounting function is still not working properly, there will be the following report.

2018-04-11 15:03:11: ERROR: Image mounting failed: Guestmount…
libvirt: error : internal error: libvirt.so is not safe to use from setuid programs
libguestfs: error: you must have libvirt >= 0.10.2 to use the ‘libvirt’ backend

2018-04-11 15:03:22: ERROR: Image mounting failed: Guestmount…
libvirt: error : internal error: libvirt.so is not safe to use from setuid programs
libguestfs: error: you must have libvirt >= 0.10.2 to use the ‘libvirt’ backend

2018-04-11 15:03:50: ERROR: Image mounting failed: Guestmount…
libvirt: error : internal error: libvirt.so is not safe to use from setuid programs
libguestfs: error: you must have libvirt >= 0.10.2 to use the ‘libvirt’ backend

Hi alex:

hope you know that btrfs support with RHEL >= 7.4 is broken for urbackup. it is meaningless to use btrfs under centos 7.5 unless you replace the kernel. https://bugs.centos.org/view.php?id=14228

@tbsky Hi, I have update the kernel to 4.15.2, I found that ,Besides the mount function, everything else is normal,If I use RHEL7.1, will the mount function be normal?

I use the rhel7.1 version, then update the kernel to 4.15.2. Does the mount function work properly? Centos+btrfs+nginx, i like btrfs

@tbsky @uroni

HI alex:

I think image mount will be normal under RHEL 7.1. but I didn’t test it myself.

hi alex:

I think kernel btrfs support is fine under RHEL 7.1. but maybe kernel upgrade is fine since newer kernel fix more btrfs bugs.

I can test it ,centos7.1+kernel4.15.17+btrfs,If there is a problem I can feed back to the community

thanks you very much!