linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Sync does not flush to disk!?
@ 2012-06-08  9:53 Asdo
  2012-06-08 11:39 ` Asdo
  2012-06-08 12:33 ` NeilBrown
  0 siblings, 2 replies; 8+ messages in thread
From: Asdo @ 2012-06-08  9:53 UTC (permalink / raw)
  To: linux-raid, linux-ext4

Hello all
I don't exactly know where to ask this question...

I have a situation of

sda1 + sdb1 --> MD raid1
Above that is an ext4 filesystem. No LVM.

I am making changes to that filesystem (vi a file) and then i am doing
sync
sync
(twice)

then I am starting KVM in snapshot mode on the sda and sdb disks so to 
virtualize the same system on which I am operating.

kvm -m 1024 -hda /dev/sda -hdb /dev/sdb -snapshot

The strange thing is that the virtual machine is NOT seeing the latest 
changes to that file!

Then I tried to do :

for i in /dev/md? /dev/sda /dev/sdb ; do blockdev --flushbufs $i ; done

and restart KVM,
and NOW it is seeing the changes.

In the past I had similar problems, and not knowing about blockdev 
--flushbufs I ended up dismounting the filesystems and stopping the 
RAIDs. That also appeared to actually commit stuff to disk.

So sync is not enough? Would somebody explain to me better?

Thank you

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-08 18:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08  9:53 Sync does not flush to disk!? Asdo
2012-06-08 11:39 ` Asdo
2012-06-08 12:33 ` NeilBrown
2012-06-08 13:49   ` Phil Turmel
2012-06-08 13:57     ` Asdo
2012-06-08 14:11       ` Jan Kara
2012-06-08 14:16         ` Jan Kara
2012-06-08 18:28       ` Ted Ts'o

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).