From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaM9I-0006Rr-Q0 for qemu-devel@nongnu.org; Thu, 09 May 2013 04:24:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaM9F-0000YT-G8 for qemu-devel@nongnu.org; Thu, 09 May 2013 04:24:24 -0400 Received: from [222.73.24.84] (port=11772 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaM9F-0000V0-1K for qemu-devel@nongnu.org; Thu, 09 May 2013 04:24:21 -0400 Message-ID: <518B5CB3.70201@cn.fujitsu.com> Date: Thu, 09 May 2013 16:22:11 +0800 From: yuxh MIME-Version: 1.0 References: <5189E019.1090702@cn.fujitsu.com> <20130509074407.GG1074@stefanha-thinkpad.redhat.com> In-Reply-To: <20130509074407.GG1074@stefanha-thinkpad.redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Subject: Re: [Qemu-devel] qemu-img problem when create a file larger than fs's size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org On 05/09/2013 03:44 PM, Stefan Hajnoczi wrote: > On Wed, May 08, 2013 at 01:18:17PM +0800, yuxh wrote: >> I have to consult you a qemu-img's problem. >> >> Is this reasonable to create a file which is larger than the >> available size of the fs by qemu-img cmd ? >> >> When I use qemu-img create a file which is larger than the available >> size of the fs, the creation is completed succesfully. >> >> However when I use this file in guest as a guest's disk, and write >> beyond the size the host file can provides, the guest was paused by >> qemu-kvm or libvirt and was in maybe a infinite circle where the >> guest just can't be used except I detach the disk from guest or >> destroy the guest. > > You can change the ENOSPC policy with -drive werror=,rerror=. See the > QEMU man page. > > The default behavior is to pause the guest so the host admin can free up > or add space. Then the guest can be continued - this will retry the > I/O. > > But you can also tell QEMU to pass the error through to the guest using > the -drive werror=,rerror= options. > > Stefan > > Oh, understand now. Thank you so much for your explanation. Yu