[sheepdog-users] Problems with snapshot and cache

Liu Yuan namei.unix at gmail.com
Thu Jul 18 08:56:32 CEST 2013


On Thu, Jul 18, 2013 at 01:18:41PM +0800, Liu Yuan wrote:
> On Wed, Jul 17, 2013 at 03:25:46PM +0200, Valerio Pachera wrote:
> > 2013/7/15 Valerio Pachera <sirio81 at gmail.com>:
> > > I've been updating sheepdog today.
> > > Snapshots work fine also with cache enabled.
> > 
> > I have been speaking to early.
> > It seems to be a timeout problem.
> > If I have not much date in cache (i.e. 1G), collie snapshot works fine.
> > If cached data is more (i.e. 6G), it get time out.
> > 
> > root at test004:~# du -sh /mnt/sheep/meta/cache/
> > 8,4G    /mnt/sheep/meta/cache/
> > root at test004:~# collie vdi snapshot -s lug17_150000 backup_data
> > root at test004:~# du -sh /mnt/sheep/meta/cache/
> > 7,7G    /mnt/sheep/meta/cache/
> > root at test004:~# du -sh /mnt/sheep/meta/cache/
> > 18G     /mnt/sheep/meta/cache/
> > root at test004:~# time collie vdi snapshot -s lug17_151230 backup_data
> > failed to read from socket: -1, Resource temporarily unavailable
> > failed to read a response
> > Failed to write object 80c8d12e00000000
> > 
> > real    3m30.292s
> > user    0m0.004s
> > sys     0m0.000s
> > 
> > sheep.log
> > Jul 17 15:15:36 [gway 19489] push_cache_object(516) failed to push
> > object Object is read-only
> > Jul 17 15:15:36 [main] modify_event(150) event info for fd 46 not found
> 
> I can't reproduce the issuie. By reviewing the code this should not happen. I've
> add more debug info in the devel branch. Please try to reproduce it with devel
> branch and paste the information again. 'vdi list' and sheep.log is needed.

I have sent another patch to fix a bug that might possibly cause this problem in
collie. This will boost collie vdi snapshot a lot with cache enabled.

By the way, it would be better if you can run 'sync' in the guest before
'vdi snapshot'. Normally, we have to flush the dirty objects in the cache of
of this vdi before snapshot it. So if no dirty bits in the cache, we will get
a instantly snapshot like the case we don't have cache enabled.

Simply put, 'collie vdi snapshot' will wait for all the dirty objects to be
flushed before trying snapshot it.

Thanks
Yuan



More information about the sheepdog-users mailing list