[CentOS] RAID help

Tue Dec 14 19:17:30 UTC 2010
Ryan Wagoner <rswagoner at gmail.com>

On Tue, Dec 14, 2010 at 2:11 PM,  <m.roth at 5-cent.us> wrote:
> Ryan Wagoner wrote:
>> On Tue, Dec 14, 2010 at 1:49 PM,  <m.roth at 5-cent.us> wrote:
>>> Jason T. Slack-Moehrle wrote:
> <snip>
>>>> 3. Create other mount points I might want i.e swap, /home, etc
>>>> 4. Create RAID1 out of these partitions
>>>
>>> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.
>>
>> You want to mirror swap. If a drive fails your swap immediately goes
>> offline. If an application had memory in swap it is now lost.
> <snip>
> Mmmm... but if a drive goes down, then swap could quite easily be in an
> undefined state, part-way through the mirroring.

How is it in an undefined state? The mirror is created with mdadm,
then mkswap is run. At this point when data is written mdadm writes
the data to both drives. Even if a drive failed when the mirror was
initially syncing, both drives would have the same data for any writes
that occurred. Sure the unused space could be out of sync, but that
doesn't matter.

Ryan