How to flush legacy ddt? #18141
Unanswered
shankerwangmiao
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I accidentally enabled dedup, setting
dedup=onon some of my datasets in a zpool. I disabled dedup after about a hour. I want to flush the legacy ddt entries. I thus usedfindfiltering files whosectimefell within the time range, copied these files out, removed these files, and copied these files back. By doing so, I can successfully saw the decreasement of ddt entries usingzdb -DDDD. However, after doing all these routine, there still around ~1k entries left, all the refcounts of which are 1. I used https://github.com/mrighele/zfs-find-deduped/blob/master/zfs_find_deduped.py, which first lists all the blocks in the ddt usingzdb -DDDDD, and then lists all the blocks used by a filesystem usingzdb -ddddd, and finds the files using the blocks in the ddt. The tool also cannot find any file that refers the blocks in the ddt. So is there any way to find out which files are referring the ddt entries, and is there any way to flush the legacy ddt?System: Debian Bookworm; ZFS version: 2.2.2-4~bpo12+1
Beta Was this translation helpful? Give feedback.
All reactions