I managed to reproduce it and get some more info. I wonder if the problem
comes from the snapshot feature of qemu-nbd and will search further in that
direction. Here is some more info
in cas it might be useful

When the problem occurs (the rsync cannot sync some file), here the error
found in dmesg, and that for each file inaccessible:

[10281712.036554] block nbd0: Other side returned error (30)
[10281712.036626] end_request: I/O error, dev nbd0, sector 2048
[10281712.036672] Buffer I/O error on device nbd0p1, logical block 0
[10281712.045150] lost page write due to I/O error on nbd0p1
[10281712.045202] EXT4-fs error (device nbd0p1): ext4_lookup:1050: inode
#265035: comm rsync: deleted inode referenced: 261670
[10281712.067196] EXT4-fs (nbd0p1): previous I/O error to superblock
detected

Seems the inode had been deleted from the snapshot connected in read only
mode!
Unmounting and remounting the nbd device gives a problem:
[10282154.368609] EXT4-fs (nbd0p1): INFO: recovery required on readonly
filesystem
[10282154.368615] EXT4-fs (nbd0p1): write access unavailable, cannot proceed

This leads me to think that the problem is not with nbd, but with the
snapshot taking feature of qemu-nbd. Correct me if I'm wrong! ;-)

Raph




On Wed, Oct 2, 2013 at 11:34 AM, Raphael Bauduin <[email protected]> wrote:

> Hi,
>
> I'm trying to set up a solution to take backups of kvm disk images by
> mounting a snapshot of it via nbd like this:
>
>   qemu-nbd --snapshot --read-only --connect /dev/nbd${nbd_num}  --nocache
> $disk_file
>
> I then mount it and rsync the content stored on the disk.
>
> However, I have sometimes an input/output error. For example:
>
> rsync:
> readlink_stat("/mnt/snapshots/kvmWeb03Staging/var/lib/postgresql/9.1/main/postmaster.pid")
> failed: Input/output error (5)
>
> ls -l  of the directory lists the file like this:
>
> -????????? ? ?           ?       ?            ? postmaster.pid
>
> I'm trying to identify the source of this problem. This could be due to
> qemu-nbd's snapshots, but I'd like to hear your opinion too.
>
>
> thanks!
>
> Raph
>



-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to