Is it possible to swap ZIL vdevs on a ZFS pool?

nukke

New Member
Aug 5, 2021
14
0
1
tl;dr I just got an Optane drive. I'm currently running 2 SSDs in mirror as ZIL, I want to remove them and use only the Optane drive as ZIL. How can I do this?

My current setup is as follows:
  • Xeon D-1541 8c/16t
  • 64GB DDR4 ECC Registered
  • 6x12TB drives in RAIDZ2 (72TB raw, 48TB usable)
  • 1x512GB NVMe as L2Arc
  • 2x512GB SATA SSDs in RAID1 as ZIL
  • (just arrived) Intel Optane 905p 480GB
My goal is to remove those 2 SSDs, make the Optane drive the only ZIL device and potentially add 2 more 12TB drives in the near future to the main zpool.
Currently the NAS only serves media, but now that I have an extra node to my virt environment and also got the Optane, I'm thinking of using the NAS as storage for VMs in addition to media.

My plan was to do the following:
  1. Turn off NFS and SMB services
  2. Remove ZIL vdevs: zpool remove $SSD1 && zpool reomve $SSD2
  3. Add Optane as ZIL: zpool add pool log /dev/$Optane
Is this the correct procedure? I can't find any information in the official docs or on Google about how to swap vdevs. The only info I can find is for replacing dead drives, and not for "rebuiding" ZIL.
 

nukke

New Member
Aug 5, 2021
14
0
1
u dont even need to turn off the services...
So to confirm, removing the SSDs won't degrade the pool and cause data loss? Once I add the Optane drive, will the "degraded" status disappear?

I assumed it would be fine *if* I were replacing l2arc, but messing with ZIL scares me.
 

Rand__

Well-Known Member
Mar 6, 2014
6,332
1,599
113
as long as u dont touch (meta) data devices nothing will happen to the data.

O/c if you have inflight data while you remove the second of the log devices and right at that point ur box crashes u might get corruption, but we will asumme this will not happen;)
 

oneplane

Active Member
Jul 23, 2021
305
164
43
You can reconfigure ZFS to stop using the ZIL remove the log, add the optane, then tell ZFS to start using the ZIL again. Normally ZFS doesn't use an off-device ZIL or L2ARC and it's all done in-pool anyway.