datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
560 stars 120 forks source link

DESTROY command doesn't delete cow-file #369

Open ilya-makarov opened 2 months ago

ilya-makarov commented 2 months ago

Hi Gents! I'm testing dbdctl utility for my work purposes and noticed that the cow-file created at dbdctl setup-snapshot command is not being deleted after dbdctl destroy command.

I'm testing this on Ubuntu 20.04 with a few simple commands:

$ sudo dbdctl setup-snapshot -f 5119 /dev/sda2 /.dattobd_test 0
$ ls -la / | grep datto
----------   1 root root 5367660544 Apr  8 14:57 .dattobd_test
$ sudo dbdctl destroy 0
$ ls -la / | grep datto
----------   1 root root 5367660544 Apr  8 14:57 .dattobd_test

Could you please advice what I'm doing wrong or this is a bug?

Swistusmen commented 2 months ago

Hello, I have no idea why it doesn't work for you. I have just tested it with and without -f, with different filenames and everything works. Can you please provide more informations like kernel version/ dmesg?

ilya-makarov commented 2 months ago

Hi Michal! Thank you for quick response!

Here is kernel version info: Linux ubuntu20-qQ7 5.4.0-170-generic #188-Ubuntu SMP Wed Jan 10 09:51:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

And dmesg output: [4662976.997993] datto: error unlinking file: -1

Swistusmen commented 2 months ago

Have you compiled it by yourself or installed from packages? If by yourself can you pls paste kernel-config.h content?

ilya-makarov commented 2 months ago

I've installed it from packages by these instructions: https://github.com/datto/dattobd/blob/main/INSTALL.md#debianubuntu-lts