All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Goryachev <mailinglists@websitemanagers.com.au>
To: lingli tang <tanglingli001@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: is mdadm RAID1 disk full sync
Date: Sun, 22 Mar 2015 23:51:58 +1100	[thread overview]
Message-ID: <550EBAEE.6070608@websitemanagers.com.au> (raw)
In-Reply-To: <CAN+bsqherPsEAPNrmYJ7o7DWP90gO4vv-sbmxCmthh_QU8qpcw@mail.gmail.com>



On 22/03/2015 23:29, lingli tang wrote:
> Thanks very much.
> I will try DRBD later
> But I want to figure this out.
>
> I have export disk using tgtd and load disk on another server using
> iscsiadm with infiniband  of iser protocol.
> Does ISCSI/Iser have any cache on it.
Can you test that by removing the local disk from the MD array, or 
changing your test so writes are directly to the remote device. Then run 
the test, shutdown, and check the remote disk to see if it has all the 
expected data, or still only some of the expected data. This will remove 
MD as a suspect. Continue to try and get "closer" to the remote until 
you can find the culprit. You might also use tcpdump or similar to sniff 
the network, which will tell you if the expected data is being sent to 
the remote (and when).

Sorry, I don't know anywhere near enough to comment on things like 
infiniband/iser, but these are the steps I would look into. Hope that it 
is helpful.

PS, I do use DRBD, and iSCSI, and it has been working well in my 
environment for the last year or so, I have no commercial 
interest/benefit from you using it, just a happy customer.

Regards,
Adam
>
> 2015-03-22 15:28 GMT+08:00 Adam Goryachev <mailinglists@websitemanagers.com.au>:
>>
>> On 22/03/2015 16:00, lingli tang wrote:
>>> Thanks for reply.
>>>
>>> I have create a raid1 with two fusion io PCIe flash disk:
>>> mdadm --create /dev/md/master --name=master --level=1 --raid-devices=2
>>> /dev/fioa2 /dev/mapper/mpathc
>>> /dev/fioa2 is local disk on server A and /dev/mapper/mpathc is a iscsi
>>> load disk export from server B.
>>>
>>> After that we mkfs.ext4 on /dev/md/master and mount with 'sync' option on
>>> /data1
>>> and we will run mysql binlog on it.
>>> In order to avoid data loss  of mysql binlog we have set
>>> sync_binlog=1. so every sql commit will call fsync() to flush to disk.
>>>
>>> according to your description. if we reboot the server A, the two disk
>>> data on different server will be the same.
>>> but after the server A restarted, we assemble the two disk on two
>>> server, data is different on the two server, disk on server B lost
>>> more than one sql commit.
>>>
>>> I have checked it with strace 'mysqld' on Server A.
>>> I found a sql commit and fsync() on binlog file handle on server A but
>>> this sql can not find in assembled disk on server B.
>>>
>>> I also test it with two SAS disk, Server B still has more than one sql
>>> commit lost.
>> Sounds like you might be better using something like DRBD (www.drbd.org)
>> which has different modes, one of which will do what you are asking (not
>> respond until both systems have confirmed the data is written to the local
>> disk).
>>
>> In your current case, even if md is correctly writing to both underlying
>> 'devices' you have multiple layers under one of the devices, so you should
>> confirm that *all* of those layers are properly passing through the data
>> without any caching/etc.
>>
>> Regards,
>> Adam
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2015-03-22 12:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-21 11:01 is mdadm RAID1 disk full sync lingli tang
2015-03-22  3:20 ` NeilBrown
2015-03-22  5:00   ` lingli tang
2015-03-22  5:38     ` NeilBrown
2015-03-22 11:31       ` lingli tang
2015-03-23  2:52         ` NeilBrown
2015-03-22  7:28     ` Adam Goryachev
2015-03-22 12:29       ` lingli tang
2015-03-22 12:51         ` Adam Goryachev [this message]
2015-03-23  8:34           ` lingli tang
2015-03-23 12:57             ` Adam Goryachev
2015-03-24  2:09               ` lingli tang

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=550EBAEE.6070608@websitemanagers.com.au \
    --to=mailinglists@websitemanagers.com.au \
    --cc=linux-raid@vger.kernel.org \
    --cc=tanglingli001@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.