Synology + Docker + Btrfs

Hi,

Did anybody successfully enabled btrfs support in UrBackup running using official docker images on Synology NAS?

Even in privileged mode creating btrfs snapshots return Inappropriate ioctl for device error. Subvolumes are created correctly.

This is not UrBackup bug. This is problem with environment itself. I’m creating this post here with the hope that someone found some workaround.

Hi,

I think I have the same problem on the same setting of synology+docker+urbackup.
Image backups are failing to autocleanup, leading to space exaustion.
The shared directory for backups is btrfs, the backup image file format is RAW copy-on-write.

I get the same ioctl error here:

root@diskstation:/# urbackup_snapshot_helper test
Testing for btrfs…
Create subvolume ‘/backups/testA54hj5luZtlorr494/A’
Create a snapshot of ‘/backups/testA54hj5luZtlorr494/A’ in ‘/backups/testA54hj5luZtlorr494/B’
ERROR: cannot snapshot ‘/backups/testA54hj5luZtlorr494/A’: Inappropriate ioctl for device
TEST FAILED: Creating test snapshot failed
Delete subvolume (commit): ‘/backups/testA54hj5luZtlorr494/A’
ERROR: cannot access subvolume /backups/testA54hj5luZtlorr494/B: No such file or directory
TEST FAILED: Removing subvolume B failed

(does this mean that I should not use RAW copy-on-write?)

and when performing a manual cleanup even with user root, urbackupsrv doesnt manage to cleanup any image, but I get plenty of lines like this:
2019-11-03 15:09:23: Deleting image backup ( id=3196, path=/backups/6005-1/191015-0022_Image_SYSVOL/Image_SYSVOL_191015-0022.raw ) …
Unknown mode: -1
2019-11-03 15:09:23: Deleting image backup failed.

There seems to be no problem with file backups.

From other experiences, setting the backup image to VHD should make image backups work again.

Just as a note the Synology also adds from xattrb’s to it’s btrfs file system so you will not be able to btrfs-send a subvol…
also as a warning all the HARD links are from root of docker image but /urbackup but live in /volume1/urbackup so outside of the docker none of the links will work unless you create a link from /urbackup to /volume1/urbackup

Hello have you solved this problem?
Do you think Synology is a good platform for Urbackup server?
I’m intrested in install on Synology do you have a suggestions?

my best regards
Polo

There is a package for Synology too, which is reasonably up to date; this avoids having to use Docker, so may resolve the noted issues. However I’ve not been brave enough to try it myself yet…

Hello,

I’m a newbie and I want to install URBackup on a Synology DS918+ with BTRFS filesystem.
I’ve installed docker package and the image from uroni.
Mapped the ports.
I’ve 2 problems:
1- how can I map /backups and /var/urbackup in the container?
2- I’ve some error during the container startup Image mounting disabled: TEST FAILED: guestmount is missing (libguestfs-tools).
I searched libguestfs-tools or btrfs-tools for synology but I haven’t found it.

Do you know this problems ?

Thanks very much

Hi:

These are in the Volume settings for the Docker container. I keep my bits in the folder docker/urbackup-server, so I have the following set up under File/FolderMount path:

docker/urbackup-server/log/var/log
docker/urbackup-server/database/var/urbackup
docker/urbackup-server/backups/backups

I don’t use image backups, so I’ve never tried. But my guess would be, once your container is running, create a new Terminal session in the container, and try something like
apt get libguestfs-tools

Good luck!

excuseme: I add but I can’t find folder.
image

I can’t find forlders in docker.
I will have to create the folders by hand?

Thanks very much !!

Yes - just create the folders manually inside the docker folder, then assign them to the Mount Paths.

Sorry to revive an old thread, but I’ve just acquired (or rather, I am atm testing) a Synology NAS myself with DSM 7.0.1 (1621+). I just wanted to update all of you, that I am unfortunately running into the same Inappropriate ioctl for device error, as the OP.

It works perfectly on my DIY NAS, running Debian 10. It is likely, that this is because of the old and custom btrfs-progs on the Synology box. It’s running btrfs-progs 4.0… Some interesting reading on this:

I will investigate further and see if there is a workable solution (maybe through a VM?) and post an update if required. If it won’t work, I guess I’ll just keep my old Intel NUC-based NAS and think about building a more performant DIY-NAS down the road.

I am on DSM7 as well.
I fixed this by copying /sbin/btrfs to a location within homes/ and then mounted

/homes/urbackup/btrfs -> /bin/btrfs