[CentOS] CentOS 7 : create RAID arrays manually using mdadm --create ?

Wed Feb 11 02:54:15 UTC 2015
Chris Murphy <lists at colorremedies.com>

On Tue, Feb 10, 2015 at 1:13 PM, Les Mikesell <lesmikesell at gmail.com> wrote:
> On Tue, Feb 10, 2015 at 1:54 PM, Chris Murphy <lists at colorremedies.com> wrote:
>>
>> - I would not put swap on an md device, I'd just put a plain swap
>> partition on each device; first create two swap mountpoints,
>
> If one of the devices fails, doesn't that mean that any processes with
> swap on the associated space will be killed?    Avoiding that is kind
> of the point of having mirrors....

It's a good question.

I try to avoid swap use, especially on hard drives. For some use cases
it's better to slow to a crawl than implode under pressure. For more
cases I think swap on SSD makes more sense, the system won't slow down
nearly as much.

Why I avoid swap on md raid 1/10 is because of the swap caveats listed
under man 4 md. Is possible for a page in memory to change between the
writes to the two md devices such that the mirrors are in fact
different. The man page only suggests this makes scrub check results
unreliable, and that such a difference wouldn't be read (?) But I
don't understand this. So I just avoid it because I haven't thoroughly
tested it.

So if anyone has, that'd be useful info. If not, it might be worth
asking in linux-raid@ for clarification.

But sure, if swap is actively used and vanishes due to drive failure,
decent chance it's a problem. How it'll manifest though?


-- 
Chris Murphy