Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2012 09:56:52 -0600 (CST)
From:      Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
To:        Peter Maloney <peter.maloney@brockmann-consult.de>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: glabel, gpart and zfs confusion.
Message-ID:  <alpine.GSO.2.01.1202250943480.6378@freddy.simplesystems.org>
In-Reply-To: <4F48A402.70009@brockmann-consult.de>
References:  <3E3E4094-77E2-490B-9574-5B95ECDED447@pean.org> <4F48A402.70009@brockmann-consult.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 25 Feb 2012, Peter Maloney wrote:

> In Solaris, I've read that the IO system is designed such that a some
> commands (eg. flush of a partition) does not necessarily flush the
> disk's write cache... like the command can't move up the chain. So if
> you put zfs on a partition, you can get data loss (eg. transaction
> rollback required and probably no corruption).

I wonder where you read that since it seems like bad information?  In 
Solaris, if zfs uses a partition (rather than the whole disk), the 
disk write cache is not enabled by default due to the possibility that 
some other partition uses a legacy filesystem like UFS, which could 
become inconsistent and corrupted if the write cache is enabled.  The 
drawback then becomes that zfs writes are likely to incur more 
latency.

> In FreeBSD, things are different I am told, without the above
> limitation. So you can happily put zfs on partitions, and the zfs code
> can keep your data safe. I haven't had data loss with system panics
> during sync writes with my ZIL on a partition, so I guess this must be true.

It seems unlikely that FreeBSD zfs is somehow "safer" than Solaris 
zfs.  Both rely on a disk cache flush request to write buffered data 
to disk.  Synchronous writes necessarily require that the zil (zfs 
intent log) be flushed to disk before write returns success to the 
user.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.2.01.1202250943480.6378>