Single Slog for Multiple Zpools

Status
Not open for further replies.

DaveFL

Explorer
Joined
Dec 4, 2014
Messages
68
Just a general question. If I have two zpools can I have them both share a single SSD for their SLOG?

Also, with the latest version of Freenas is it necessary to mirror my SLOG?

I appreciate any input.
 
D

dlavigne

Guest
Just a general question. If I have two zpools can I have them both share a single SSD for their SLOG?

Nope. From http://doc.freenas.org/9.3/freenas_intro.html#zfs-primer:

Note that a dedicated log device can not be shared between ZFS pools and that the same device cannot hold both a log and a cache device.

Also, with the latest version of Freenas is it necessary to mirror my SLOG?.

Nope. That hasn't been needed since ZFSv19 (several years ago), well before OpenZFS.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I want to note something.

It is not required to mirror the slog, but it is still recommended.

Remember, the slog stores data that needs to be written to the zpool, but hasn't been written yet. You have redundancy for your zpool, but the data you have on the slog has no redundancy if you don't have a mirror. While the likelyhood of failure is small, it does happen. So if this is for a business type application you should consider a mirror even though it isn't "required".
 

DaveFL

Explorer
Joined
Dec 4, 2014
Messages
68
I want to note something.

It is not required to mirror the slog, but it is still recommended.

Remember, the slog stores data that needs to be written to the zpool, but hasn't been written yet. You have redundancy for your zpool, but the data you have on the slog has no redundancy if you don't have a mirror. While the likelyhood of failure is small, it does happen. So if this is for a business type application you should consider a mirror even though it isn't "required".

Could someone explain to me the case where things could go wrong without the mirror.

I ordered an S3500 as it seemed to offer the most bang for the buck. The drive itself has power interrupt detection. Which sounds useful in case of a power failure (assuming ups failed).

If the drive does flat out fail followed by a power outage what can happen? What do we lose what can be corrupt?

This is purely home use. Not recording credit card transactions or sales or anything but I do want to keep my data intact ie not lose the entire zpool.

Thanks for the input folks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Example:

Your system is running smoothly. Your slog is taking in data for the 5 seconds or so between ZFS transactions.

Before the next transaction occurs, you have a loss of power or a kernel panic.

Due to a bug in the SSD firmware (insert any explanation you want for why your SSD decides to stop working), the SSD will no longer be detected by any system when you plug it in.

You power on the server and the zpool won't mount automatically because the slog device is missing. :p

You'll have to do some extra work from the CLI to mount the zpool, but you have lost the previous 5 seconds of writes that other network clients were promised (via sync writes) were made to the zpool.

Believe it or not there's a few things that are very likely to occur:

- Loss of power and/or kernel panic seem to always happen to servers at some time or other. Human error, programming error, etc.
- SSDs tend to stop working on power-on and not when you are already using them.
- A system that is used in a production environment will *always* have *some amount of data* in the slog device. (this means you ARE going to have uncommitted zpool data in the slog every second of every day)


So unless:

- You are going to argue that a power loss and kernel panic have nearly zero percent chance of happening (I've heard it all.... dual redundant UPSes, diesel generator on standby, etc.)
- You are going to argue that SSDs never fail.
- You are never going to have data on the SSD.

Then you probably want to consider a mirror.

For home users you might have a corrupted movie file, plex database, etc. and can recover in a couple of hours so it might not be worth the cost of that expensive SSD.

Imagine corrupting an 800GB sql database like I was working with someone on last week. They've paid LOTS of money to recover from a mistake they made, directly related to an unexpected loss of power. You can't just do a "quick recovery" or run some diagnostic tool "quickly" and fix the kind of problems that you'll have. It can take hours (or days) to figure out what is going on and fix it.

So how much money did that slog device cost you? And how much *might* it cost if your slog device fails at a bad time (and there is no "good time" for an slog device to fail).

Alternatively, consider an environment where you are literally relying on your slog device to have good write performance to your zpool (VMs on ESXi over NFS). If you lose your slog device suddenly, your performance of the zpool will nosedive and you'll likely see many (most?) of your VMs get kicked offline due to timeouts on access the VM virtual disk files. So what will happen to those VMs that were improperly shutdown?

Suddenly my horror stories that I've seen firsthand seem terrible and changing the quantity from 1 to 2 on your purchase order seems like a good deal huh?

Hint: It is a good deal.
 

DaveFL

Explorer
Joined
Dec 4, 2014
Messages
68
Hah it's been ordered and I plan to set it up this weekend. So I'll have to order another one.

Can the mirrored slog be added after initial setup?

Eg remove non mirrored slog, bring in mirror. Add slog (mirrored).
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yep.. just remove the slog, then add the two disks as a mirrored slog. :)
 
Status
Not open for further replies.
Top