linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Hughes <john@Calva.COM>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: Using linux software raid (mdadm) in a shared-disk cluster.
Date: Thu, 23 Apr 2009 11:22:25 +0200	[thread overview]
Message-ID: <49F03351.3090301@Calva.COM> (raw)
In-Reply-To: <87prf5m5kt.fsf@frosties.localdomain>

Goswin von Brederlow wrote:
> John Hughes <john@Calva.COM> writes:
>   
>> I've got a little shared disk cluster (parallel SCSI, external DELL
>> PV210 disk cabinet).
>>
>> I've used linux raid to make a nice RAID10 on the external disks.
>>
>> I can access this from either machine in the cluster, only one at a
>> time of course, it works very well and I'm happy.
>>
>> Now I'm running XEN and I want to be able to migrate a XEN domU from
>> one machine to the other while the domU is using the RAID10 device.  I
>> can make this "work" using XEN's migration hooks - it calls a script
>> when it has stopped the running domU and I can start the raid device
>> on the destination node, ready for the arrival of the domU.
>>
>> There is one small problem - I can't stop the RAID10 on the source
>> node until the domU has finished, so it seems to me there is a window
>> that could lead to data corruption:
>>     
>
> Can you put it into read-only mode?
>   

How do I do that?

Ah, by "mdadm --readonly"[*].

> I'm not even sure putting a raid in read-only mode will stop
> background syncing.
>   

Hang on a sec, I'll try it.

... run bonnie on mounted /dev/md0, kill it, umount the device ...

# cat /proc/mstat
Personalities : [raid10] 
md0 : active raid10 sda3[0] sde2[4](S) sdd3[3] sdc3[2] sdb3[1]
      32067456 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 66/123 pages [264KB], 128KB chunk

# mdadm --readonly /dev/md0
# cat /proc/mdstat 
Personalities : [raid10] 
md0 : active (read-only) raid10 sda3[0] sde2[4](S) sdd3[3] sdc3[2] sdb3[1]
      32067456 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 66/123 pages [264KB], 128KB chunk

... wait a bit
# cat /proc/mdstat
Personalities : [raid10] 
md0 : active (read-only) raid10 sda3[0] sde2[4](S) sdd3[3] sdc3[2] sdb3[1]
      32067456 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 0/123 pages [0KB], 128KB chunk

No, it seems to keep on syncing.  Bummer.

> As an alternative approach how about running the raid10 inside the
> domU?
>   

Didn't want to do that as it requires exporting loadsa devices to the 
domU instead of one.

But maybe it's the only way (without hacking the md code).

  reply	other threads:[~2009-04-23  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  8:58 Using linux software raid (mdadm) in a shared-disk cluster John Hughes
2009-04-22  8:54 ` Goswin von Brederlow
2009-04-23  9:22   ` John Hughes [this message]
2009-04-23 20:30     ` Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F03351.3090301@Calva.COM \
    --to=john@calva.com \
    --cc=goswin-v-b@web.de \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).