Jail question

zdenkers

Dabbler
Joined
Sep 16, 2019
Messages
39
Do jails write synchronously the same way vms do?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I'm not sure what you're trying to understand here, but it's not correct to say that VMs (all/always) write synchronously.

It's usually a no-brainer that you want them to do that, since they trust the disk when it gives the response back to indicate write success, so critical operations that can't afford to be lost are assumed not to be lost, which with the underlying iSCSI disk in synchronous mode will be true.

If you run in asynchronous mode for your iSCSI target disk, you're playing with fire in terms of data or whole OS loss if one of those critical operations is found hanging (reported as written, but not yet written) at some point which can be the case with asynchronous mode.

Jails don't use zvols nor iSCSI targets, but do live on top of and mount datasets that can be set to either of the two options.

Read @Spearfoot 's post (the second post in the thread) here: https://www.ixsystems.com/community/threads/setting-sync-always-adding-slog.55526/ for perhaps a more elegant explanation.

EDIT: where I mention iSCSI targets, it assumes a remote VM (like on VMware), for local VMs (bhyve) it's just direct ZVOL access, but the statements remain the same.
 
Top