Ubuntu Server - ext4 vs ZFS for Samba

hasu

Senior member
Apr 5, 2001
993
10
81
I just finished setting up a Samba file server built on Ubuntu (Server-11.04) on a raid-1 formatted as ext4. Everything went well and I am getting 48 MB/s write and 60-70 MB/s read on Windows 7 (over G-bit network). While reading more about various file-systems, it looked like ZFS has improvements to keep the data safe(r).

I am wondering if it would make any difference if I go for ZFS as against ext4, considering the fact that the files are going to be used in Windows via Samba?

Thanks!
 

SViscusi

Golden Member
Apr 12, 2000
1,200
8
81
Zfs isn't a real good option for Linux yet. I believe the project to develop native support hasn't yet released a stable version, and ZFS FUSE has other issues. If you want Zfs either run an O/S that has good support for it (FreeBsd, Solaris, etc), or virtualize it. Else you're better off sticking with Ext.
 

hasu

Senior member
Apr 5, 2001
993
10
81
Zfs isn't a real good option for Linux yet. I believe the project to develop native support hasn't yet released a stable version, and ZFS FUSE has other issues. If you want Zfs either run an O/S that has good support for it (FreeBsd, Solaris, etc), or virtualize it. Else you're better off sticking with Ext.

Even when it is finally available for Linux, will we get the benefits (mainly reliability) of ZFS if it is used as an underlying file-system for Samba. I read some where that the ZFS must be very close to its client with no middle layers.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Even when it is finally available for Linux, will we get the benefits (mainly reliability) of ZFS if it is used as an underlying file-system for Samba. I read some where that the ZFS must be very close to its client with no middle layers.

If it's ever available in a decent format. The license makes it impossible for a kernel level filesystem driver to be written at this point so unless that gets fixed FUSE is the only method that will happen and that will always be slower than the alternative. One should really just hope that another filesystem like XFS or ext4 get checksumming, dedup, compression, etc added in at some point and then combined with mdadm and lvm you have an arguably better setup because you would have the same features without all of the layering violations in ZFS. Or just hope that BTRFS makes huge strides and becomes 1.0 stable very, very soon.

However, the primary benefits like checksumming don't require anything special by the client or daemon using it. They just happen in the background. Obviously if you want it to be able to do things like emulate Windows VSS for Previous Versions there needs to be some ZFS-specific code in Samba to manage the snapshots, but that's secondary.
 

LCTSI

Member
Aug 17, 2010
93
0
66
I hadn't, but unless Oracle relicenses ZFS under a GPL-compatible license it'll never be able to be merged with the kernel and separate redistribution is shady at best.

By supplying code and build scripts they use a CDDL kernel module which your system compiles itself.

Then their efforts are on modifications rather than a complete rewrite for GPL compliance.

They get to keep the good bonwick code this way.


I think it's a great project.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
By supplying code and build scripts they use a CDDL kernel module which your system compiles itself.

Then their efforts are on modifications rather than a complete rewrite for GPL compliance.

They get to keep the good bonwick code this way.


I think it's a great project.

But Linux kernel modules are statically linked at runtime so the general consensus is that they are derived works of the kernel and have to be under the GPL or a more permissive license like BSD to be legally redistributed. So while he may be kind of ok distributing it as source via PPA, I still think that's gray and probably not legal either, it'll never be included in any distribution because of the licensing issues. It's good from a technical "Is this possible?" perspective, but I doubt it'll ever be really useful to anyone.
 

LCTSI

Member
Aug 17, 2010
93
0
66
But Linux kernel modules are statically linked at runtime so the general consensus is that they are derived works of the kernel and have to be under the GPL or a more permissive license like BSD to be legally redistributed. So while he may be kind of ok distributing it as source via PPA, I still think that's gray and probably not legal either, it'll never be included in any distribution because of the licensing issues. It's good from a technical "Is this possible?" perspective, but I doubt it'll ever be really useful to anyone.

The key here is that since you're compiling from source, you're not redistributing the statically linked module, so you're not violating the derived works clause. Distributions include DKMS modules all the time. This is nothing new. Have you used it on Linux?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The key here is that since you're compiling from source, you're not redistributing the statically linked module, so you're not violating the derived works clause. Distributions include DKMS modules all the time. This is nothing new. Have you used it on Linux?

I would still be very leery of touching it, especially now that Oracle owns Sun. I've used ZFS a little bit, but not on Linux and I have very little desire to do so. Linux software RAID + LVM + XFS/ext4 is more than good enough for me. The checksumming would be nice, but not worth subjecting myself to FreeBSD or Solaris. Hopefully BTRFS will mature to the point where it won't matter or someone will add the filesystem level features like checksumming, compression, etc to an existing Linux filesystem at some point.
 

LCTSI

