linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yizhan <yizhan@redhat.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org, neilb@suse.com, Jes.Sorensen@redhat.com
Subject: Re: test file disappeared after -f, -r, --add-journal for write-journal device
Date: Thu, 28 Jul 2016 15:04:23 +0800	[thread overview]
Message-ID: <22a737af-1ad8-94ce-de31-abdb9c6187d4@redhat.com> (raw)
In-Reply-To: <20160728012225.GB48473@kernel.org>



On 07/28/2016 09:22 AM, Shaohua Li wrote:
> On Wed, Jul 27, 2016 at 08:07:19AM -0400, Yi Zhang wrote:
>> Hello maintainer
>>
>> Here is another strange phenomenon I found after do -f, -r, --add-journal for write-journal device.
>>
>> Kernel version: 4.7.0-rc7
>> Steps I used:
>> mdadm --create --run /dev/md0 --level 4 --metadata 1.2 --raid-devices 7 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 --write-journal /dev/loop0 --bitmap=internal --bitmap-chunk=64M --chunk 512
>> mdadm --wait /dev/md0
>> mkfs.ext4 /dev/md0
>> mount -t ext4 /dev/md0 /mnt/fortest
>> cp bigfile /mnt/fortest &
>> wait
>> md5sum /mnt/fortest/bigfile > md5sum3
>> mdadm /dev/md0 -f /dev/loop0
> since loop0 is the journal device and it fails, we will mark the md0 readonly
> at this point. Filesystem can't do any write. It's possible the fortest/md5sum3
> files not hit disk yet, and are lost. I think your test should do a sync before
> mark journal disk failure.
I add sync operation before mark journal disk failure, this issue cannot 
be reproduced any more,

thanks
Yi
>> mdadm /dev/md0 -r /dev/loop0
>> umount /dev/md0 -l
>> mdadm -o /dev/md0
>> mdadm /dev/md0 --add-journal /dev/loop0
>> mdadm --wait /dev/md0
>> mdadm -D /dev/md0
>> mount /dev/md0 /mnt/fortest
>> md5sum /mnt/fortest/bigfile > md5sum2   #<----this test file disappeared
> If a sync is done before journal disk fails and you still see the file
> disappeared, it's a bug.
>
> Thanks,
> Shaohua
> --
> 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:[~2016-07-28  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <678915290.9410266.1469620858173.JavaMail.zimbra@redhat.com>
2016-07-27 12:07 ` test file disappeared after -f, -r, --add-journal for write-journal device Yi Zhang
2016-07-28  1:22   ` Shaohua Li
2016-07-28  7:04     ` yizhan [this message]

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=22a737af-1ad8-94ce-de31-abdb9c6187d4@redhat.com \
    --to=yizhan@redhat.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=shli@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).