
How to Use the ZFS Filesystem on Ubuntu Linux - rayascott
https://www.maketecheasier.com/use-zfs-filesystem-ubuntu-linux/
======
nateguchi
Will there be a time when ZFS is the defacto standard on Linux or is it only
suited to specific use cases?

~~~
pmarreck
I too would like to know the answer to this.

I think ZFS for a long time (if not still) has some... patent issues
associated with it which could be problematic in an open-source context.

I think BTRFS was (or is still) trying to fill this niche (and is open-
source), but the perception is that it is not 100% reliable, and
unfortunately, a first-class filesystem kind of has to be.

Here's a guide on how to use ZFS as the _root filesystem_ on Ubuntu:
[https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.10-Root-
on-...](https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.10-Root-on-ZFS)

~~~
earenndil
I don't think ZFS has patent issues, I think the issue is that it has a BSD-
like license, and it's too free for the linux people. BTRFS just isn't good
enough. I'm waiting for bcachefs.

~~~
saurik
I don't know where you got that impression, but it is not at all accurate: the
issue is that ZFS is licensed under the CDDLv1, which some key players (but
clearly not all; it is not even clear if it is a majority, but I don't know if
the people claiming it isn't are motivated to do so) believe to be
incompatible with the GPLv2.

[https://insights.ubuntu.com/2016/02/18/zfs-licensing-and-
lin...](https://insights.ubuntu.com/2016/02/18/zfs-licensing-and-linux/)

vs.

[https://sfconservancy.org/blog/2016/feb/25/zfs-and-
linux/](https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/)

------
pitaj
I'd love to see a modern filesystem comparison featuring etx4, zfs, xfs,
btrfs, hammer2, etc. Anybody know of a good resource for this?

------
z3t4
One interesting use case for zfs is striping eg you add a bunch of left over
disks with different speeds and sizes to a zfs pool, then zfs automatically
optimize. It can be used on for example dev machines where everything lives in
repositories and all you care for is getting as much performance and storage
out of the disks as possible. For serious use you should always use zfs with
two or three-way mirrors. If the disks have different sizes you can make
partitions, then add the partitions instead of the whole disks to zfs. zfs
software raid is very popular but really the poor mans choice, and will not
give you any benefit over hardware raid, so always use mirrors !! My current
setup is ZOL with 4 ssds in stripe and 2 hhds in mirror. Yep if one of those
ssds dies I'll lose all my data, but this gives me GB r/w speeds and over a TB
of total storage for very cheap.

~~~
jlgaddis
> _...zfs software raid ... will not give you any benefit over hardware
> raid..._

Except that you can pull the disks, stick them in another machine, import the
pool, and immediately have access to your data -- as well as, in the case of a
failed RAID controller, not having to worry about finding a spare, working,
replacement card of the exact same type (which isn't an uncommon occurrence).

~~~
mitchty
And having the exact same raid firmware (yes this has has hit me in the past),
crap like this is why I never use hardware raid.

------
DigitalJack
Call me crazy, but at work I'd love to have the snapshot capability. I mostly
run linux in a VM. Usually we use Exceed on Demand and operate remotely, but
the satellite office I'm in has terrible internet.

So I run locally. And I have thought about running with ZFS and exporting it
through an SMB share. I realize I wouldn't really be getting much of the
safety benefit (beyond checksumming I guess), but being able to snapshot would
be lovely.

I keep an external backup, and I use git on windows for manually snapshotting,
but it's still a bit of a pain, and to be able to snap the whole filesystem
seems awesome.

I have 32 gigs of ram, and give half to the VM... Any opinions on this idea?

~~~
viraptor
Why not invert? Run linux as the main system and office + outlook in the VM.
There are some pretty good seamless solutions for window display as well.
(vbox, vmware)

Then you can have everything on ZFS and you can keep the whole windows disk as
a separate volume. Snapshoting both should be trivial in that case.

~~~
DigitalJack
I'd get dinged for putting an unauthorized computer on the network. with linux
in the VM I can masquerade. I'd love to do the reverse though, windows on my
laptop is maddening. 7 minute boot times.

~~~
viraptor
I'm not sure what you're referring to, but any network changed you can do on
windows, I'm pretty sure you can replicate on Linux. (TTL fixes included)

------
blackflame7000
I have a large media collection ranging on the order of 10TB collected over
many years. One day I started noticing that videos i havent watched in a while
would occasionally have these weird green artifacts during playback that didnt
exist when I first stored them.

My research lead me to discover what bit-rot was and how most filesystems dont
actually ensure that what was read from disk is precisely what was written to
it.

Enter ZFS, an incredible filesystem that makes ensuring data integrity a
breeze. I run 12x2TB disks in a raidz2 running bi-monthly scrubs and not a
single corrupted byte since