Member
Aug 17, 2010
93
0
66
I would still be very leery of touching it, especially now that Oracle owns Sun. I've used ZFS a little bit, but not on Linux and I have very little desire to do so. Linux software RAID + LVM + XFS/ext4 is more than good enough for me. The checksumming would be nice, but not worth subjecting myself to FreeBSD or Solaris. Hopefully BTRFS will mature to the point where it won't matter or someone will add the filesystem level features like checksumming, compression, etc to an existing Linux filesystem at some point.

Oracle isn't going to sue you for doing something that the CDDL license was explicitly designed to permit.

ZFS is great. Solaris is good. It has so many features that I miss when subjecting myself to Linux.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Oracle isn't going to sue you for doing something that the CDDL license was explicitly designed to permit.

ZFS is great. Solaris is good. It has so many features that I miss when subjecting myself to Linux.

Oracle would if they could and I'm not willing to trust anything of theirs that isn't under the GPL or a more free license. As a Linux user, GPL compatibility is important to me and the CDDL doesn't have that.

ZFS and Solaris have some nice features, but Linux is so much more usable that it's not even funny. Things like ZFS, dtrace, zones, etc aren't worth having to put up with all of Solaris' idiosyncrasies and oddities. And I think ZFS would have been better off leaving out the non-filesystem things like volume management and leaving that in a layer of its own.
 

LCTSI

Member
Aug 17, 2010
93
0
66
Oracle would if they could and I'm not willing to trust anything of theirs that isn't under the GPL or a more free license. As a Linux user, GPL compatibility is important to me and the CDDL doesn't have that.
They can't, and the CDDL is compatible towards the GPL. The reverse is not true. You're not going to be sued by anyone, that's just incorrect FUD. The DKMS arrangement is compatible with the GPL.

ZFS and Solaris have some nice features, but Linux is so much more usable that it's not even funny. Things like ZFS, dtrace, zones, etc aren't worth having to put up with all of Solaris' idiosyncrasies and oddities. And I think ZFS would have been better off leaving out the non-filesystem things like volume management and leaving that in a layer of its own.
Linux is so far behind in many areas, and Solaris seems to swap by being behind in other areas that Linux excels at. What idiosyncrasies and oddities bother you? I went from being a Linux admin of 5 years to a mixed environment of Solaris and Linux. It's been great, and Solaris just continues to get better.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
They can't, and the CDDL is compatible towards the GPL. The reverse is not true. You're not going to be sued by anyone, that's just incorrect FUD. The DKMS arrangement is compatible with the GPL.

The GPL existed first, thus the CDDL is incompatible with it. If Sun wanted ZFS to be adopted by Linux they would have picked a license that didn't conflict with the GPL. But they knew that if it could be included with the Linux kernel there would be even less of a reason to consider Solaris. Too bad that didn't work out so well for them.

Linux is so far behind in many areas, and Solaris seems to swap by being behind in other areas that Linux excels at. What idiosyncrasies and oddities bother you? I went from being a Linux admin of 5 years to a mixed environment of Solaris and Linux. It's been great, and Solaris just continues to get better.

What areas is Linux "so far behind" Solaris?

The only specific thing I can think of right now, is package management. The crap in Solaris doesn't even compare to dpkg/apt/aptitude. The other thing is the defaulting to non-GNU tools which is mostly an inconvenience, but can be a major PITA when going back and forth. I'm sure if I was forced to spend more time with Solaris my views toward it would be more favorable. But hopefully that doesn't happen any time soon.
 

LCTSI

Member
Aug 17, 2010
93
0
66
The GPL existed first, thus the CDDL is incompatible with it. If Sun wanted ZFS to be adopted by Linux they would have picked a license that didn't conflict with the GPL. But they knew that if it could be included with the Linux kernel there would be even less of a reason to consider Solaris. Too bad that didn't work out so well for them.
The GPL specifically excludes other licenses. That's not the CDDL's provision, it's the GPL being incompatible with anything else. The CDDL doesn't care if you stab in a bunch of proprietary binaries. Sun has a lot of vendors who work with them and they can't just fly the finger to everyone.


What areas is Linux "so far behind" Solaris?
you've touched on a lot of them, but there's still RBAC, a better init facility, better per-process I/O accounting, better scheduling (cgroups are lackluster), software RAID (mdadm *still* doesn't read-balance RAID1, while svm has since the dawn of time and ZFS read-balances mirrors), better alternate boot environment facilities, etc
The only specific thing I can think of right now, is package management. The crap in Solaris doesn't even compare to dpkg/apt/aptitude. The other thing is the defaulting to non-GNU tools which is mostly an inconvenience, but can be a major PITA when going back and forth. I'm sure if I was forced to spend more time with Solaris my views toward it would be more favorable. But hopefully that doesn't happen any time soon.
IPS was a step in the right direction, don't you think? I install a pretty big GNU toolset on Solaris machines anyway so that's largely a moot point.
 
Last edited: