News for hackers. Stuff that matters.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Philipp__ on Friday August 05, 2016 @11:35AM (#12233096)
It is amazing how stubborn Linux people are. They constantly refuse and reject superior engineering that was done outside of their realm. (yeah I was pointing at ZFS, but that would be just one of many)
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by X86BSD on Friday August 05, 2016 @12:47PM (#12233782)
This is Linux's legacy. Rejecting already solved problems only to try reinvent the wheel their way and often their wheel is broken and horribly engineered if engineered at all. See btrfs v zfs, kqueue vs their current poll of the month method, dtrace vs system tap, the list goes on a mile long.

It's so frustrating to watch this. To see all these projects being developed on Linux where it's easier for others to simply reimplement the idea from scratch than try and remove all the Linux only code from them.

The Linux world only thinks about itself. In a spectacularly selfish way.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by rleigh on Friday August 05, 2016 @05:56PM (#12235985)
I spent a couple of decades being a die hard Linux fanatic, and contributor to many parts. The amount of work being done is incredible. But I'd have to say that I've become over time increasingly annoyed by the vast duplication of effort, pointless wheel reinvention and pointless scrapping of perfectly good code just because someone wanted to rewrite it rather than carefully refactor it. Looking at the long term effects over the last 20 years, a lot of that work was utterly pointless and detrimental; my patches to fix the GNOME canvas were ignored in the bug tracker for over a decade before it was closed--meanwhile they wrote in parallel over six replacements, all of which are now dead and none of which improved the canonical (and now also dead) implementation! All the power management and hardware abstraction stuff has gone through multiple rewrites from scratch, and with little thought to backward compatibility. This is not to denigrate the effort people put in, but effort needs to be directed effectively or else it is ultimately wasted. The success of Linux has lead to a disturbing amount of NIH attitudes--we're so big we don't need to care about compatibility and interoperability--foolishly forgetting that these things are what caused the original adoption of Linux, being compatible with everything under the sun was it's big selling point.

In the case of Btrfs it's a laudable effort, but has yet to approach production readiness in an awfully long time. Even if the licences are incompatible, the on-disk structures of ZFS could have been used to create a compatible implementation.

So I'm afraid I'm increasingly using other systems such as FreeBSD (with ZFS) and leaving Linux behind somewhat. Ultimately open systems, open standards and free software and software freedom are more important than a single implementation.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by kbenson on Saturday August 06, 2016 @04:04PM (#12239653)
Well, I think the problem is somewhat more subtle, but to an end effect that's the same. That is, it's useful to have people trying new things, and even throwing shit at the wall and seeing what sticks. Interesting new ideas come out of that. The problem is that you don't want that to necessarily be the de facto strategy for your accepted solutions to problems, and definitely not how a major player in your ecosystem routinely progresses.

If Linux was a research experiment with exposure but little use compared to the other Unix systems, we would probably all look at it much more favorably, not because they are doing things right, but because they are willing to try crazy shit that we would all get to see the post-mortems for. The problem is that Linux is not some semi-obscure OS, so instead of these experiments being interesting reading for the weekend, we're often forced to become users of them, whether we like to or not.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by emmelaich on Friday August 05, 2016 @11:05PM (#12236833)
Linux's 'legacy' is a policy of accepting code before it is known to be perfect. I don't know anyone who runs BTRFS and I certainly would not do so myself. Getting accepted as part of the kernel code is not an imprimatur of some sort.

I'd much rather this than the *BSD policies.

Oh and talking about FreeBSD, it's hardly bug free. Look at these Golang issues and tell me it doesn't indicate something wrong in the FreeBSD kernel threads/fork/exec code.

1. https://golang.org/issue/16136 2. https://golang.org/issue/15658 3. https://golang.org/issue/16396

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by X86BSD on Saturday August 06, 2016 @12:22AM (#12237005)
I'm not sure it indicates anything. They are all incredibly vague and no one seems to have any idea what's going on.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by emmelaich on Friday August 05, 2016 @11:12PM (#12236854)
... and even if I did use BTRFS, I wouldn't use raid5/6.

I'd never use raid5/6 on anything. Hardware is cheap.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by technofiend on Friday August 05, 2016 @02:15PM (#12234603)
This is why you need to update the phrase "GNU's not UNIX" to "Linux is not UNIX." I use systemd and it works fine but it's a great example of a complete departure from the idea of small single-task tools.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Grishnakh on Friday August 05, 2016 @02:50PM (#12234868)
>..."Linux is not UNIX." I use systemd and it works fine but it's a great example of a complete departure from the idea of small single-task tools.

And how does this approach compare to other UNIXes? And I don't mean UNIXes from the 1970s, I mean ones which are currently in use: FreeBSD, OpenBSD, Solaris, MacOSX. Last I heard, they all had roughly equivalent init systems to systemd.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by digi_owl on Friday August 05, 2016 @03:23PM (#12235105)
Solaris and MacOS perhaps, if we are talking strict init. but both of the BSDs use BSD init. There is a push by Jordan Hubbard to get FreeBSD to adopt Launchd (the MacOS init) but so far he has been rebuffed and has instead set out to fork FreeBSD into NextBSD.

Frankly this is what should have happened with the likes of Debian regarding systemd as well. A parallel release offering systemd as the default, alongside sysv. Then it would be up to the admins to pick, rather than have to apply contortions during or right after install to switch from systemd to sysv.

Instead Debian adopted systemd, and we got Devuan as a sysv fork...

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by technofiend on Friday August 05, 2016 @03:49PM (#12235272)
Well I can't speak to other systemd competitors but BSD and System V's scripts never had the concept of bundling in firewall configuration, cgroup config, mount points, etc into PID 1.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Kadin on Friday August 05, 2016 @01:35PM (#12234225)
ZFS is more stable, but the architecture it forces you into is IMO far from ideal in many cases.

I've played with BTRFS (in RAID-1 mode) instead of ZFS because of the latter's limitations about adding drives. With BTRFS, you can drop in a new drive at any time and rebalance. This is how things ought to work. ZFS's concept of VDEVs might make sense for huge corporate storage arrays, but they're just a pain if you're running a small server or NAS, where growing the array drive-by-drive is a very common scenario.

Due to the complexity of dealing with VDEVs, I've personally never seen much use for ZFS on Linux vs. just biting the bullet and dealing with LVM over mdadm. BTRFS is the closest thing to a compelling argument to moving away from that setup I've seen on Linux.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by alyandon on Friday August 05, 2016 @05:16PM (#12235800)
That and being able to trivially resize/reshape BTRFS storage volumes after adding/removing devices makes it more suitable for my personal home use.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by lomnakkus on Friday August 05, 2016 @11:36AM (#12233103)
The lack of ZFS is due to licensing.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by pantalaimon on Friday August 05, 2016 @11:43AM (#12233161)
Ubuntu has it
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by LukeShu on Friday August 05, 2016 @11:50AM (#12233224)
In violation of the license; probably.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by cm3 on Friday August 05, 2016 @11:54AM (#12233259)
AFAIK it's DKMS'ed just like Nvidia's kernel driver, so it's a user decision, just like media codec installation. Also, OpenZFS doesn't reuse kernel interfaces it's not allowed to, and that's why they carry their own crypto code now.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by lathiat on Friday August 05, 2016 @12:07PM (#12233391)
It's actually not DKMS in 16.04 - crypto problem still applies though.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by lomnakkus on Friday August 05, 2016 @12:17PM (#12233482)
Not necessarily. It's a run-time loaded module (as e.g. NVIDIA's graphics driver is) and 'taints' the kernel with CDDL, but since you -- the user -- aren't redistributing anything you are not breaking any copyright laws.

EDIT: ... and neither are Ubuntu since what they're doing is "mere aggregation" (see the GPL).

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Grishnakh on Friday August 05, 2016 @02:53PM (#12234890)
If it's a run-time loaded module with an incompatible license, that means it isn't really something you want as your primary filesystem. For a storage volume, sure, but not your root filesystem.

Honestly, this whole debacle could have been avoided if ZFS had been relicensed under some kind of compatible license like one of the BSD licenses.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by rleigh on Friday August 05, 2016 @05:39PM (#12235905)
There's no difference between the two types of filesystem; that's an arbitrary judgement.

Both the GPL and CDDL are distribution licenses; using a ZFS module with Linux isn't a problem, you aren't violating any of the licences by using them together on your computer system. There's plenty of precedent for non-GPL kernel modules. It's not a problem in practice.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by lomnakkus on Friday August 05, 2016 @05:35PM (#12235891)
I agree completely[1]. I'm not sure Ubuntu Server actually even offers ZFS during the install on any volume, nevermind on the root FS.

EDIT: [1] Well, now that I think about it... I don't agree that the skepticism should be based on licensing. I just think that ZFS-on-Linux is perhaps not mature enough quite yet and we do have off-site backups anyway, so we might as well try it if we're not doing anything absolutely 24/365-critical.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by rleigh on Friday August 05, 2016 @06:19PM (#12236087)
It's not supported by the installer (for 16.04), but you can do it by hand. It's poorly documented--there are several guides with contradictory advice--and it took me several attempts, but all the bits are there from GRUB to the initramfs and the main init. I got my workstation EFI booting with GRUB direct to root on ZFS a few weeks back; I can now "zfs send" whole system snapshots directly to my NAS.

Once this is a single option in the installer like it is for LVM, it will become properly usable. Right now, it's for masochists who want to experiment only (for the rootfs).

Regarding maturity, it's certainly not as well tested as on e.g. FreeBSD or Solaris, but it's been around for a good while at this point and I know a few people who have been running it for several years trouble free. I would certainly place it above Btrfs in the reliability stakes. The main limitations I've seen are cosmetic or Linux-specific; the zfs command is setuid root, which prevents delegating dataset admin to users (snapshot/send/recv your data, create your own subsidiary datasets etc.), Linux doesn't do NFSv4 ACLs in its VFS, and you can't transparently create NFS exports via zfs properties. None of these affect data integrity though. Not holding my breath waiting for NFSv4 ACLs, though it would certainly be a massively beneficial feature.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by dap on Friday August 05, 2016 @10:06PM (#12236715)
> Honestly, this whole debacle could have been avoided if ZFS had been relicensed under some kind of compatible license like one of the BSD licenses.

Or if Linux had been similarly relicensed. I think that's actually more reasonable, since it's the Linux license that may take issue with CDDL code, not the reverse.

Besides that, ZFS is covered by several patents, and the CDDL grants a patent license. If ZFS had been BSD-licensed, you'd have a much worse debacle.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Grishnakh on Monday August 08, 2016 @12:38PM (#12249014)
It's impossible to relicense Linux. Linus has talked about this in the past: he'd have to track down literally thousands of contributors to get their permission. Many of them are probably impossible to track down, some are surely dead. There's no feasible way to relicense a project like Linux.

ZFS, OTOH, is owned by a single entity, so relicensing it would be simple. It should be completely possible to make a new license that grants a patent license but is also GPL compatible.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by FireBeyond on Friday August 05, 2016 @12:47PM (#12233781)
Like Ubuntu or not, they went on record saying that they had consulted with legal counsel who was heavily involved with open source and that they signed off.

I'll take their word for it in good faith.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by vonmoltke on Friday August 05, 2016 @11:57AM (#12233286)
How is the license being violated?
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by snuxoll on Friday August 05, 2016 @12:58PM (#12233903)
I think HAMMER might be a good candidate for use with Linux, it's not as mature as ZFS and still lacks features that I actually use ZFS for (namely the self-healing and data integrity features), but HAMMER2 is well on its way and should soon be a viable alternative (read: not replacement) for many use-cases where ZFS is of benefit.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Grishnakh on Friday August 05, 2016 @02:54PM (#12234907)
The problem with HAMMER is that it reminds me of Stark Industries' inept competition in Iron Man 2.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by abrookewood on Saturday August 06, 2016 @12:48AM (#12237064)
To be fair, if there weren't licensing issues around ZFS, I'm pretty sure it would have been adopted without much resistance. As it is, there are STILL concerns about the licensing and Canonical went ahead and added it anyway! I don't see how you can classify that as Not Invented here syndrome.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by justin66 on Friday August 05, 2016 @02:15PM (#12234597)
> I was pointing at ZFS, but that would be just one of many

Taking close to two decades to make xfs an equal citizen would be another example.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Thaxll on Friday August 05, 2016 @11:38AM (#12233125)
The thing that need 8/16GB of ram to run. Creating a solid FS takes time, ZFS is good because it has been around for 10years.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by olavgg on Friday August 05, 2016 @11:49AM (#12233213)
ZFS runs fine with just 1GB of ram. Even several terrabytes of storage. When it comes to knowledge about ZFS, avoid about anything that comes from the FreeNAS community. It is quackery at its best.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by gsnedders on Friday August 05, 2016 @12:37PM (#12233682)
The problem is that there's so much quackery around ZFS when you Google for answers to any major problem. It's frequently hard to get good information.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Terribledactyl on Friday August 05, 2016 @01:20PM (#12234112)
I just want to point out that the official documentation is absolutely great.

http://docs.oracle.com/cd/E19253-01/819-5461/

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by the8472 on Friday August 05, 2016 @12:43PM (#12233738)
Doesn't ZFS dedup eat lots of ram? btrfs offers on-demand deduplication instead of it being always-on.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by snuxoll on Friday August 05, 2016 @01:00PM (#12233934)
Yes, it does. But dedup is rarely that useful in my experience, it sounds nice on paper but it often doesn't provide benefits worth the CPU and IOPS demand it generates. Compression is "good enough" 98% of the time, and ZFS does a fine job with it.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by unhammer on Friday August 05, 2016 @06:40PM (#12236178)
If you take snapshotted backups from ext4 etc filsystems (no send/recv), where users regularly reorganise photo folders, dedup is invaluable :-)
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by the8472 on Friday August 05, 2016 @01:18PM (#12234092)
dedup is quite useful when you have snapshots that somehow have lost their space-sharing. I guess it's due to files being replaced with identical files.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by rleigh on Friday August 05, 2016 @03:19PM (#12235071)
The Btrfs deduplication... also needs vast quantities of RAM. That's just the nature of the beast. Don't use it, and both systems have relatively modest requirements.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by the8472 on Friday August 05, 2016 @03:42PM (#12235225)
but it's on-demand and can use a scratch file, which makes it far more managable, e.g. you can let it run over the weekend.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by pmarreck on Friday August 05, 2016 @01:11PM (#12234043)
If you need filesystem dedup... Perhaps handle it in userspace instead
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by the8472 on Friday August 05, 2016 @01:19PM (#12234100)
Since ZoL does not have reflink copies or the range-dedup ioctl you cannot do it from userspace like you can with btrfs.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by oofabz on Friday August 05, 2016 @01:57PM (#12234438)
I run ZFS on a VM with 512MB RAM. It does web/mail/file serving and it has worked great.
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by cm3 on Friday August 05, 2016 @11:48AM (#12233205)
Isn't that just for the default dedup implementation where it's suggested to have 2-5GB per TB?

HAMMER fs can dedup with little RAM, but the ZFS devs aren't ignorant or uninformed, so I would expect them to have a plan to remedy the inefficiency of OpenZFS's dedup implementation. I know there are commercially avaialbe alternaitve dedup versions, but I don't have any experience with those.

Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by williamstein on Friday August 05, 2016 @11:46AM (#12233185)
Btrfs entered the Linux kernel over 7 years ago. (I've used both btrfs and ZFS a lot in production and would never touch btrfs again. I really like ZFS though.)
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by Thaxll on Friday August 05, 2016 @11:59AM (#12233320)
"The development of Btrfs began in 2007, and by August 2014, the file system's on-disk format has been marked as stable."
Re:Btrfs RAID 5/6 Code Found to Be Very Unsafe and Will Like... by rleigh on Friday August 05, 2016 @03:17PM (#12235053)
The on-disk format is the least of the problems with Btrfs. The quality of the implementation of the filesystem which uses that format is the bigger issue. It's still awful, and I've been using it since the start.

Two years ago, I migrated everything to ZFS and haven't looked back. It works. It hasn't lost any data, and it's easy to set up and administer. I can't give it any higher praise than that. It does its stuff with no fuss or drama.