Hi,all
I want to use qemu-nbd to share disk between two kvm guests.
I.
# qemu-nbd -p 1024 -e 2 -n my-disk.qcow2
# nbd-client localhost 1024 /dev/nbd0
# nbd-client localhost 1024 /dev/nbd1
II.
guest1:
# /usr/local/bin/qemu -enable-kvm -m 1024 -drive file=ubuntu.img -drive
file=/dev/nbd0,cache=none -net user -net nic,model=virtio -chardev
stdio,id=mon0 -mon chardev=mon0 -usb -device usb-tablet
guest2:
# /usr/local/bin/qemu -enable-kvm -m 1024 -drive file=ubuntu.img -drive
file=/dev/nbd0,cache=none -net user -net nic,model=virtio -chardev
stdio,id=mon0 -mon chardev=mon0 -usb -device usb-tablet
Found one problem:
No disk r/w sync between 2 virtual hosts.
One write/change on the shared disk,
another virtual host must remount the disk and can see the update from
the other virtual host.
For example,a simply test:
In the guest1,mount the disk and create on text file add some line to it.
In the guest2,mount the same disk and print the text file and found the
content is not updated.
But after after I remount the disk, the content will be updated.
Is it a issue of guest OS or qemu-nbd? Can you help me?
--
Best Regards,
Bing Bu Cao