LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 February 18 2016

rolf
Member

Ubuntu 16 and ZFS filesystem

Today, I read this article. It seems that, for once, "the others" (Windows, OSX) will be playing catch-up with Ubuntu, not the other way around.
Ubuntu 16 will have ZFS, which is a filesystem with resilience built in, it can automatically fix corruption. More here:

http://arstechnica.com/gadgets/2016/02/ … y-default/

Last edited by rolf (February 18 2016)

Offline

#2 February 18 2016

Joe
Member

Re: Ubuntu 16 and ZFS filesystem

This is slightly misleading and a bit of marketing click bait.

First of all ZFS is a server-side technology, its utility on the desktop is still questionable, especially in the age of cloud time machine backups.

Second of all ZFS has been available on various Linux for ages. It's also available for Mac OSX (Apple used to support the porting effort, and now slightly less so).

What we're talking here is about the filesystem being packaged by default. It would be interesting to look closer into the differences between the available file systems and more importantly their impact on the desktop usage.

Cool article nonetheless. Thanks for sharing rolf :)

Offline

#3 February 18 2016

Joe
Member

Re: Ubuntu 16 and ZFS filesystem

Okay seems like the move is motivated by the need for container support.

No surprises there, but as expected, this might have much more impact on the server than the desktop.

PS: The filesystem is packaged and supported by Canonical, but good old ext4 will always be available.

Offline

#4 February 18 2016

rolf
Member

Re: Ubuntu 16 and ZFS filesystem

You're welcome and thanks for answering.
It's the first time I read about ZFS at all, so the article might be misleading in a way, and I'm not very informed.

Nevertheless, from my perspective, this filesystem brings value and is something I would like to have on my computer (whether workstation or server), having had to deal with corrupted files before (although rarely). For me, it is not interchangeable with backup, I just see it as a solution for the problem of files being occasionally corrupted, presumably due to faults in the underlying hardware. If you have a backup procedure this corruption can silently be disseminated as changes into your backup, overwriting the non-corrupt backup of your file(s).

I'm not sure what you mean by "server-side" in this context. I was assuming that it would be bundled with the normal version of Ubuntu, and I see it more suited for "workstations" than servers, the latter which would usually have better fault-tolerance in the hardware, hence are less prone to occasional corruption.

I did not know anything about it being available on OSX, so thanks for pointing that out. Probably my fault for assuming the contrary.

Last edited by rolf (February 18 2016)

Offline

#5 February 19 2016

Joe
Member

Re: Ubuntu 16 and ZFS filesystem

Rolf, here's what I know about ZFS. Full disclosure, I'm not a file system expert and some of the things I write might be inexact (at best), but I've worked for 2 years in a Solaris environment running ZFS and have had the chance of participating in a migration to Linux project where we had to look for alternatives. I also want to preface it by saying that absolutely loved working with ZFS and I'm glad it's getting support outside the Solaris world.

Presentation of ZFS

ZFS is an old project. Well, it's 2005 old. From what I understand the project originally aimed at supporting very large files and very large number of files. Since then other filesystems have caught up in file size but ZFS have gained a lot of interesting features.

Now it's important to note that most (all?) of these features can be found in other alternative projects, but it's definitely nice to have them packaged in a single project. Here are some of the coolest features:

  • Data Integrity: Aggressive checksum allows to detect corruption early and in some cases allows for recovery. It's crucial to note that alternative file systems (like ext4 and XFS have similar mechanism to combat corruption).

  • Space saving: By using techniques like Copy-On-Write, data compression and Deduplication, you can detect redundant blocks of data and save a lot of space.

  • Software Volume management: This is common on virtually every other Operating System through RAID and LVM, but ZFS have packaged this into the file system itself. This is the only visible change users will notice when moving to ZFS.

This is not an exhaustive list, but it's important to realize that the majority of the changes are on the kernel side and you won't feel too much difference as a user. You will have very cool volume management features, but this can be achieved very easily with other file systems with Software RAID and LVM.

OpenZFS

