From: Jacek Konieczny Subject: Re: 'block' script broken: wrong error message Date: Wed, 4 Jul 2007 20:28:41 +0200 Message-ID: <20070704182841.GA10126@nic.nigdzie> References: <20070704122700.GB7204@jajo.eggsoft.pl> <8A87A9A84C201449A0C56B728ACF491E25FD53@liverpoolst.ad.cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <8A87A9A84C201449A0C56B728ACF491E25FD53@liverpoolst.ad.cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, Jul 04, 2007 at 06:32:36PM +0100, Ian Pratt wrote: > > And another thing: why are path names compared instead of inode > numbers. > > If you know how to get the filesystem and inode numbers out of losetup, > great! # losetup -a /dev/loop0: [fe04]:65738 (/var/lib/vm/0/hda1.img) /dev/loop1: [fe04]:65752 (/var/lib/vm/0/hda3.img) /dev/loop10: [fe04]:17097 (/etc/vm/images/1.3r5136/hda2.img) # stat /var/lib/vm/0/hda1.img File: `/var/lib/vm/0/hda1.img' Size: 3072 Blocks: 8 IO Block: 4096 regular file Device: fe04h/65028d Inode: 65738 Links: 1 Access: (0660/-rw-rw----) Uid: ( 996/ vm) Gid: ( 996/ vm) Access: 2007-07-04 15:34:22.000000000 +0200 Modify: 2007-07-04 15:33:23.000000000 +0200 Change: 2007-07-04 15:33:59.000000000 +0200 So "[fe04]" in "losetup -a" output is device id and the number after that is the inode number. # rpm -q losetup losetup-2.13-0.pre7.2.i686 So it cames from util-linux version 2.13pre7. Greets, Jacek