Re: LUKS safety on RAID 1 mirror

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not send HTML-Email to this list...

Arno

On Thu, Nov 27, 2014 at 16:24:40 CET, Mark Connor wrote:
> <html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
> <style type="text/css"><!--p { margin-bottom: 0.1in; line-height: 120%; }
> --></style>
> <p style="margin-bottom: 0in; line-height: 100%">Hello</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&nbsp;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">Exactly this is why I started the topic:</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&nbsp;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&quot;Say the mirrors are incosistent due to an unnoted read error, the RAID</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">layer can not decide which of the two legs has faulty data. It can<br/>
> whatsoever reread both legs in hope the faulty read is corrected on reread<br/>
> and rewrite afterwards. I fear such actions are only taken during a forced<br/>
> rebuild though.&quot;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&nbsp;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">Back in 2005 when I was working a lot with servers built of commodity hardware (crappy asus motherboards with their *fake* raid controllers on board) I saw lots of interesting things. That was about the time when I lost my faith in RAID technologies forever. I rather make backups to tapes, cds, other drives periodically and stacking them up somewhere.</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&nbsp;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">Some of the worst failures I saw were corrupted RAID5 arrays with ext3, reiserfs, xfs. These corruptions mostly happened because of regular power outages and whenever I had to deal with them I know the chances to get any data back is less than 20% and then we don&#39;t even talk about any encryption just regular filesystems in raid.</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">&nbsp;</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">How does LUKS handles if part of the encrypted disk (not the header) or container gets corrupted?</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">With some encryption technologies even if 1 bit gets damaged in a container the data lost forever or becomes partially corrupted.</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">So this was back then in the time of slow ATA drives, linux kernel 2.4, raid-utils. Recovery on a 100GB drive took over a day.</p>
> 
> <p style="margin-bottom: 0in; line-height: 100%">Today still bunch of low end servers have those fake software raid controllers where you cant even swap a drive without shutting the machine down. Even tho if something goes wrong with an mdadm based raid array you still have more tools, community support and chance to recover data then from a 3ware or hp array.</p>
> 
> <div>&nbsp;
> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
> <div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Tuesday, November 25, 2014 at 4:27 PM<br/>
> <b>From:</b>&nbsp;&quot;Sven Eschenberg&quot; &lt;sven@xxxxxxxxxxxxxxxxxxxxx&gt;<br/>
> <b>To:</b>&nbsp;dm-crypt@xxxxxxxx<br/>
> <b>Subject:</b>&nbsp;Re:  LUKS safety on RAID 1 mirror</div>
> 
> <div name="quoted-content">I think Mark was aiming at some other concerns with his question.<br/>
> <br/>
> As you stated, backups are mandatory and RAID&#39;s purpose is extended<br/>
> availability (and speed).<br/>
> <br/>
> Regarding the concerns of the OP:<br/>
> When a device fails and gets marked as failed there&#39;s no difference to<br/>
> single drive operation. With TLER drives the drive will probably not get<br/>
> marked faulty and the broken sector can be rewritten with the data of the<br/>
> other leg, if that&#39;s implemented apropriately.<br/>
> What is problematic in a RAID is failure and unreported errors during<br/>
> read(). Say a sector including the LUKS header is instable, gets read and<br/>
> the retrieved data is faulty then broken data might get written to the<br/>
> mirror during manipulation operations including a following write. (Can be<br/>
> compensated by backups though)<br/>
> With two disks the probability of such a specific error increases, on the<br/>
> other hand a RAID1 implementation *should* level reads which in turn<br/>
> decreases the prob. to hit such a specific read error.<br/>
> <br/>
> The question that remains is: How probable is an unnoted (or unreported)<br/>
> read error and how does the RAID implementation handle specific error<br/>
> scenarios? (Unfortunately there&#39;s firmware bugs ...)<br/>
> Say the mirrors are incosistent due to an unnoted read error, the RAID<br/>
> layer can not decide which of the two legs has faulty data. It can<br/>
> whatsoever reread both legs in hope the faulty read is corrected on reread<br/>
> and rewrite afterwards. I fear such actions are only taken during a forced<br/>
> rebuild though.<br/>
> <br/>
> Reagrds<br/>
> <br/>
> -Sven<br/>
> <br/>
> On Tue, November 25, 2014 15:24, Arno Wagner wrote:<br/>
> &gt; On Tue, Nov 25, 2014 at 11:28:47 CET, Fabrice Bongartz wrote:<br/>
> &gt;&gt; Hi Mark,<br/>
> &gt;&gt;<br/>
> &gt;&gt; I currently employ the following setup:<br/>
> &gt;&gt; I have multiple md software raid 1 arrays and luks on top of that. For<br/>
> &gt;&gt; example, /dev/sda1 and /dev/sdb1 are two identifcal disks which are in a<br/>
> &gt;&gt; raid1 using md raid as /dev/md0. The luks encrypted device is /dev/md0.<br/>
> &gt;&gt; So far, I have had two discs fail in two different arrays and I have had<br/>
> &gt;&gt; no problem restoring them. The array continued in degrated mode and I<br/>
> &gt;&gt; could safely replace the two drives and add the new disks to the arrays<br/>
> &gt;&gt; using the mdadm command.<br/>
> &gt;&gt;<br/>
> &gt;&gt; I am also curious as to what the devs have to say about this.<br/>
> &gt;<br/>
> &gt; RAID and LUKS are in separate layers and do not influence<br/>
> &gt; each other. See FAQ Items 2.2 ad 2.8. 2.8 also has a picture.<br/>
> &gt;<br/>
> &gt; If you place LUKS atop RAID, you get pretty much<br/>
> &gt; the same change as with a normal filesystem atop RAID. Of<br/>
> &gt; course, the LUKS header is critical, which is why you should<br/>
> &gt; always have a header backup, just the same as without RAID.<br/>
> &gt;<br/>
> &gt; If you place LUKS below RAID (not that good an idea), you<br/>
> &gt; will have to unlock the raw devices before the RAID can<br/>
> &gt; be assembled. You should have header backups for as much<br/>
> &gt; devices as are neded to assemble the RAID, but better for<br/>
> &gt; all.<br/>
> &gt;<br/>
> &gt; Really, these are separate issuses, LUKS and RAID do not<br/>
> &gt; magically interact behind your back.<br/>
> &gt;<br/>
> &gt; Gr&quot;usse,<br/>
> &gt; Arno<br/>
> &gt;<br/>
> &gt;&gt; BTW: I always make a complete backup on a third external disk, I don&#39;t<br/>
> &gt;&gt; want to take any chances.<br/>
> &gt;&gt;<br/>
> &gt;&gt; Cheers,<br/>
> &gt;&gt;<br/>
> &gt;&gt; Fabrice Bongartz<br/>
> &gt;&gt;<br/>
> &gt;&gt;<br/>
> &gt;&gt; Von: &quot;Mark Connor&quot; &lt;markc44@xxxxxxx&gt;<br/>
> &gt;&gt; An: &quot;dm-crypt&quot; &lt;dm-crypt@xxxxxxxx&gt;<br/>
> &gt;&gt; Gesendet: Dienstag, 25. November 2014 11:03:17<br/>
> &gt;&gt; Betreff:  LUKS safety on RAID 1 mirror<br/>
> &gt;&gt;<br/>
> &gt;&gt; Hello<br/>
> &gt;&gt;<br/>
> &gt;&gt; I currently have a deployment with luks (aes-cbc-256) on different 1TB,<br/>
> &gt;&gt; 500GB, 300GB etc. drives. All the drives use different keys and XFS<br/>
> &gt;&gt; filesystem on the top of luks.<br/>
> &gt;&gt; I&#39;m planning to replace this setup with 2X4TB disks in software raid1<br/>
> &gt;&gt; (with mdraid) but I have my concerns.<br/>
> &gt;&gt;<br/>
> &gt;&gt; 1, If a sector goes bad on disk1 that normally shouldn&#39;t be replicated<br/>
> &gt;&gt; to disk2 but in case of luks I don&#39;t know what happens then.<br/>
> &gt;&gt;<br/>
> &gt;&gt; 2, I think it is more practical -when one is dealing with encryption- to<br/>
> &gt;&gt; keep many smaller partitions encrypted with separate keys, in case of<br/>
> &gt;&gt; partial disk failure (other parts of the disk can still be accessed).<br/>
> &gt;&gt; Also all the partitions have their own separate luks headers...<br/>
> &gt;&gt;<br/>
> &gt;&gt; Unlike if I don&#39;t even create partition just put sda (4TB) sdb(4TB) into<br/>
> &gt;&gt; and md0 array and make luks on that one, if anything goes wrong with the<br/>
> &gt;&gt; header I lose all my data or if any part of the disks breaks.<br/>
> &gt;&gt;<br/>
> &gt;&gt; I know that ultimately raid is only protect against drive failures (not<br/>
> &gt;&gt; if files get corrupted or deleted) so have to have a separated<br/>
> &gt;&gt; snapshotted backup next to it. But would implementing raid1 in case of<br/>
> &gt;&gt; luks be an advantage or a disadvantage?<br/>
> &gt;&gt;<br/>
> &gt;&gt; Thanks<br/>
> &gt;&gt; _______________________________________________<br/>
> &gt;&gt; dm-crypt mailing list<br/>
> &gt;&gt; dm-crypt@xxxxxxxx<br/>
> &gt;&gt; <a href="http://www.saout.de/mailman/listinfo/dm-crypt"; target="_blank">http://www.saout.de/mailman/listinfo/dm-crypt</a><br/>
> &gt;<br/>
> &gt;&gt; _______________________________________________<br/>
> &gt;&gt; dm-crypt mailing list<br/>
> &gt;&gt; dm-crypt@xxxxxxxx<br/>
> &gt;&gt; <a href="http://www.saout.de/mailman/listinfo/dm-crypt"; target="_blank">http://www.saout.de/mailman/listinfo/dm-crypt</a><br/>
> &gt;<br/>
> &gt;<br/>
> &gt; --<br/>
> &gt; Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@xxxxxxxxxxx<br/>
> &gt; GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D<br/>
> &gt; 9718<br/>
> &gt; ----<br/>
> &gt; A good decision is based on knowledge and not on numbers. -- Plato<br/>
> &gt;<br/>
> &gt; If it&#39;s in the news, don&#39;t worry about it. The very definition of<br/>
> &gt; &quot;news&quot; is &quot;something that hardly ever happens.&quot; -- Bruce Schneier<br/>
> &gt; _______________________________________________<br/>
> &gt; dm-crypt mailing list<br/>
> &gt; dm-crypt@xxxxxxxx<br/>
> &gt; <a href="http://www.saout.de/mailman/listinfo/dm-crypt"; target="_blank">http://www.saout.de/mailman/listinfo/dm-crypt</a><br/>
> &gt;<br/>
> <br/>
> <br/>
> _______________________________________________<br/>
> dm-crypt mailing list<br/>
> dm-crypt@xxxxxxxx<br/>
> <a href="http://www.saout.de/mailman/listinfo/dm-crypt"; target="_blank">http://www.saout.de/mailman/listinfo/dm-crypt</a></div>
> </div>
> </div>
> </div></div></body></html>

> _______________________________________________
> dm-crypt mailing list
> dm-crypt@xxxxxxxx
> http://www.saout.de/mailman/listinfo/dm-crypt


-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@xxxxxxxxxxx
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt




[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux