I’m on TrueNAS 25.10 and want to double-check a plan before I touch my pool.
My setup:
One pool with:
Data: 2 × 16 TB HDDs in a mirror
Metadata (special) VDEV: 2 × 1 TB NVMe drives in a mirror
What I want to do
I want to swap the two 1 TB NVMe drives for two 750 GB NVMe drives. I can’t replace them one disk at a time, because TrueNAS won’t accept a smaller disk as a replacement based on my research.
My plan
Add the two 750 GB NVMe drives to the pool as a new Metadata VDEV (mirror).
For a short time the pool has two metadata VDEVs.
Remove the old 1 TB metadata VDEV from the VDEVs screen.
My question is: when I remove the old metadata VDEV, will its data move to the new metadata VDEV? Or can some of it end up on the HDDs?
Keeping the metadata off the HDDs is the whole point, so I want to be sure before I start.
Has anyone done this and confirmed where the metadata ended up? And is there a way to check it in the GUI after the removal?
I don’t believe it’s possible to remove a special metadata VDEV from a pool. The only way to do what you want to achieve is to destroy and recreate the entire pool from scratch, and reload the data from backup.
Are you sure of this, given that the pool is a mirror? I know VDEV removal is available for data vdevs, but I thought that was the case for special vdevs too, if all vdevs in the pool are single disks or mirrors.
AFAIK, if the newly added special vdev has enough free space, it gets first dibs when the data from the special vdev is evacuated during removal. Never tried it myself, since I don’t use special vdevs.
You’ll end up with an “indirect” vdev on the pool that permanently consumes RAM for the entries that used to live on the original special vdev, which has been removed. The memory consumption is minimal.
Is there a reason why you want to shrink your special vdev by 250GB when you’ve already established a pool with a 1 TB special vdev? Why not keep what you have?
it’s because of the nature of the drives. I created the vdev with 2 regular 1tb consumer m.2 drives and now I have 2 optane P4800x. Not only they are a better fit but I can repurpose the other drives.
it’s only using 20GB or so for now, but I plan to use small blocks for several new datasets.
And this is my main concern, everything I find online points to “it should work” but no confirmation, which makes me uneasy.
I wasn’t aware of that indirect vdev, I’ll look into that, thanks!
I tried the configuration in a VM of TrueNAS 28 Nightly and the GUI let me add the second sVDEV and remove the first sVDEV. I don’t believe this is possible with anything else but the Mirror VDEV configs
You should have a known good backup of all your data anyway, in case you need to go with pool destruction and recreation with any other issues.
Were you able to confirm the new special vdev has the same data as the old one?
I do have a backup, but I don’t to try it without knowing if it should work as I expect it. Or maybe there’s another way I’m not aware of
With a good backup, there is a failsafe procedure which is 100% guaranteed to land all metadata and small blocks where intended without leaving any indirect vdev scar.
I don’t have a backup of everything, only of the most important things in an offsite truenas.
The process you describe requires the backup? Because that’s not a viable option for me right now.
But can you confirm the steps I described at the beginning will ensure all metadata going to the dedicated special vdev even with that indirect vdev scar? and can I do something afterwards to remove it?
I’m afraid no one has ever attempted the manoeuvre (if only because special vdevs are mostly used with raidz), so no one can give an authoritative answer whether the removal will indeed behave as it should.
As for the indirect vdev, you can not do something about it.
got it, don’t think it’s that big of a deal though.
Not sure I follow you here, you are saying people use special vdevs in raidz? I thought it was always mirrors, that’s why I assumed the process would be the same for anybody that has to replace them.
And thanks for the answer
The special mirror vdev is a mirror, but data vdevs can be raidz (svdev was first designed for dRAID). However any raidz in the pool prevents (s)vdev removal.
What I think @etorix is saying, is that most people who use Special Metadata vDevs, have RAID-Zx data vDevs. That is partly because RAID-Zx can be slower for somethings, and less space efficient for others.
However, a Mirrored pair of HDDs with a Mirrored pair of SSDs, (SATA, SAS or NVMe), does make sense for performance reasons.
I on the other hand, opted for a L2ARC, which is non-critical to the pool.
Recently the restriction of using only stripe(s), (aka single disks), or Mirrors, (2 or more), for Special Metadata vDevs has been lifted. That means someone with say 10 x HDDs in a RAID-Z2, can have a 4 x SSD also in RAID-Z2. The advantage is that with RAID-Z2 you can loose any 2 disks and not loose data. Unlike a 2 x 2 way Mirror Special Metadata vDev, which if you loose the wrong 2 disks, you loose the ENTIRE pool.
Not sure if the restriction removal has made it to TrueNAS.
I see, I wasn’t aware of that limitation, I thought it applied to the same class of vdev.
I read this recently, I assumed TrueNAS supported it but that’s a good point.
Ok, I understand that it’s really an edge case what I’m trying to do, so I guess I’ll just do it after a test on a VM and we’ll see how it goes…
Thanks everybody
I run a pool of stripe HDD and a metadata SSD, I’ve swapped the metadata vdevs as described here and everything worked fine. Went from a 250GB SSD to a 120GB SSD, the storage pool is mainly used for holding WORM data with a 16M record size.
I swapped the svdev earlier today and it worked just fine. The dry run said the indirect vdev was going to take around 20MB and ended up taking 5MB.
Thanks for the help!