6 ms·
Linux RAID is different from Windows for sound technical and historical reasons
- dredmorbius 10y agoSubmitter's comment. Alan Cox, former #2 Linux kernel developer, at G+, on the differences between Linux and Microsoft RAID support, related to recent Lenovo news,[1] and the technical and historical basis for this. I did some massaging of the fourth paragraph, which seems closest to a lede/head, to fit within HN's 80 character headline limit. The first four 'graphs of the post: "Unsupported models will rely on Linux operating system vendors releasing new kernel and drivers to support features such as RAID on SSD" Good to see that the tech press fact check comments from companies as well as the political press fact check politicians. I'm reading this on a box with RAID1 SSD. It's had RAID1 SSD for some years. Linux has supported RAID on SSD for years, in fact it supported it from the moment you could plug an SSD into a Linux PC. Linux RAID is different from much of the Windows experience, for a mix of sound technical reasons and historical ones. ________________________________ Notes: 1. http://www.gossamer-threads.com/lists/linux/kernel/2352338 http://www.gossamer-threads.com/lists/linux/kernel/2352338 (from Cox's post).
- OMGWTF 10y agoAfter looking at the gossamer thread: Could this be directly related to the current BIOS problems? Lenovo's closed source driver runs into problems -> Lenovo dev wants to commit workaround to Linux, fails -> force different PCI-ID as alternate workaround by crippling the BIOS? Firmware gets copy&pasted to non-servers?
- mike-cardwell 10y agodmraid is pretty cool. My desktop has 4 disks configured in a "fakeraid" RAID 10 setup. My desktop dual boots Debian and Windows. I can use/share that RAID 10 volume under both Debian and Windows just as easily as I could a single disk. I use half of the volume for my Windows Steam library and the other half for my Linux Steam library. I didn't have to do anything special under Linux. dmraid just made it magically work.
- dogma1138 10y agoIs this in reference to the whole "OMG Microsoft/Lenovo is locking down your laptop!" scandal?
- dredmorbius 10y agoYes: https://news.ycombinator.com/item?id=12568010 https://news.ycombinator.com/item?id=12568010
- vt240 10y agoHasn't Windows supported software RAID for quite a while now ?
- MichaelGG 10y agoYes Windows has had RAID for a long time. There has been various limitations. I don't think you can boot a RAID 0 volume, for instance. It's certainly not as flexible as Linux's model, but Windows usually isn't. As far as hardware RAID controllers, at least you get a battery-backed write cache that will "just work" without the OS, right? As in, you don't need to boot the OS to finish flushing. Or maybe I've just bought into the hardware RAID marketing. It does seem simpler, as in less to deal with, to let the card do it and just present whatever volumes desired to the OS.
- cm2187 10y agoMy time playing with hardware RAID cards is over. My disks spent their time dropping on different builds (even with TLER disks only). For a home NAS, a synology style linux software RAID with regular data scrubbing is the peace of mind solution. For the cache problem, a cheap UPS that lasts the few minutes required to gracefully shut down is a good enough solution. As for performance, my bottleneck is the 1 gigabit port on my laptop anyway. And I don't see any improvement on the horizon for that anyway.
- Shish2k 10y agoIsh, and it depends on version -- like I created a RAID1 array for my gaming box when I was using windows 7 pro; then upgraded to windows 10 home thinking "I'm not using any of the pro features anyway"... turns out that RAID1 is a pro feature. What's worse: if you try and mount the drives, it doesn't say "this looks like a raid1 volume, I don't have drivers for that, please upgrade to access this data", it says something more like "data corrupt, would you like to format this drive? [Yn]" :/
- jamiesonbecker 10y agoYou can do really cool things with Linux RAID, like RAID stripe across 8 virtual (i.e., EBS @ EC2) volumes and then layer dmcrypt on top of that or other things for use cases that it was never even designed for. Linux RAID (and volume management) were really designed The UNIX Way as modular, small tools that can be applied like Lego bricks, and no where is that more user-visible than in the RAID/LVM/etc subsystems.
- kalleboo 10y agoOr just the classic Floppy RAID http://mac-guild.org/raid.html http://mac-guild.org/raid.html (this is OS X but the same thing applies)
- walrus01 10y agoNow do it with multiple 1.2MB 5.25" drives if you can find a system with a BIOS old enough to support the hardware, yet new enough to run a modern kernel.
- X86BSD 10y agoIt's 2016. If you are still deploying RAID, you're doing it wrong. Seriously guys, ZFS. Look it up.
- chris_wot 10y agoYou've been voted down, but I'm curious - could you elaborate?
- chungy 10y agoZFS has built-in support for redundant disks (in fact, using a lower-level hardware or software RAID under ZFS is not recommended). This allows it to do fancy things like allocate files intelligently across stripes, rebuild a disk with only the data used by the file system (huge time saver), and be able to repair files on-the-fly that are damaged, or at worst, report what files cannot be repaired.
- chris_wot 10y agoHope this comment isn't too ignorant, but how does it compare to gfs2?
- jfindley 10y agoIt doesn't. GFS2 is a clustered filesystem, ZFS is not. GFS2 is for sharing a single filesystem between multiple nodes, with a distributed lock manager to avoid corruption. It's complex to fix when it breaks, generally fairly slow and very few people need it - for most users, NFS (especially v4 and up) is a better way of accomplishing the same end goal.
- xioxox 10y agoBut it won't let you add disks to your array one-by-one, unlike linux software raid.
- seschwar 10y ago
- RubyPinch 10y ago> The Linux RAID history is different because unlike Microsoft the decision was made to integrate software RAID properly with the OS. Well there wasn't really a choice was there?
- kev009 10y agoInteresting if rosy glasses view; Linux didn't propagate I/O barriers until 2.6.33 on most common mdraid setups which is absolutely insane. https://monolight.cc/2011/06/barriers-caches-filesystems/ https://monolight.cc/2011/06/barriers-caches-filesystems/ I know this is Linux's Alan Cox but the post reads like a typical Windows hater Linux desktoper and is quite amusing and even quaint if you have just passing familiarity with ZFS internals to contrast. As far as the layered approach I would also suggest study of FreeBSD's geom which dips slightly below and above Linux's mdraid (i.e. you still use geom with ZFS, zvols) but IMHO is a bit cleaner probably because it's a later arrival.
- creshal 10y agomdraid will still, after some 10 years of the bug being known[1], happily corrupt all your data if you mix hardware with different queue sizes. How do you know you you have hardware with different queue sizes? Why, you start to experience data corruption for no apparent reason, of course. There's no other warning. And the only "workaround" is setting the global queue size to the lowest common denominator of the hardware installed – and God help you if you later install hardware with a lower queue size. [1] https://bugzilla.kernel.org/show_bug.cgi?id=9401 https://bugzilla.kernel.org/show_bug.cgi?id=9401
- skissane 10y agoIs that bug actually fixed or not? The bug status is "CLOSED CODE_FIX", but commenters in the bug say they still have the problem with kernel versions in which the fix is supposed to be present. (Aside: I think bug trackers should be configured in such a way that you can't mark a bug as having been fixed unless you specify the ID of the commit in which it was fixed.)
- creshal 10y agoIt's not fixed, I'm still seeing it on kernel 4.8.
- makomk 10y agoThat bug report isn't about data being corrupted due to mixing hardware with different queue sizes. The problem described in that bug is that if you add a device at runtime with a smaller queue size, the queue size of the mdraid device correctly decreases. However, if you have a dm-crypt volume mounted on top of that when you add the device then dm-crypt doesn't have any way of detecting the queue size change and stuff breaks. Just mixing different queue sizes shouldn't cause this, and neither should adding devices to a mdraid volume without anything stacked between it and the filesystem.
- cm2187 10y agoDoes linux RAID supports TRIM? I believe most hardware RAID cards still do not.
- Qantourisc 10y agoSome RAID models support TRIM at this point (modern kernel version). I can't find the commit or change log in a few seconds. But this bug confirms it: https://bugzilla.kernel.org/show_bug.cgi?id=117051 https://bugzilla.kernel.org/show_bug.cgi?id=117051 (Very slow discard(trim) with mdadm raid0 array )
- deleted 10y ago[deleted]