From: Jim Meyering <jim@meyering.net>
To: Joey Boggs <jboggs@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>,
oVirt Development List <ovirt-devel@redhat.com>
Subject: blockdev --flushbufs required [was: parted issue/question
Date: Wed, 18 Jan 2012 14:44:42 +0100 [thread overview]
Message-ID: <87haztruph.fsf_-_@rho.meyering.net> (raw)
In-Reply-To: <20120118003802.GA11769@agk-dp.fab.redhat.com> (Alasdair G. Kergon's message of "Wed, 18 Jan 2012 00:38:02 +0000")
[Following up on this thread:
http://thread.gmane.org/gmane.linux.kernel.device-mapper.devel/14999]
Alasdair G Kergon wrote:
> Try
> blkdev --flushbufs
> after any cmd that writes to a dev to see if that makes any difference.
Thanks for the work-around.
Using "blockdev --flushbufs $dev" does indeed make parted
behave the same with dm-backed storage as with other devices.
Adjusting my small example,
cd /tmp; truncate -s 10m g && loop=$(losetup --show -f g)
echo 0 100 linear $loop 0 | dmsetup create zub
dev=/dev/mapper/zub
parted -s $dev \
mklabel gpt \
mkpart efi 34s 34s \
mkpart root 35s 35s \
mkpart roo2 36s 36s \
u s p
blockdev --flushbufs $dev # FIXME: required with device-mapper-1.02.65-5
# write random bits to p1
dd of=${dev}p1 if=/dev/urandom count=1
dd if=${dev}p1 of=p1-copy.pre count=1
parted -s $dev mkpart p4 37s 37s
blockdev --flushbufs $dev # FIXME: required with device-mapper-1.02.65-5
dd if=${dev}p1 of=p1-copy.post count=1
cmp -l p1-copy.pre p1-copy.post
With that, the "cmp" show no differences.
Does this sound like a problem in device-mapper land,
or in how parted interacts with DM?
next prev parent reply other threads:[~2012-01-18 13:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F13ADB3.5070806@redhat.com>
2012-01-17 22:28 ` parted issue/question Jim Meyering
2012-01-18 0:38 ` Alasdair G Kergon
2012-01-18 13:44 ` Jim Meyering [this message]
[not found] ` <87haztruph.fsf_-_-CybKA8TIZ99x3y/oJEDuiw@public.gmane.org>
2012-01-18 13:58 ` [ovirt-devel] blockdev --flushbufs required [was: " Mike Burns
[not found] ` <1326895081.27879.0.camel-GBFV1wXchybjvs0ExVSBjSAqptkPoUJl@public.gmane.org>
2012-01-18 16:22 ` Alan Pevec
[not found] ` <CAGi==UV2RXGzpxtKa4_4JWqdWrMP6_pf_PrdyDMtjMmSQtXgPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-19 13:00 ` Jim Meyering
2012-01-18 14:05 ` Zdenek Kabelac
2012-01-18 14:14 ` Alasdair G Kergon
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=87haztruph.fsf_-_@rho.meyering.net \
--to=jim@meyering.net \
--cc=dm-devel@redhat.com \
--cc=jboggs@redhat.com \
--cc=ovirt-devel@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 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.