Re: Draft Mirrored Linux Mini How-to

2 messages, 2 authors, 2009-08-08 · open the first message on its own page

Re: Draft Mirrored Linux Mini How-to

From: Goswin von Brederlow <hidden>
Date: 2009-08-08 07:59:53

"NeilBrown" [off-list ref] writes:
On Sat, August 8, 2009 11:11 am, Goswin von Brederlow wrote:
quoted
Tapani Tarvainen [off-list ref] writes:
quoted
On Thu, Aug 06, 2009 at 08:08:47PM -0400, Harold Pritchett
(harold@uga.edu) wrote:
quoted
Mirrored Linux Mini How-to
A few quick observations:
quoted
Install linux on two identical disk drives in such a way that the
failure
of either of the drives will allow the system to be recovered without
any
loss of data

Both of the drives are partitioned exactly the same:
     1.  3 primary partitions
     2.  Partition 1 - size - 1GB format as Linux Raid (fd)
     3.  Partition 2 - size = real memory size, format as linux swap
(82)
     4.  Partition 3 = size = remainder of disk, format as linux raid
(fd)
If I read correctly, you are not only leaving swap out of lvm,
you are not mirroring it at all - which would make the system
crash if the swap disk breaks.
Putting swap on lvm would also allow growing it easily as needed.
On the other hand don't forget that raid1 is buggy with swap and the
page contents might change between writes to the first and second
disk. Or has that been fixed?
There is no bug here.  The behaviour is a little unexpected
but it is perfectly "correct" in that there is never any risk to
data.

NeilBrown
Disk 1 writes, page is modified, disk 2 writes, page is swapped in
from disk 1, something crashes because old data is swapped in.

Or did I miss something?

MfG
        Goswin

Re: Draft Mirrored Linux Mini How-to

From: John Robinson <hidden>
Date: 2009-08-08 15:24:44

On 08/08/2009 08:59, Goswin von Brederlow wrote:
"NeilBrown" [off-list ref] writes:
quoted
On Sat, August 8, 2009 11:11 am, Goswin von Brederlow wrote:
[...]
quoted
quoted
On the other hand don't forget that raid1 is buggy with swap and the
page contents might change between writes to the first and second
disk. Or has that been fixed?
Can you give a reference for this?
quoted
There is no bug here.  The behaviour is a little unexpected
but it is perfectly "correct" in that there is never any risk to
data.
Disk 1 writes, page is modified, disk 2 writes, page is swapped in
from disk 1, something crashes because old data is swapped in.

Or did I miss something?
If the page is modified then it won't be swapped back in when you said, 
because the swap out wasn't completed and the page wasn't reallocated. 
Well, that's my guess. I presume this is allowed for performance reasons.

Cheers,

John.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help