Originally, ZFS was a proprietary project developed by Sun for Solaris. After it was included in OpenSolaris, there were a lot of efforts to port the projects to different platforms. Apple got involved for a while to port it to OS X. I don't know why they dropped it, but I believe it was around the time they dropped all of their server activity. FreeBSD had one of the first successful port. Linux took time, because of the usual legal license reasons, but now serious port efforts are on the way.

In 2013 all the different port efforts under a single umbrella project called OpenZFS.

ZFS on the desktop

I mention that I'm skeptic about ZFS on the desktop. The reason is that, in my experience, ZFS is very resource hungry. Especially RAM. All this compression, copy-on-write, constant checksums, and virtual volume management, comes at a cost. Sure, if you're running a high end desktop with over 20GB of memory and several SSDs for caching you could maybe get away with it, but for more standard sized laptops, I would expect to take a performance hit.

On the server it's okay to imagine you have this kind of resources available. On the desktop I feel like you could get by with manual LVM/RAID and maybe try something like btrfs for copy-on-write? Back in 2011 when I worried about this btrfs was not ready and we opted for XFS.

Note that it's been a while since I've played with ZFS on linux. My laptop definitely took a performance hit back then. However I'm confident that the good folks at Canonical have an idea what they're doing, and if they're including it now by default, there's a good chance that things have improved drastically recently.

Conclusion

I'm glad ZFS is getting public exposure like that, and I believe it's a really really good project. However, unless you're actually taking advantage of zpool and RAIDZ, I still believe you're better off using our traditional Linux file systems.

Offline

#6 February 19 2016

rolf
Member

Re: Ubuntu 16 and ZFS filesystem

Hello. You're right, with that knowledge in mind, this article does appear to be biased and somewhat misleading.
I am sorry it took you writing a long post to bring that to my attention, and I am thankful for that.
My opinion is based on my experience with file corruption, mostly on NTFS. My bad for making assumptions about other filesystems, and for giving a random article too much credit, when I don't know much about the topic. What I'm concerned about is silent corruption. ZFS is probably not the clear-cut, back-and-white answer I thought it was, although it does appear to be an improvement on that aspect.

Last edited by rolf (February 19 2016)

Offline

#7 February 19 2016

NAM
Member

Re: Ubuntu 16 and ZFS filesystem

thx Joe .. helped a lot

Offline

#8 February 20 2016

hussam
Member

Re: Ubuntu 16 and ZFS filesystem

ZFS features are attractive but I am not sure I want to try it on Linux. ZFS cannot be merged in the mainline kernel because it conflicts with the GPL license. That means it will always be a separate module. What if it doesn't compile against some new kernel headers or the Linux port is abandoned in the future?
If I ever feel adventurous, I may try Btrfs.

Offline

#9 February 20 2016

Joe
Member

Re: Ubuntu 16 and ZFS filesystem

License issues

@hussam is absolutely correct. The current code is published under a license preventing it from being merged into the kernel tree. However, I'm hoping that Ubuntu shipping it by default will encourage kernel devs to at least consider ZFS-compatibility when introducing new changes. At least we know the good folks at Canonical will be providing solid testing grounds.

Btrfs

Btrfs is a filesystem that pushes the concept of copy-on-write to the extreme. In my opinion there are 2 main differences with ZFS:

  • It won't provide RAID and volume management features. This can still be achieved through traditional LVM commands

  • It's newer and arguably less production ready. It still hasn't reached a steady state of stability. It could work well in certain cases, but I don't think it's ready for general purpose computing.

From the Btrfs wiki page:

The Btrfs code base is under heavy development. Every effort is being made to keep it stable and fast. Due to the fast development speed, the state of development of the filesystem improves noticeably with every new Linux version, so it's recommended to run the most modern kernel possible.
For benchmarks, it's recommended to test the latest stable Linux version, and not any older. If possible, it's also recommendable to test the latest Linux development version.

It may be possible to install the latest kernel on your laptop, but that's not going to be always easy on your server/embedded machines.

Offline

#10 February 26 2016

hussam
Member

Re: Ubuntu 16 and ZFS filesystem

By the way, are they compiling it as a module or statically into the kernel? The latter would be a violation of the GPL.

Offline

Board footer