[sheepdog] Call to sd_truncate()

Liu Yuan namei.unix at gmail.com
Thu Dec 12 11:32:35 CET 2013


On Thu, Dec 12, 2013 at 11:16:58AM +0100, Hadrien KOHL wrote:
> Hi,
> 
> I have been running sheepdog on a cluster of three nodes for some time now.
> I sometime experience errors on the guest and host sides.
> 
> On the guest side I read:
> [TIMESTAMP] Buffer I/O error on device vda1, logical block XXXXXX
> ...
> [TIMESTAMP] end_request: I/O error, dev vda, sector XXXXXX
> 
> On the host side (qemu log) I read:
> qemu-system-x86_64: shrinking is not supported
> 
> If I'm not mistaken, this message is writen in the block/sheepdog.c file in
> qemu:
> 
> static int sd_truncate(BlockDriverState *bs, int64_t offset)
> {
>     BDRVSheepdogState *s = bs->opaque;
>     int ret, fd;
>     unsigned int datalen;
> 
>     if (offset < s->inode.vdi_size) {
>         error_report("shrinking is not supported");
>         return -EINVAL;
>     } else if (offset > SD_MAX_VDI_SIZE) {
>         error_report("too big image size");
>         return -EINVAL;
>     }
> 
>     fd = connect_to_sdog(s);
>     if (fd < 0) {
>         return fd;
>     }
> ...
> }
> 
> I tried to find the call graph for this function but I am no C/C++
> developer.
> 
> Anyone have had this problem?
> 

This errors mean that someone is trying to resize the volume downwards while
VM is running. This actually cause problems:

- sheepdog dosesn't support resize the volume while VM is running
- we don't support shrink of volume, meaning that you can only enlarge the volume
  if you want to resize the volume

Thanks
Yuan



More information about the sheepdog mailing list