Page 1 of 1

sync=standard in zVol

Posted: 19 Jan 2014 22:54
by Thomymaster
Hi

I am new on NAS4Free, i migrated from FreeNAS 9.2.0. Sadly i had to create my zpool becauee importing failed due to the missing "space_histogram" feature flag in NAS4Free :(.

For my ESXi environment (ESXI 5.5) i created a zVol (blocksize standard -> 8KB) and exported the zVol via ISCSI.

When creating the zVol i used "sync=standard", but what is the standard value, to use sync writes or not to?

Can i change this afterwards (what i know is that i can insert/remove a SLOG via CLI):


zpool add zpool1 log /dev/ada4
zpool remove zpool1 /dev/ada4


Cheers
Thomy

Re: sync=standard in zVol

Posted: 22 Jan 2014 10:14
by Thomymaster
Hi

I found the answer myself


zfs set sync=always zpool1/esx1
zfs set sync=standard zpool1/esx1 (default)

Re: sync=standard in zVol

Posted: 22 Jan 2014 22:31
by substr
the option of disabled also exists, which means that zfs will ignore the sync that ESXi does for every single write. This is a big performance improvement if you don't need the guarantee that every write is written immediately. It doesn't cause corruption (per se) if there is a crash, instead it means that the ZFS server would go backwards in time if there is a crash. This is bad if the ESXi doesn't also crash simultaneously, because when the ZFS comes back up, you would then end up with some kind of corruption.

Re: sync=standard in zVol

Posted: 23 Jan 2014 14:34
by Thomymaster
Hi

But what is now the difference between "standard" and "disabled", i don't get it :(

Re: sync=standard in zVol

Posted: 23 Jan 2014 20:37
by substr
always = ZFS will sync every write to disk immediately, even if ESXi (or whatever app) doesn't ask for it.
standard = ZFS will sync writes when the app asks for it (ESXi always syncs, at least on NFS)
disabled = ZFS won't sync writes whether asked or not. In case of a crash, you will lose a few seconds of writes.

If you have an SSD SLOG, it will be used to sync the write.

Re: sync=standard in zVol

Posted: 24 Jan 2014 09:48
by Thomymaster
ok :)