Les Mikesell
2015-Feb-10 20:13 UTC
[CentOS] CentOS 7 : create RAID arrays manually using mdadm --create ?
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.... -- Les Mikesell lesmikesell at gmail.com
Chris Murphy
2015-Feb-11 02:54 UTC
[CentOS] CentOS 7 : create RAID arrays manually using mdadm --create ?
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
John R Pierce
2015-Feb-11 04:12 UTC
[CentOS] CentOS 7 : create RAID arrays manually using mdadm --create ?
On 2/10/2015 6:54 PM, Chris Murphy wrote:> 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.if its possible for that to happen, then the whole swapping AND mdraid mechanisms in linux are badly broken. -- john r pierce 37N 122W somewhere on the middle of the left coast
Possibly Parallel Threads
- CentOS 7 : create RAID arrays manually using mdadm --create ?
- CentOS 7 : create RAID arrays manually using mdadm --create ?
- CentOS 7 : create RAID arrays manually using mdadm --create ?
- CentOS 7 : create RAID arrays manually using mdadm --create ?
- CentOS 7 : create RAID arrays manually using mdadm --create ?