ZFS root on single SSD?

jim at ohlste.in jim at ohlste.in
Tue May 16 10:34:49 UTC 2017


On 05/16/2017 03:39 AM, Matthew Seaman wrote:
> On 16/05/2017 06:45, Aaron wrote:
>> So, I've been running ZFS root mirror across 2 spinning disks, and I'm
>> upgrading my home server/nas and planning on running root on a spare SSD.
>> However, I'm unsure if it'd be better to run UFS as a single drive root
>> instead of ZFS, although I do love all of the ZFS features (snapshots, COW,
>> scrubbing, etc) and would still like to keep that for my root drive, even
>> if I'm not mirroring at all. I do notice that FreeBSD has TRIM support for
>> ZFS (see http://open-zfs.org/wiki/Features#TRIM_Support).
>> So is there a good reason NOT to run ZFS root on a single drive SSD?
> No.  Running ZFS on a single device works fine, although you obviously
> don't benefit from all the really nice resilience features.
> The choice between UFS2 and ZFS basically comes down to three points:
>     * performance -- for certain IO patterns, UFS can out-perform ZFS
> quite markedly.  Particularly the sort of small, randomly distributed
> IOs you get with a RDBMS.  Of course, for database use, the additional
> data security you get from ZFS makes it desirable despite this.
>     * system resources -- ZFS is memory hungry.  This is not a problem on
> most contemporary machines, which tend to have sufficient RAM, but older
> machines, VMs or appliances may struggle.
>     * data security -- the integrated checksumming in ZFS provides
> assurance that the data you're reading now is the same as what you wrote
> previously.  Now, this is almost always the case with UFS2 (would be
> entirely useless if not), but there is no actual guarantee of it, and
> silent data corruption is possible[*].  If you're handling data which is
> really important or in particularly large volumes or where your hardware
> may prove deficient, then ZFS is indicated.
> 	Cheers,
> 	Matthew
> [*] With only one drive and one copy of each file, ZFS cannot provide
> resilience against data errors, but it will prevent it going unnoticed.

I'd add only that while a mirrored zpool offers some data protection, it 
is *not* an effective "backup" solution for important data. Drive 
failure during resilver after a drive replacement does occur. If there's 
important data on the drive, backing it up to a different medium is 
still essential, whether it's a mirrored pool or a single drive pool. 
[Leaned once the hard way]™

Jim Ohlstein

More information about the freebsd-questions mailing list