Consider a ZFS Pool with deduplication enabled. Now consider multiple directory trees that contain identical content [D1 thru D10]. The first [D1] takes up TB of "real" disk space. The others [D2-D9]have some bookkeeping overhead, but are basically re-using the same blocks...
If one of those threes was deleted, the free space on the volume should not change (appreciably). IT would only change once ALL of the trees had been deleted....
So far so good.
But if there as another tree that had it's own data [Q1].... this takes up TD of data...
Now if I do an "ls" I see 11 directories... D1 thru D10, and Q1....
And we are ready for the base question: How can I tell that deleting Q1 will free real space, but deleting any single D? directory will NOT? How can I quantify what the recovered diskspace for any given (hypothetical) operation would be???
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:08 PM
03/23/2023 01:09 PM
Now, how can I tell this from a command line?
– David V. Corbin Mar 23 '23 at 17:11du
on those directories; does it pretend that each takes up the whole (say) 10GB of storage, or does it list only the first as taking up space? – dhag Mar 23 '23 at 17:35du
does what you say (deduplicated blocks are counted multiple times), butdf
shows completely unexpected results; i.e., the volume's size increases as I create more deduplicated files, and decreases as I delete them. All this to say that I probably don't know what the proper tool would be; there has to be something that lists a file's blocks, and could thus help find which are used by multiple files. Sorry! – dhag Mar 25 '23 at 14:11