Hello everyone,
I am having trouble with my qemu guests. I am facing buffer input output errors on the guests' kernel log:
[TIMESTAMP] Buffer I/O error on device vda1, logical block XXXXXX
[TIMESTAMP] end_request: I/O error, dev vda, sector XXXXXX
I am also reading in the qemu log:
qemu-system-x86_64: shrinking is not supported
I traced this message to the block driver I am using (sheepdog):
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;
}
...
}
This function is called as the .bdrv_truncate function. I already asked people on sheepdog about what could cause calls to this function but as far as they know, only qemu-img resize could call this function.
I am using libvirt as well.
Does anyone have a clue?
Thanks,
Hadrien Kohl
---------- Forwarded message ----------
From:
Liu Yuan <address@hidden>
Date: 2013/12/12
Subject: Re: [sheepdog] Call to sd_truncate()
To: Hadrien KOHL <
address@hidden>
Cc:
address@hidden
On Thu, Dec 12, 2013 at 11:36:06AM +0100, Hadrien KOHL wrote:
> Hi,
>
> Thanks, that's interesting. I don't have any component I can think of that
> does this though.
> Could it be possible that the kernel/filesystem of the host is doing it on
> it's own?
>
IMO only 'qemu-img resize'(probably libvirt has similar function) and
'dog vdi resize' can resize the volume.
But any higher component in QEMU might call .bdrv_truncate() too, which is out
of my cscope. I'd suggest you ask the qemu list that anyone else execept
'qemu-img resize' would call .bdrv_truncate() while VM is running.
Thanks
Yuan