Single Slog on pool with stripe of mirrored vdevs?

Hey there

I am running a TrueNAS with one pool that consist of 3 mirrored vdev striped together. I recently got my hands on a P4801x and wanted to use that as a SLOG on the mentioned pool, however I am not sure it is actually possible.

When selecting to “Add vdev” under the “Pool Options”, selecting “Add Log” and adding the Optane it gives me a warning:
“A stripe log vdev may result in data loss if it fails combined with a power outage”

I don’t understand this message as I actually don’t want to stripe it? The only option under the Log vdev is stripe.

I was under the impression that I can add a SLOG to my pool anytime and remove it as well. Am I missing something?

Greetings

It just means that your SLOG has no redundancy. Mirroring your SLOG is the recommended configuration. That’s what TrueNAS told you and any other ZFS ressources will tell you too.

“stripe vdev” is ZFS terminology for Raid0, while a single drive is also considered a Raid0. You get a similar warning when creating a pool with only a single HDD. But you can still process as planned. It’s just a “do you really want to do this?” message.

You can. But if the SLOG holds data that isn’t flushed to disk yet and you plug it or it fails…hello data loss. To safely remove LOG, use zpool remove or click and select “remove” from the pool under “pool actions” (that cog) → “(pool) status” in TrueNAS GUI. It’s basically like unmounting or offlining a drive before you plug it.

Thanks for the answer, so that’s just a GUI thing then? I was a bit confused, cause the “Data VDevs” group is also there and can’t be removed.

About the data loss, from what I was able to research the only time I will loose data is, if the data hasn’t been written from RAM to the disks yet, the system crashes or looses power AND the SLOG fails at the same time.

Else I think the SLOG will be read to restore the missing data upon next successfull system boot. From what I know that is also the only time a SLOG device is read. The incomming data will always be written to RAM and not to the SLOG first.

As the P4801x has a “battery” backup afaik, I am not too concerned about that. The alternative for me would be having sync writes off, which has actually the risk of data loss in those cases.

So can I safely go ahead and add the drive as striped single Log VDev?

You are using three mirrors as data vdevs. Under these very special circumstances, you can also remove an entire mirror. Doesn’t work on individual drives, but check out the options you get under the mirror line in the table. ZFS then starts an “evacuation” process and distributes all data to your other mirrors. Obviously doesn’t work if there isn’t enough space.

I don’t know if there is a copy remaining in memory that gets flushed to disk as an “emergency async” in case the LOG dies …but if there is someone here who knows about LOGs, it’s @Log

Or if just the drive fails. That’s the main reason why you want redundancy. Power-loss-protection is great to have if other things fail (like power or PSU) and is the reason why people get enterprise drives for their SLOG (well, and their write endurance).

I’d use that single LOG under those conditions. But I personally don’t have a log myself and sync=disabled is fine for my security standards, so I might not be the best person judging here.

Sorry, maybe I am expressing myself a bit poorly here. In the below picture you can se the “Data VDevs” Section. I was thinking when selecting “Add Log” option only the lower “Log VDev” section would be shown. The “Data VDevs” section can also not be removed. But as you hinted, it seems to be just a GUI thing. Anyway, thanks for the calrification.

Well, assuming what I researched is right, a failed SLOG shouldn’t cause any issues, besides performance, as the writes are still going through RAM.

I got Optane because of the endurance and especially the latency which I believe I can benefit greatly from as the pool is a VM storage.

Yeah, usually I wouldn’t bother for regular storage. I am only going this route because it’s a VM storage target.

Wrong menu. You only use this menu when creating/adding new vdevs or cache, it’s a nice wizard-style tool. The arrows are just so you can correct an error before you commit the command.

I was talking about Storage → Pools → Cog icon aka Pool Actions → Status. Each line has three vertical dots you can click. That’s the proper GUI way to change things in your pool, like offline, attach, detach, remove

I see, but to add a SLOG to the whole pool, I am in the right menu, am I?

Correct. Press ADD to create/import pools, press cog to add vdevs or change stuff in your pool arrangement via “status”.

Yeah. If you rely on sync writes, that Optane drive is probably the best you can get. And you should be able to test the performance difference by altering the dataset “sync” property or just removing the LOG from the pool.
From my experience, I can tell you that under load, you don’t have to check GUI for that…just check on drive noise + LEDs :slight_smile:

Allright, thanks again for confirming. :smiley:

Haha that’s true. I turned sync on without a SLOG before and the performance just crumbles as soon as you hit it. Looking forward to see how big the difference will be with the Optane installed. :slight_smile: