Add SSD partition as Dedup vDev to Dedup pool from command line

Sprint

Explorer
Joined
Mar 30, 2019
Messages
72
So I already have a 280Gb 900p Optane drive which I have partitioned into 2x 15Gb slogs and a 200Gb L2ARC (rest is left as over provision), which are tied to various pools. When I added each of them to each respective pool (see below), I had todo it from the CLI, since the GUI doesn't support adding partitions to pools from the GUI.

I've ordered a second 900p, which I intend to replicate the partitions on from the first 900p, and have my SLOGS and L2ARCs "mirrored", but the reason is I want to also create a 32Gb partition on both, and use these as dedup table VDEVs for a new pool I'm building for my iSCSI VMs to live on.

The only bit I'm not sure on, and am struggling to find instructions on (as I know its not a technically supported model but suspect it IS technically possible in the same was as my L2ARC and SLOGs are) is to add those two 32Gb partitions (one on each drive) to the dedup pool as a pair of mirrored drives for dedup vDev tables. (and actually, my pairs of SLOGs and L2ARC partitions in a single command)

Would anyone know what the command would be? I have spent an age looking, and evening looked on FreeBSD pages but can't seem to find it.

These are the commands I used to add my partitions to their pools after partitioning up my original 900p

r/truenas - Add SSD partition as Dedup vDev to Dedup pool from command line


Thanks in advance
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Well, although I don't think that all of the things you're mentioning there are sensible uses of the hardware... You really shouldn't mirror L2ARC and it really isn't needed for SLOG either. Mixing both SLOG and L2ARC on the same device is questionable practice. You should really be adding those partitions by gptid.


Says that the dedup type is the one you're trying to add...

zpool add pool dedup partition/gptid

In the section under Special Allocation Classes, I note this:
Dedup data can be excluded from the special class by setting the
zfs_ddt_data_is_special zfs kernel variable to false (0)

Which isn't clear for me regarding the need to set that to avoid dedup data going to another special VDEV (if you had one).
 

Sprint

Explorer
Joined
Mar 30, 2019
Messages
72
S
Well, although I don't think that all of the things you're mentioning there are sensible uses of the hardware... You really shouldn't mirror L2ARC and it really isn't needed for SLOG either. Mixing both SLOG and L2ARC on the same device is questionable practice. You should really be adding those partitions by gptid.


Says that the dedup type is the one you're trying to add...

zpool add pool dedup partition/gptid

In the section under Special Allocation Classes, I note this:
Dedup data can be excluded from the special class by setting the
zfs_ddt_data_is_special zfs kernel variable to false (0)

Which isn't clear for me regarding the need to set that to avoid dedup data going to another special VDEV (if you had one).
Super, thats a really handy document, which I'll make a note of. I'll test this on my test rig before trying it on my main box, but i think that looks like it'll do the job.

I know people get very nervous at the idea of using the same drive for multiple purposes, but it seems ludicrous to waste a 280Gb Optane drive for a single 15Gb SLOG. I got the idea from Wendel at Level1 Techs for partitioning it up, and its worked flawlessly for close to two years now, and far exceeds my performance requirements so I'm happy with it :)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If you do a little searching on overprovisioning, you might find that using your optane overprovisioned will allow a small partition to survive many more errors on the drive and hence last you much longer. Using that same drive for L2ARC will significantly reduce its lifespan for what I would assume is little to no benefit.
 

Sprint

Explorer
Joined
Mar 30, 2019
Messages
72
If you do a little searching on overprovisioning, you might find that using your optane overprovisioned will allow a small partition to survive many more errors on the drive and hence last you much longer. Using that same drive for L2ARC will significantly reduce its lifespan for what I would assume is little to no benefit.
I am considering moving the L2ARC to a independent NVME, maybe a 250Gb 960 Pro or something. That would mean that the only things on the Optane "mirror" would be 2x 15Gb slogs, and maybe a 32Gb DeDup partition. Means i'm only using 62Gb of each 280Gb Optane... seems like a lot of waste?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
seems like a lot of waste?
As I mentioned... if you do it right, that "wasted" space can be used (hence, not wasted) to spare sectors in the used part of the drive, which can prolong the life of the drive significantly.
 
Top