Need some ZFS guidance

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Fritz

Well-Known Member
Apr 6, 2015
3,372
1,375
113
69
Just added a ZEUSram 200gb drive to my FreeNAS box and want to use it for a SLOG. Went to the FreeNAS forum and got thoroughly confused. Seems like every thread that deals with adding a SLOG degenerates into gibberish. So here are my questions -

1. I have 2 pools in the box. Pool 1 is 9TB Z2 (11 1TB disks). Pool 2 is 27.2TB (11 3TB disks). Can I put the slog for both pools on the same SSD?

2. What size should the partition be? 100gb for each?

3. How do I proceed?

Thanks :)
 

T_Minus

Build. Break. Fix. Repeat
Feb 15, 2015
7,625
2,043
113
You only need a few gig and iirc you can partition the slog device to share it but you can't share 'one slog' among two pools if that makes sense.

Have you used that SSD Yet? I've found some of those older models really crank out the heat and performance wasn't there -- post up specific model # if you want.
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
Is this for filer use ex SMB or for databases or ESXi VM storage?
 

Fritz

Well-Known Member
Apr 6, 2015
3,372
1,375
113
69
STec - Z16IZF2E-200UCU - Ssd Zeus Gen4 2.5 15mm Sas Slc 200GB

It's a file server.
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
A SMB fileserver does not need or use a Slog.
You only need a ZIL for a fast and secure sync write behaviour ex for transactional databases or if you need storage for VMs with older Non-Copy on Write filesystems.

You do not need for ZFS itself as the ZFS filesystem is always consistent even on a crash.
A large file that is written during a write is corrupt with or without a ZIL.
 

Fritz

Well-Known Member
Apr 6, 2015
3,372
1,375
113
69
Are you saying it offers no benefit in the event of sudden power loss?

Thanks
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
No benefit as ZFS is crash resistent (No currupted filesystem on a powerloss).
A CopyOnwrite filesystem updates both data and metadata or none of them.
With default settings a ZIL is not used at all with SMB.

You need it only for filesystems that are not crash resistent where it can happen that data is written but metadata not updated on a powerloss (corrupted filesystem) or transactions ex with a finance software that wants to transfer money from one account to the next and you cannot allow only a remove money and the add to the other account was lost due a powerfailure or a commit from disk without data on secure storage.
 

pricklypunter

Well-Known Member
Nov 10, 2015
1,708
515
113
Canada
Can I jump in here? @gea I am just about to add a slog to my array when it arrives. I am using iscsi to share ZVol's to a few VM's. My understanding, rightly or not, was that the two major benefits of having a seperate slog device was that the zil was no longer held on the slow array making array access faster, and that it could be used to ensure data integrity when performing sync writes. Am I also not going to see any benefit of adding a slog device?
 

dswartz

Active Member
Jul 14, 2011
610
79
28
You definitely want sync protection if you have VM guests with their FS served up by iSCSI or NFS, since FS operations by the guest OS may have disk barrier operations which are not occurring (e.g. the guest FS writes a bunch of stuff to the "disk", then tells the "disk" to commit to stable storage.) If you run sync=disabled, you could conceivably crash the storage server in one of those windows, and corrupt the guest OS. Note that an SLOG will help for sync=standard or sync=always if the guest is doing sync writes (always for ESXi NFS and recommended for ESXi iSCSI), since without an SLOG, ZIL writes will be to the pool, which can cause horrible write performance.
 

pricklypunter

Well-Known Member
Nov 10, 2015
1,708
515
113
Canada
Thanks, I think that's kind of what my understanding is. I don't currently have the VM filesystems on the pool, they all reside on the ESXi datastore SSD. I'm not using the pool as an NFS or iSCSI datastore for ESXi either, although I'm now considering making a small NFS ZVol available to ESXi as a simple datastore backup location. The iSCSI target contains 3 ZVols just now, which are purely used as storage blocks for the other VM's. I do have a Samba share to the pool just to make it easy to copy stuff back and forth from a windows client, but I didn't think I needed to add a slog for that. However, I'm using iSCSI with the Zvols formatted with both NTFS and EXT3, so I figured it safer to have sync writes always set on the pool, plus as you mentioned, storing the zil on the pool makes for an unhappy time, so I thought adding a slog would make a decent improvement in write speed :)

I'm really just finding my way with ZFS, although I have played a little with it on and off, this is the first time I have used it for real, so I'm just needing a little hand holding to stop me doing something stupid and losing my data!
 

Fritz

Well-Known Member
Apr 6, 2015
3,372
1,375
113
69
I decided to just use it for testing purposes and short term storage.