I have a task to store QEMU images in a database and thinking towards developing of the custom block device. Is this a good idea? Where is it better to start from?
I have a task to store QEMU images in a database and thinking towards developing of the custom block device. Is this a good idea? Where is it better to start from?
Storing QEMU-images in a database is on many levels very impractical. Using an ordinary filesystem for the storage itself, and referencing the files from the database is a lot simpler - and will probably grant you what you're trying to achieve.
If this doesn't work for you, I'd like to know more about what you're trying to achieve.
If you want distributed image storage, QEMU supports using images on Rados Block Devices (implemented using Ceph): http://ceph.newdream.net/2010/12/rbd-upstream-updates/
There's Sheepdog integrated in Qemu, providing distributed image storage as well. Don't use it myself, but it seems to cover your goals. http://www.osrg.net/sheepdog/