<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 6, 2014 at 2:30 PM, UB40D <span dir="ltr"><<a href="mailto:ub40dd@googlemail.com" target="_blank">ub40dd@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 2:43 PM, Simon Hobson <span dir="ltr"><<a href="mailto:linux@thehobsons.co.uk" target="_blank">linux@thehobsons.co.uk</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But back to the OPs situation, it's a bit "post horse departed, closing of stable door" suggestion - but RAIDing the OS directories would be a great protection against this problem. On the first error, I think MD would have thrown the faulty drive out of the array (for each partition/array it's involved with as an error occurs in that partition) leaving the good drive running.<br>
Recovery from that is a matter of partitioning the new drive, and telling MD to use it - then MD takes care of rebuilding the data onto it from the good drive(s).<br></blockquote><div><br></div><div>That's an interesting approach but I've never investigated software raid yet.</div><div><br></div><div>If I do it over drives of different sizes, will I lose the extra space on the bigger drive?</div><div>I have a bunch of drives in the machine and tend to upgrade them one by one, when they fill up or fail, with whatever the largest affordable drive is at the time of upgrade (nowadays 4 TB). So there will always be smaller and larger drives in there.</div><br></div></div></div></blockquote></div>Software RAID can work with partitions, but they need to be equally sized (or, it will make the data on each device use the size of the smallest device in the array). So you would "lose" the extra space in that it would not be included in the array. You could partition and use that space separately, though; it just wouldn't have the availability protection of the RAID. It may make sense to leave the extra space "fallow" until you have all the devices upgraded, then you could expand the partitions and grow the array and filesystem to take advantage of the new space. But if you really need the space, you could use the extra space on the larger drive by itself, or you could create an additional RAID array (possibly RAID 1 to mirror) as long as you had at least one other device the same size or larger. Starts to get a little complicated then, especially when you get rid of your smallest device and want to grow your main array. It's not horrible, just a bit more complex and you have to keep track of what you're doing and where your "active" data is.<br><br>Karl<br></div></div>