Hitless SLOG replacement?

Status
Not open for further replies.

David E

Contributor
Joined
Nov 1, 2013
Messages
119
I've been using a Samsung 840 Pro and want to upgrade to an Intel S3710. The only official documentation I can find on the process is: http://doc.freenas.org/9.3/freenas_storage.html#removing-a-log-or-cache-device which has a pretty ominous warning:

"If the pool is running ZFSv15, and a non-mirrored log device fails, is replaced, or removed, the pool is unrecoverable and the pool must be recreated and the data restored from a backup. For other ZFS versions, removing or replacing the log device will lose any data in the device which had not yet been written. This is typically the last few seconds of writes."

Can anyone comment on whether or not this is still accurate? Is there no way to do a clean unmount of an existing SLOG without potential data loss?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
It's still accurate. What version of FN and ZFS are you running. The 9.3 version I know I've removed a SLOG using the GUI without issue.
 

David E

Contributor
Joined
Nov 1, 2013
Messages
119
It's still accurate. What version of FN and ZFS are you running. The 9.3 version I know I've removed a SLOG using the GUI without issue.

FN 9.3, pool reports - for version, but says it has the following features enabled:
feature@async_destroy enabled local
feature@empty_bpobj active local
feature@lz4_compress active local
feature@multi_vdev_crash_dump disabled local
feature@spacemap_histogram disabled local
feature@enabled_txg disabled local
feature@hole_birth disabled local
feature@extensible_dataset disabled local
feature@embedded_data disabled local
feature@bookmarks disabled local
feature@filesystem_limits disabled local
feature@large_blocks disabled local

Did you lose any active writes when you removed the SLOG from the GUI? I wish there was some way to prevent writes, flush anything in the SLOG, then pop it out..
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
My point was that it probably isn't an issue for you. What version of ZFS is your pool? The issue you described isn't really relevant to the newer pools.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It's changed, and the answer is confusing.

If you are on a version prior to v15 of ZFS, a loss of the slog is a loss of the entire zpool period. Clean shutdown or not, your zpool will not be mountable at all without the slog. Frankly, if you are running a version that is this old, you deserve the punishment you get for being something like 5 years behind. :P

If you are are on v15 or newer, a loss of the slog will cause different behaviors:

- If doing a zpool import, the import will fail unless you manually add the -m parameter to the zpool import. This tells ZFS to disregard the fact that the slog is missing, consider any data that may exist in the slog as lost, and mount the zpool.
- If the zpool is in use and the slog device suddenly disconnects from the system, the system will switch to a mode where the slog is not used. Your sync write performance will drop significantly, and you'll get an email if emailing is setup that a disk has been lost and the zpool status has changed.
- If you remove an slog device from the WebGUI and the device is fully functional, then all writes in the slog are committed to the zpool and the device is removed cleanly.

In essence, think about it like this. Your zpool contains all the data that exists in the zpool vdevs + slog. There is no way to know what is in the slog, if anything, without looking at the slog device itself.

HTH.
 

David E

Contributor
Joined
Nov 1, 2013
Messages
119
Thanks cyberjock that is helpful, I had hoped that a clean removal would behave like you'd hope it would, but those docs had me concerned.

Btw, I can't determine what my pool's version is (although it should certainly be newer than 15), here is what I am getting:

[root@nas] ~# zpool get version
NAME PROPERTY VALUE SOURCE
tank version - default

Is there a different command I should be using? Or is there some specific version that corresponds to being feature based (posted in my last post)?

Thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The hyphen means v5000. That's v28 + support for feature flags.

Per your prior post it looks like you could enable some extra flags.

I'd enable them by running "zpool <zpool name> upgrade.

If you look in the WebGUI you'll probably see you have a warning in the alert system that the zpool needs to be upgraded. :P
 

David E

Contributor
Joined
Nov 1, 2013
Messages
119
Got it, thank you. And yeah, it has been complaining about that for awhile :)
 
Status
Not open for further replies.
Top