linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Yi Zhang <yizhan@redhat.com>
Cc: linux-raid@vger.kernel.org, shli@fb.com, neilb@suse.com,
	Jes.Sorensen@redhat.com
Subject: Re: test file disappeared after -f, -r, --add-journal for write-journal device
Date: Wed, 27 Jul 2016 18:22:25 -0700	[thread overview]
Message-ID: <20160728012225.GB48473@kernel.org> (raw)
In-Reply-To: <1403590832.9411207.1469621239264.JavaMail.zimbra@redhat.com>

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.

> 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

  reply	other threads:[~2016-07-28  1:22 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 [this message]
2016-07-28  7:04     ` yizhan

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=20160728012225.GB48473@kernel.org \
    --to=shli@kernel.org \
    --cc=Jes.Sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=shli@fb.com \
    --cc=yizhan@redhat.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 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).