Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Sun Microsystems Software Linux

ZFS On Linux - It's Alive! 281

lymeca writes "LinuxWorld reports that Sun Microsystem's ZFS filesystem has been converted from its incarnation in OpenSolaris to a module capable of running in the Linux user-space filsystem project, FUSE. Because of the license incompatibilities with the Linux kernel, it has not yet been integrated for distribution within the kernel itself. This project, called ZFS on FUSE, aims to enable GNU/Linux users to use ZFS as a process in userspace, bypassing the legal barrier inherent in having the filesystem coded into the Linux kernel itself. Booting from a ZFS partition has been confirmed to work. The performance currently clocks in at about half as fast as XFS, but with all the success the NTFS-3g project has had creating a high performance FUSE implementation of the NTFS filesystem, there's hope that performance tweaking could yield a practical elimination of barriers for GNU/Linux users to make use of all that ZFS has to offer."
This discussion has been archived. No new comments can be posted.

ZFS On Linux - It's Alive!

Comments Filter:
  • Yet to be included? (Score:2, Informative)

    by vialation ( 885786 ) on Tuesday June 19, 2007 @02:50PM (#19568499)
    The summary makes it sound as if ZFS will ever be included in the kernel. Anything FUSE will never be in the kernel, except the FUSE driver itself. Userspace programs and kernelspace are considered separate for a reason.

    Of course, this will all change if both Sun and Torvalds switch to GPL3...
  • Grub (Score:5, Informative)

    by jshriverWVU ( 810740 ) on Tuesday June 19, 2007 @02:51PM (#19568507)
    Booting from a ZFS partition has been confirmed to work

    Grub has supported ZFS booting for a while (forget which branch though).

  • by vialation ( 885786 ) on Tuesday June 19, 2007 @02:53PM (#19568541)
    It has been decided that the deciding factor with the GPL is whether or not something links to it. Instead of a userspace program which simply makes a system call by tripping an interrupt or using the SYSENTER opcode (which would not require kernel source code to do), a kernel module (which, without FUSE, a filesystem must be) actually gets linked into kernel space, and has its symbols added to the kernel. Any calls to other parts of the kernel directly call the kernel. That is the distinction.
  • Re:Grub (Score:2, Informative)

    by vialation ( 885786 ) on Tuesday June 19, 2007 @02:55PM (#19568593)
    Getting GRUB to load ZFS was easy since Sun released GPL boot code which could minimally read a ZFS partition. The hard part is making it so that the kernel can use the filesystem as root, which requires ZFS to be built into the kernel. Unless you are using an initrd or some other FS for the boot partition. Direct booting is extremely difficult.
  • Never mind ZFS (Score:3, Informative)

    by overshoot ( 39700 ) on Tuesday June 19, 2007 @02:56PM (#19568595)
    What I desperately need is a reliable caching filesystem with decent performance.

    The $COMPANY network is loaded with Linux workstations and servers, all with their own lotsabyte drives -- and the only things those drives are used for is a tiny system image. Meanwhile the network is getting hammered.

    I might not kill to get a several-hundred-gigabyte local network cache -- but don't tempt me.

  • Re:It's time for Sun (Score:1, Informative)

    by Anonymous Coward on Tuesday June 19, 2007 @02:56PM (#19568607)

    They also have co-opted gnome

    No "co-opting" necessary. Solaris is every bit as much a terget platform for Gnome as Linux is.
  • by vialation ( 885786 ) on Tuesday June 19, 2007 @02:59PM (#19568653)
    People do not complain because they realize that the lack of openness that you greatly exaggerate is only to require GPL'd code to remain GPL'd. GPL is not a license of "openness" -- it is a mechanism by which to counteract copyright (by means of copyleft). It is restrictive in the sense that proprietary software has restrictions, but in the opposite manner. You must keep it free in the same way that you must keep propietary software closed and proprietary by law. My opinion is that this is a good thing for furthering the Free Software movement. Stallman tries to make it clear that the number of people using your code is of no importance, but rather that it remain free.
  • by LWATCDR ( 28044 ) on Tuesday June 19, 2007 @03:01PM (#19568675) Homepage Journal
    I am not a kernel hacker but I believe you are confusing loadable kernel modules with user space code.
    I am pretty sure that kernel modules run at the kernel level and can access all the same structures that a driver compiled into the kernel can.
    FUSE file systems run at the same privilege level as a user program does. In theory it is a slower but more robust system. If a FUSE file system crashes you can just restart the filesystem and remount the drive. If a kernel level file system crashes it can cause a kernel panic and bring down the entire system.
    So the distinction between user-land and kernel drivers is anything but arbitrary.

  • Re:Never mind ZFS (Score:4, Informative)

    by Krondor ( 306666 ) on Tuesday June 19, 2007 @03:02PM (#19568691) Homepage
    What I desperately need is a reliable caching filesystem with decent performance.

    The $COMPANY network is loaded with Linux workstations and servers, all with their own lotsabyte drives -- and the only things those drives are used for is a tiny system image. Meanwhile the network is getting hammered.


    Are you asking for a network based filesystem like AFS [wikipedia.org]? Did I misunderstand your issue?
  • by kaleco ( 801384 ) <<greig.marshall2> <at> <btinternet.com>> on Tuesday June 19, 2007 @03:05PM (#19568727)
    If you can suffer the bizarre presentation style Sun have used for this video [google.com], it's quite informative about the benefits of ZFS.
  • Re:It's time for Sun (Score:3, Informative)

    by OYAHHH ( 322809 ) * on Tuesday June 19, 2007 @03:12PM (#19568813)
    Wrong,

    Sun exists to make money for it's shareholders. If and when it becomes advantageous to their share price to release ZFS then they will do it.

    They have already stepped up to the plate and released Star/OpenOffice, Java, and significant portions of Solaris. Each of those software products is a very significant level of magnitude of work. How about a little bit of appreciation for those several person-years worth of work?

    To imply that Sun is playing licensing games is disingenuous, at best.

    And if you want to call someone out on licensing then how about Linus himself. Why does he own the trademark Linux? Yes, he provides free sub-licensing terms, but those are Linus' terms.

    Much as Linus has his limits, Sun has it own limits of what it is willing to give up.

    When Linus decides to give up the Linux trademark freely then he can legitimately start complaining about Sun Microsystems.

  • by andrewd18 ( 989408 ) on Tuesday June 19, 2007 @03:17PM (#19568867)
    According to Darren Moffat at SUN, parts of ZFS are already licensed under the GPL v2. Maybe there is still hope for a native solution. Not, of course, that I mind using FUSE.

    http://blogs.sun.com/darren/entry/zfs_under_gplv2_ already_exists [sun.com]

    Now about that headline, yes I really did say that ZFS code is already available under the GPLv2. I will be completely honest though and make it clear that it isn't all of the ZFS source. It is, sufficient amount to be able to boot an OpenSolaris based system from GRUB, that means that support for mirroring and the checksum and compression support is there but radiz isn't nor are the userland commands. It is possible that this might be enough to get someone started. Still don't believe me check out the updated GRUB source on opensolaris.org, specifically all the files with zfs in their name - every single one of them under the GPLv2 or later.
  • by notamisfit ( 995619 ) on Tuesday June 19, 2007 @03:26PM (#19569017)

    The version of the GPL included with the Linux kernel states at the top:

    • NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work".

    Not sure how far back this clarification really goes, but I think it predates the GPLv2-only one, making it at least six years old.

  • by jimicus ( 737525 ) on Tuesday June 19, 2007 @03:46PM (#19569353)
    What's so terrible about booting from a different drive / file system?

    Nothing per se, but AIUI ZFS allows you to specify how much (if any) redundancy you want, which with other filesystems requires setting up RAID separately which in turn adds complexity.

    I suspect that most people that would run ZFS are the type of people that leave their machines up for months at a time. In that case, why the panic attacks over booting issues?

    Generally speaking, the kind of system that you want to have up for months at a time is also the kind of system you want to come back up as quickly and painlessly as possible should something happen which causes/necessitates a reboot. That's one of the main reasons journalling was invented.

    I'm excited about ZFS (in concept and theory) and I would love to give it a go. Finally a system that's up with the times.

    Not sure about "up with the times". I have yet to see any convincing explanation of what amazing features ZFS offers which hasn't been in AIX's logical volume management system for years.
  • by Per Abrahamsen ( 1397 ) on Tuesday June 19, 2007 @03:58PM (#19569595) Homepage
    The FSF has used the syscall interface as a guideline to determine whether something is a derived work or not. It is a guideline, not a hard rule though, and I suspect they would consider user-space ZFS for a derived work using a technical trick to avoid being linked into the kernel. I.e. infringing. However, since the FSF doesn't own the kernel, their opinion on the subject doesn't matter.
  • by Vancorps ( 746090 ) on Tuesday June 19, 2007 @04:31PM (#19570159)

    This is and was always one of the chief complaints about Windows as well, everything in the kernel so a malfunction can take the whole system down. Now the push to user-space makes everything more robust. Of course you also take a performance hit hence the slowness that is Vista.

    Still, if ZFS under FUSE is half as fast as XFS in kernel-mode then you're not talking about an FS that is particularly slow, you would still gain the data protection from ZFS which in my mind at least is the whole point. It would work for a near-line type storage system where performance isn't as critical. When the speed gets up then it can move to online storage where it will utilize the lessons it learned from near-line storage giving it a track record which will make people more comfortable in adopting it.

  • by pthisis ( 27352 ) on Tuesday June 19, 2007 @04:38PM (#19570281) Homepage Journal
    The FSF has used the syscall interface as a guideline to determine whether something is a derived work or not. It is a guideline, not a hard rule though, and I suspect they would consider user-space ZFS for a derived work using a technical trick to avoid being linked into the kernel. I.e. infringing. However, since the FSF doesn't own the kernel, their opinion on the subject doesn't matter.

    OTOH, some respected kernel developers (e.g. Alan Cox) certainly have explicitly said they believe binary kernel modules must be GPL and that things like nvidia's drivers are probably infringing. Not exactly the same thing but it's enough that I'd still call this a grey area until it's tested.
  • Re:Grub (Score:3, Informative)

    by lmfr ( 567586 ) on Tuesday June 19, 2007 @04:42PM (#19570339) Journal
    Yes, if you can mount it, you can boot from it, with the proper initrd/initramfs.

    As for the maintainer for sysvinit, the lsm [cistron.nl] tells you that. Or you could go with the maintainers of your distribution.

  • Re:Never mind ZFS (Score:2, Informative)

    by andrei_r ( 560152 ) on Tuesday June 19, 2007 @04:44PM (#19570361)
    One thing would be to migrate your Linux workstations and servers to Solaris x86, and use cacheFS.

    "When you enable cachefs file system, the data read from the remote file system or CD-ROM is stored in a disk-based cache on the local system. Subsequent read requests to the same data are fulfilled by the local cache, which improves read performance."

    Of course, a migration is not always an option, and I'm not sure if something like this available for Linux.
  • by larien ( 5608 ) on Tuesday June 19, 2007 @04:50PM (#19570463) Homepage Journal

    Not sure about "up with the times". I have yet to see any convincing explanation of what amazing features ZFS offers which hasn't been in AIX's logical volume management system for years.
    Ok, I'll bite on this one.

    • Ability to detect & disk corruption. Say you get a bad block/corruption on the bus/bug in a driver; your lovely mirror now has 2 different sets of data. Under every other volume manager I'm aware of, you have to guess which one has the correct data and resync (generally the whole drive). ZFS will automatically detect the corruption, figure out which drive has the correct data (using a checksum) and resync the data to the "bad" disk.
    • Filesystems grow & shrink on the fly with no intervention. You have a 100GB disk (mirrored of course...) with two filesystems on it, but due to workloads, data moves between them. During the day, /data1 has 80GB, /data2 has 10GB. At night, /data1 shrinks to 40GB but /data2 expands to 50GB during the batch; ZFS will let this happen with no intervention. You can also, if you want, allocate a minfree and max size of a filesystem if you want more control. You can shrink filesystems as of AIX 5.2 or 5.3, but that's fairly new and you'd need to manage it manually.
    • Snapshots. They've been in various other VMs (e.g. Veritas) or filesystems (UFS snapshots have been in Solaris since Solaris 8 IIRC) but I don't recall them in AIX.
    As for booting ZFS, the fact you could shrink or grow root & var filesystems is something new - Certainly, Solaris does not support resizing the root filesystem on the fly, even with Veritas on your root disks. The only way to resize is a backup/restore cycle (booting from CD) or using something like Live Upgrade (build a new image on some spare disks, then boot into it).
  • by Anonymous Coward on Tuesday June 19, 2007 @05:17PM (#19570859)
    The addresses (known as DVAs, or "data virtual addresses") used in the SPA (storage pool allocator) are 128-bit. This is currently divided into a 63-bit offset within a vdev (virtual device), 32-bit vdev id, and some additional bits for implementing RAID-Z and fragmented (gang) blocks. For more information, see:

    http://src.opensolaris.org/source/xref/onnv/onnv-g ate/usr/src/uts/common/fs/zfs/sys/spa.h#107 [opensolaris.org]

    However, the ZPL (ZFS POSIX layer) and DMU (data management unit) currently use 64-bit object identifiers based largely on the fact that no 128-bit POSIX interfaces exist (open128, stat128, etc). This could be changed in the future without affecting the on-disk block pointers, but for the time being the maximum size of any filesystem is 2^64.
  • by BrainInAJar ( 584756 ) on Tuesday June 19, 2007 @05:26PM (#19571009)
    or they could avoid the hassle of managing a dual licensed project & the inevitable GPL-only fork ( what happens if someone wants to import a driver from linux? that's an instant fork ) by keeping the perfectly-fine license they have right now

    relicensing Solaris as GPL is entirely unnecessary and doesn't help Sun or Solaris at all... the only people it helps is Linux, and that shouldn't be the primary concern of OpenSolaris.

    If OpenSolaris happens to help Linux, great, but it shouldn't hurt itself & go out of it's way to do it
  • by Sancho ( 17056 ) on Tuesday June 19, 2007 @06:20PM (#19571741) Homepage
    He certainly owns the rights to parts of the Kernel, and thus his opinion on the matter has some importance. However he has incorporated patches into the source tree without requiring that the copyright be turned over to him, and thus, just about everyone who has contributed to the kernel collectively 'holds the copyright' to it.

    The Linux kernel, for better or for worse, is going to be stuck at GPLv2.
  • by ChrisA90278 ( 905188 ) on Tuesday June 19, 2007 @06:28PM (#19571863)
    "It has been decided": When? By whom?"

    Linus decided. He wrote specific terms into the modified version of the GPL he uses with Linux. He makes it very clear. Linux does NOT use the "standard GLP" it makes a few changes for example he removed the "and later versions" part.
  • Re:Never mind ZFS (Score:3, Informative)

    by bill_mcgonigle ( 4333 ) * on Tuesday June 19, 2007 @06:31PM (#19571905) Homepage Journal
    Of course, a migration is not always an option, and I'm not sure if something like this available for Linux.

    Try the I'm Feeling Lucky search for 'linux cachefs'.
  • by Anonymous Coward on Tuesday June 19, 2007 @06:33PM (#19571929)

    16 EiB (2^64 bytes) - Maximum size of a file system
    16 EiB - Maximum size of a single file
    16 EiB - Maximum size of any attribute
    256 ZiB (2^78 bytes) - Maximum size of any zpool


    It is 128-bit clean, the problem is that ANSI C does not provide an data types larger than 64-bits, so they can't actually write (portable) data structures any larger.

    Once ANSI defines larger 'int's (96? 128?) then you can write code.

    Sun could probably use some kind of bignum library if they wanted to, but since they have not hit 64-bit restrictions on volume sizes yet there's no rush at this moment. They're just planning ahead a decade [sun.com] so they won't have to switch to another FS in the future. UFS lasted for about twenty years and they're hoping ZFS will last just as long.

    According to some basic math [sun.com] it would take as much energy to boil the earth's oceans to flip every bit on a 128-bit file system.
  • NBD (Score:3, Informative)

    by bill_mcgonigle ( 4333 ) * on Tuesday June 19, 2007 @06:37PM (#19571971) Homepage Journal
    Stick an old 20gb drive in as your boot drive

    That's *way* overkill. Grub can read minimal ZFS - just have Grub pull off an initrd image from your '/' drive (ZFS), load it into RAM (it'll be ext2 or squashfs or something the kernel can handle) and include a zfs.ko module on the initrd. Load it into RAM, do a pivotroot onto your ZFS / drive, and continue along your merry way.

    The 'you can't boot off of ZFS' canard is just a bit of hand-waving by the Sun-haters who are afraid of ZFS. We Sun-haters who like ZFS know how to hack around half-truths.
  • by Schraegstrichpunkt ( 931443 ) on Tuesday June 19, 2007 @06:53PM (#19572153) Homepage

    Linus decided. He wrote specific terms into the modified version of the GPL he uses with Linux.

    Retroactively, AND claiming to cover code for which he is not the copyright holder. The notice at the top of the COPYING file in the kernel source code more-or-less amounts to his opinion---and if you do a little research (read: Groklaw), you'll find that Linus clearly isn't a lawyer and doesn't know what he's talking about when it comes to legal matters.

    "Linus said so" is just not a valid argument about a legal matter, unless you're trying to defend yourself against a copyright infringement claim that he's making about code he holds the copyrights for.

  • Re:Ah, well then... (Score:3, Informative)

    by Sancho ( 17056 ) on Tuesday June 19, 2007 @06:55PM (#19572171) Homepage
    I'm not qualified to comment on this (read: I am not a lawyer), however I think that this still may be legally questionable. Because the CDDL ZFS files won't compile cleanly without modification to make them work with the Linux kernel, and because those modifications could be considered derivative works, it's possible that you'd be creating source files which are derivative works of both ZFS (CDDL-licensed) and Linux (GPLv2-licensed). Such a derivative work cannot be distributed legally.
  • Re:kernel patch? (Score:4, Informative)

    by burndive ( 855848 ) on Tuesday June 19, 2007 @07:14PM (#19572395) Homepage

    Why couldn't this be implemented in the kernel and have the patches to that kernel be hosted in a country which doesn't care too much about licensing?

    Why hide? Nothing in the CCDL or GPL licenses prevents you from publishing a CCDL patch to a GPL kernel. Publishing the patched kernel source or binary might run you into some problems, but I don't see anything preventing you from publishing the patch itself.

    Please correct me if I'm wrong.

  • by lymeca ( 1107567 ) on Tuesday June 19, 2007 @07:45PM (#19572679)

    The Right Thing(tm) is to keep the license as it is. It ensures the Solaris code has to be shared (like the GPL), but doesn't pollute source code around it

    No. First off, do not turn this into a continuation of the debate of which is more Free: copyleft licenses such as the GPL, or BSD-style "our code is SO free you can make it NON-free!". This specific situation is much simpler: Linux has been GPLv2 licensed for about 15 years now, and the GPL itself is much older than that. Sun created the CDDL in the 2000's (not sure which year exactly) and has thereby acheived deliberate license incompatability with Linux and the GPL. There are other non-copyleft licenses which are GPL-compatible that Sun could have chosen, but they didn't: not that there's anything inherently wrong with this of course, it's their decision. Also, the GPL is NOT "incompatible with anything other than itself" like you state, check this list [gnu.org] to find all the licenses that disprove this wildly inaccurate statement.

    It is not inherently Right or Wrong to use the CDDL for ZFS or the rest of Solaris. Sun holds the copyright on that code, so Sun can choose to license those projects however they see fit. It is not your place to say what license is correct for Sun to use on their code. Perhaps to your dismay, Sun has been seriously considering GPLv3 for Solaris [eweek.com], much like they did with Java and the GPLv2. And for all your talk about Linux "pillaging" code from Sun, you conveniently forget that this was a main driving reason for Sun to license Java under the GPLv2: license compatibility with GNU/Linux for easy inclusion of Java technology in distributions to attract users and developers.

    ( GPL - viral clause = CDDL. Same license as firefox, or apache)

    While the CDDL was originally based on the Mozilla Public License, it is not the same thing. Perhaps more importantly though, Firefox is tri-licensed under the MPL, LGPL, and yes, the GPL. I can get a copy of Firefox licensed under the GPL, so it's especially important not to mislead others into thinking that such a prominent Free Software project exclusively uses a non-copyleft license, the CDDL, which isn't even one of the three licenses Firefox uses in the first place! Oh, and Apache has its own license altogether, albeit a non-copyleft one, the Apache license [wikipedia.org].
  • by the_womble ( 580291 ) on Tuesday June 19, 2007 @09:55PM (#19573835) Homepage Journal

    Linux does NOT use the "standard GLP" it makes a few changes for example he removed the "and later versions" part.
    Wrong. Here is the COPYING file for the Linux kernel [kernel.org].

    He has added a note clarifying that userland programs making system calls are not derivative works. That is clarifying his interpretation of the license. At the most, it adds an exemption, which is common practice.

    The "and later versions" clause is not part of the GPL, it lies outside it. In effect, it makes the work automatically multiple licensed as and when new versions of the GPL comes out: so if you distribute something under GPL v2 with that clause, when v3 comes you it will become dual licensed under 2 and 3, when v 4 comes out it will be triple licensed etc. This allows people to redistribute under v2 or any later version, with or without the "and later versions" clause.

  • Re:Isn't that... (Score:3, Informative)

    by Sancho ( 17056 ) on Tuesday June 19, 2007 @10:03PM (#19573889) Homepage
    You clearly do not understand the word random.

    A patch is structured, and further, contains specific (nonrandom) information on how to transform an input file into a previously created output file. It is, by definition, derived from two input files.

    Furthermore, you appear to believe that a derivative work must somehow have structure or purpose similar to that of the original work. If I take Stephen King's The Gunslinger novel and remove every other word, I have created a new work derived from his. The novel might be somewhat readable, and it might not be. However it is clearly derivative.

    Taking this further becomes tricky. What if I remove two out of every three words? It's probably still clearly derivative. Three out of every four? Maybe. It eventually becomes difficult to prove that the work is derivative--however this does not apply to patch files, which are reversible by design.

  • by mabinogi ( 74033 ) on Wednesday June 20, 2007 @02:05AM (#19575269) Homepage
    There is no license that gives you the right to re-license someone else's copyrighted work.
    The GPL doesn't require that everything linked to it be GPL'd, it requires that any changes or derivative works be licensed under a license (any license) that adds no more restrictions than the GPL itself does.

UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker

Working...