From: Laurent V. <Lau...@bu...> - 2008-01-07 16:29:51
|
Le lundi 07 janvier 2008 =C3=A0 11:03 -0500, Javier Guerra a =C3=A9crit : > On 1/7/08, Laurent Vivier <Lau...@bu...> wrote: > > "cache=3Doff" means files is opened with "O_DIRECT" and thus there is n= o > > cache in the kernel memory on the host side. > > IMO, "cache=3Doff" and "snapshot=3Don" are incompatible because a snaps= hot > > can be seen like a cache. > > > > > so far, the only way is to setup a network block device (iSCSI, AoE, > > > nbd). i'd like to simply specify the same backing file for two > > > instances' hdb parameter. > > > > I'm sorry but I don't understand this part. >=20 > to test a cluster filesystem, i need two (virtual) machines with some > shared storage. i tried long ago something like this (with (k)qemu): >=20 > - create a disk image, call it hda-1.img > - boot and install linux on it, shutdown > - copy to hda-2.img > - boot it (with new MAC) and change IP, hostname, little things, shutdown > - boot both with the same bridge, check that network works between them > - create a new disk image, call id hdb-shr.img > - boot both VMs, sharing hdb-shr.img: >=20 > qemu -hda=3Dhda-1.img -hdb-shr.img > qemu -hda=3Dhda-2.img -hdb-shr.img >=20 > - try to setup a cluster filesystem on hdb >=20 > it almost worked... but some writes didn't propagate to the other > until some extra writes to hdb; so i guessed that each qemu instance > had some caching on file I/O >=20 > hopefully, it would now work with "-cache=3Doff", don't you think? Well, I don't think the problem is at the host level but at the guest level, because both instances of qemu share the host cache and thus first instance should see changes made by the second instance (and vice-versa). There are also some caches at qemu level to emulate DMA, for instance in hw/ide.c it is MAX_MULT_SECTORS (16) which is 8 kB buffer, perhaps your problem is here but "cache=3Doff" doesn't remove this. Did you try to change MAX_MULT_SECTORS to 1 ? What do you call a "cluster filesystem" ? =20 > > > and snapshots help a lot to go back after blowing up the on-disk stru= ctures > > > > But I think if you use a snapshot there is no reason to use "cache=3Dof= f" >=20 > in the above case, if both KVM instances share the snapshot without > cacheing it, the cluster should still work, and have some rollback > capability at the same time >=20 > or is it too much wishful thinking? Unfortunately I guess... Laurent --=20 ----------------- Lau...@bu... ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry |