Lakshmipathi / dduper

Fast block-level out-of-band BTRFS deduplication tool.
GNU General Public License v2.0
168 stars 18 forks source link

Couldn't read tree root #44

Open christian2022 opened 3 years ago

christian2022 commented 3 years ago

When starting dduper on docker from openmediavault I get the following error when accessing any file:

user@host:~$ sudo docker run -it --device /dev/sdf -v /media/data:/media/data -u root laks/dduper bash
root@0dad41b09a40:/dduper# dduper --device /dev/sdf --dir /media/data/media/Ixus/ -r -a
bad tree block 912588800, bytenr mismatch, want=912588800, have=0
Couldn't read tree root
unable to open /dev/sdf
...
root@0dad41b09a40:/dduper# ls -la /media/data/media/Ixus/
total 0
d---r-x--- 1 root root 1112 Dec  1 08:10 .
drwxr-xr-x 1 root root  428 Dec  4 14:53 ..
d---r-x--- 1 root root 3330 Dec  1 07:48 103___12
...

I assume it's related to user rights or some wrong parameters. Any idea?

Lakshmipathi commented 3 years ago

Can you try running scrub and validate that file system is clean?

Also note that there is an dduper bug reported in ML (thanks to @henfri) https://lore.kernel.org/linux-btrfs/em2ffec6ef-fe64-4239-b238-ae962d1826f6@ryzen/T/

christian2022 commented 3 years ago
scrub started at Mon Dec 21 16:32:56 2020 and finished after 01:22:03
total bytes scrubbed: 919.49GiB with 0 errors

The dduper bug report in ML you are refering to is exactly what I had before. As I did not get any support in the forums, I formatted my btrfs drive, lost all old data and restarted from scratch.

Lakshmipathi commented 3 years ago
scrub started at Mon Dec 21 16:32:56 2020 and finished after 01:22:03
total bytes scrubbed: 919.49GiB with 0 errors

So no issue with your file system.

The dduper bug report in ML you are refering to is exactly what I had before. As I did not get any support in the forums, I formatted my btrfs drive, lost all old data and restarted from scratch.

You mean, lost all old data because of dduper tool?!

As I did not get any support in the forums,

Can you share more details, may be URL of your report?

christian2022 commented 3 years ago

I lost all data, because of btrfs errors. Don't know if they have been caused by dduper or if they have been there before and dduper just uncovered them. I tried here: