Re: ZFS on root with dedupe
Date: Sat, 22 Apr 2023 18:20:29 UTC
On Apr 22, 2023, at 1:52 PM, Andrea Venturoli <ml@netfence.it> wrote: > On 4/22/23 17:46, Paul Mather wrote: > >> Deduplication is a per-fileset option > > Oh! > I always thought it was a per-pool setting!!! > Did it change, perhaps after the switch to OpenZFS? I believe it has always been a per-fileset property. I think it is seen as a "per-pool" setting because of the performance impact it can have on the entire pool by enabling it on a fileset. ( > In fact the handbook says: > >> To activate deduplication, set the dedup property on the target pool: >> # zfs set dedup=on pool > > Isn't this incoherent? > I mean: > zfs set ... *dataset* > *zpool* set ... pool > > Should it be corrected? The handbook appears out of date in this case. Even the example, as you point out, is confusing because it references a zfs(8) command, which acts upon filesets. For 13-STABLE (and the most recent 13.2-RELEASE), the zfsconcepts(7) and zfsprops(7) manual pages both refer to deduplication being enabled for a "file system" or "dataset". The zfsprops(7) manual page includes the "dedup" property in per-fileset (or dataset as the manual page calls it) properties: "Configures deduplication for a dataset." The zfsconcepts(7) manual page states, "If a file system has the dedup property enabled, duplicate data blocks are removed synchronously." I interpret "file system" to be the same as fileset/dataset. These are fileset/dataset properties, not pool properties. It's difficult to keep the FreeBSD Handbook accurate because it potentially covers many simultaneous supported versions of FreeBSD. I always treat the manual pages for an installed FreeBSD version to be more accurate than the Handbook. Cheers, Paul.