I have a large qcow2 formatted disk image, which I use as storage. Often I need to move data to and from this disk image. I mount the disk using the qemu-nbd tool as follows:
modprobe nbd max_part=63 qemu-nbd -c /dev/nbd0 /host/disk100G.img mount /dev/nbd0p1 /home/rup/disk
But disk access fails every now and then in the midst of some I/O operation with an "Input/output error". At that point I have to manually unmount the disk and re-mount it so that I can run the program again:
qemu-nbd -d /dev/nbd0 umount joborkhaki/
What could be the reason for this? Is there a better tool that I can use to maintain a qcow2 disk image?