Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k0KB3d115037 for ; Fri, 20 Jan 2006 06:03:39 -0500 Date: Fri, 20 Jan 2006 13:03:26 +0200 From: Ville Herva Message-ID: <20060120110326.GA23499@niksula.cs.hut.fi> References: <20050817133011.GA35602@niksula.cs.hut.fi> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <20050817133011.GA35602@niksula.cs.hut.fi> Subject: [linux-lvm] Re: Upgrade from 2.6.10-ac8 to 2.6.12.5 broke lvm rootfs Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linux-LVM@Sistina.com On Wed, Aug 17, 2005 at 04:30:11PM +0300, you [Ville Herva] wrote: > [repost: first post did not show up. sorry for the possible dupe] > > After upgrading the kernel from 2.6.10-ac8 to 2.6.12.5 the initramfs was no > longer able to mount rootfs. > > mount: error 6 mounting ext3 > > All the configuration options are identical, and upgrading lvm2 package: > lvm2-2.00.25-1.01 -> lvm2-2.01.14-1.0 > device-mapper-1.00.19-2 -> device-mapper-1.01.04-1.0 > > Did not change anything. > > Dm, ext3 and the relevant block device drivers statically compiled in. > > The vg has lvm1 format, fwiw. > > I enabled all the debug options I could think of in the nash-based initramfs > init script. That did not appear to tell much: all I was able to tell was > that lvm was succesfully called by the init script: > > mount -t proc /proc /proc > mount -t sysfs none /sys > insmod /lib/dm-snapshot.ko > mkdevices /dev > mkdmnod > lvm vgscan -v > # sleep 5 > lvm vgchange -ay > # sleep 5 > lvm vgmknodes > # sleep 5 > mkrootdev /dev/root > umount /sys > # sleep 5 > mount -o defaults --ro -t ext3 /dev/root /sysroot > switchroot /sysroot > > but those didn't give any meaningful output (other than notices about > setting log indentation level). > > Finally, I added "sleep 5" after each lvm command (commented out above), > which appeared "solve" the problem. > > Apparently the lvm scripts somehow do their initialization asynchronously > and the init script tries to mount root before it is available. I'm not sure > why this is affected by the kernel version, though. This happens with linux-2.6.15.1, lvm2-2.01.14-1.0 and mkinitrd-4.1.18-2. I must manually patch the init script inside the initrd image to have those sleep 5 lines after each and every lvm command, otherwise I get the mount: error 6 mounting ext3 error. Any ideas? -- v -- v@iki.fi