From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: raw disks no longer work in latest kvm (kvm-88 was fine) Date: Sun, 07 Mar 2010 19:18:40 +0200 Message-ID: <4B93DFF0.5050905@redhat.com> References: <4B92BF97.4040001@nagafix.co.uk> <4B92C90B.4030807@msgid.tls.msk.ru> <4B932829.8090503@nagafix.co.uk> <4B9372B6.3050408@msgid.tls.msk.ru> <20100307100022.GA23201@infradead.org> <4B93A624.8010707@nagafix.co.uk> <4B93AF8A.3070805@nagafix.co.uk> <4B93C2F9.7030904@msgid.tls.msk.ru> <4B93DE3F.4090103@nagafix.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Michael Tokarev , kvm@vger.kernel.org To: Antoine Martin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16539 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754473Ab0CGRSq (ORCPT ); Sun, 7 Mar 2010 12:18:46 -0500 In-Reply-To: <4B93DE3F.4090103@nagafix.co.uk> Sender: kvm-owner@vger.kernel.org List-ID: On 03/07/2010 07:11 PM, Antoine Martin wrote: >> >> the problem happens right at startup, it can't read _anything_ >> at all from the disk. In my case, the problem is intermittent >> and happens under high load only, hence the big difference. >> >> But anyway, this is something which should be easy to find >> out. Run kvm under `strace -f' and see how it opens the >> device, or find out with lsof what filedescriptor corresponds >> to the file in question (in running kvm instance) and see >> flags in /proc/$kvm_pid/fdinfo/$fdnum. > ... > [...] > stat("./vm/var_fs", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 41), > ...}) = 0 > open("./vm/var_fs", O_RDWR|O_DIRECT|O_CLOEXEC) = 12 > lseek(12, 0, SEEK_END) = 1321851815424 > [..] > So it opens it the device without problems. > > The only things that stands out is this before the "read failed" message: > [pid 9098] lseek(12, 0, SEEK_END) = 1321851815424 > [pid 9121] pread(12, 0x7fa50a0e47d0, 2048, 0) = -1 EINVAL (Invalid > argument) > The buffer is unaligned here, yet the file was opened with O_DIRECT (cache=none). This is strange, since alignment is not related to disk size. -- error compiling committee.c: too many arguments to function