Guolin Cheng
2004-Apr-15 17:50 UTC
Strange Fedora Booting problem: can not mount "LABEL=*"partitions
Hi, Stephen and Jeff, Thanks. But the problem got debugged&fixed, the answer was post on fedora-list about 2 weeks ago. The problem is: the /etc/blkid.tab file works as an old unappropriate disk partitions cache for fsck|blkid commands when stystem image is installed to a different arch (scsi->ide) machine, the old cache will mislead fsck|blkid at the first run and only the first run, since the first run will update /etc/blkid.tab file. As you know, systemimager and similar methods use a single system image to clone hundreds of, or thousands of machines very quickly and reliablely, but this time for Fedora, the /etc/blkid.tab should be cleared off any existing old disk partitions cache when the source&destination machines have different types of hard disks. So, another solution, maybe a better solution, is to patch the e2fsprogs package, so that the blkid* library routines will ignore the cache contents in /etc/blkid.tab, just exactly like the existing "blkid -c /dev/null" does. Thanks. --Guolin Cheng -----Original Message----- From: Stephen C. Tweedie [mailto:sct at redhat.com] Sent: Thursday, April 15, 2004 4:34 AM To: Guolin Cheng Cc: Fedora (E-mail); Redhat Ext3 (E-mail); Jeff Garzik; Stephen Tweedie Subject: Re: Strange Fedora Booting problem: can not mount "LABEL=*"partitions Hi, On Fri, 2004-04-02 at 07:36, Guolin Cheng wrote:> FC1 stops on partitions "LABEL=/var" on two machines, stops on > partition "LABEL=/" on the 3rd machine.When it "stops", what error does it show?> While the default|upgraded NTPL kernel (with SMP problem) boots > without a glitch, my vanilla 2.4.25 kernel plus libata patch > 2.4.25-libata8 fails with the above symptoms described.What happens without the libata patch?> The solution to fix it is: manually run "e2fsck -y -f /dev/hd?, > tune2fs -j /dev/hd?; e2label /dev/hd? <LABEL>" again even there is no > problem with file system, journal node and ext2 label, then reboot.Very very odd --- that really helps, every time? --Stephen
Theodore Ts'o
2004-Apr-19 02:53 UTC
Strange Fedora Booting problem: can not mount "LABEL=*"partitions
On Thu, Apr 15, 2004 at 10:50:03AM -0700, Guolin Cheng wrote:> Hi, Stephen and Jeff, > > Thanks. But the problem got debugged&fixed, the answer was post on > fedora-list about 2 weeks ago. > > The problem is: the /etc/blkid.tab file works as an old unappropriate > disk partitions cache for fsck|blkid commands when stystem image is > installed to a different arch (scsi->ide) machine, the old cache will > mislead fsck|blkid at the first run and only the first run, since the > first run will update /etc/blkid.tab file.Huh? It shouldn't do that. The blkid library validates the information before it returns it. Let me check, just to make sure I'm not going insane: # grep usr /etc/blkid.tab <device DEVNO="0x0303" TIME="1082342948" UUID="afc6b073-ad8b-4440-931d-5558e3618fa9" SEC_TYPE="ext3" TYPE="ext2" LABEL="usr">/dev/hda3</device> # grep usr /tmp/blkid.tab.broken <device DEVNO="0x0305" TIME="1082342842" UUID="eaf43bde-8da2-4844-aed7-80729e93bd13" SEC_TYPE="ext3" TYPE="ext2" LABEL="usr">/dev/hda5</device> # cp /tmp/blkid.tab.broken /etc/blkid.tab # fsck -VN LABEL=usr fsck 1.35 (28-Feb-2004) [/sbin/fsck.ext3 (1) -- /usr] fsck.ext3 /dev/hda3 # e2label /dev/hda3 usr In the above example, you'll see that /etc/blkid.tab shows that /dev/hda3 has the label "usr". In /tmp/blkid.tab.broken, it thinks that /dev/hda5 has the label "usr". I then copy /tmp/blkid.tab.broken to /etc/blkid.tab, and then try to do an fsck test. You'll see that it uses /dev/hda3, not /dev/hda5. This is because the blkid library always uses the information in /etc/blkid.tab as nothing but a hint --- which it verifies before it returns the correct value. Even if the /etc/blkid.tab file is completely bogus; that should be OK. The blkid library should be able to recover from this situation just fine. Can you give me more information about why you think the blkid library isn't working correctly? - Ted
Theodore Ts'o
2004-Apr-19 22:28 UTC
Strange Fedora Booting problem: can not mount "LABEL=*"partitions
On Thu, Apr 15, 2004 at 10:50:03AM -0700, Guolin Cheng wrote:> > Thanks. But the problem got debugged&fixed, the answer was post on > fedora-list about 2 weeks ago. > > The problem is: the /etc/blkid.tab file works as an old unappropriate > disk partitions cache for fsck|blkid commands when stystem image is > installed to a different arch (scsi->ide) machine, the old cache will > mislead fsck|blkid at the first run and only the first run, since the > first run will update /etc/blkid.tab file.What version of e2fsprogs were you testing with? I've just tested using the latest version of e2fsprogs, and it works just fine. In the test below, I corrupt /etc/blkid.tab by swapping /dev/hda and /dev/hdc. This might correspond with might happen after disks get switched around. I run fsck in debugging mode to make sure it gets the correct devices, despite the corrupted /etc/blkid.tab file. As you can see, it works fine: # sed -e 's/hda/hdz/g' -e 's/hdc/hda/g' -e 's/hdz/hdc/' -e 's/0x03/0xf3/' -e s'/0x16/0x03/' -e 's/0xf3/0x16/' /etc/blkid.tab > /tmp/blkid.tab.broken # cp /tmp/blkid.tab.broken /etc/blkid.tab # fsck -AVN -a fsck 1.35 (28-Feb-2004) Checking all file systems. [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda1 [/sbin/fsck.ext3 (1) -- /usr] fsck.ext3 -a /dev/hda3 [/sbin/fsck.ext3 (1) -- /debian] fsck.ext3 -a /dev/hda5 # e2label /dev/hda1 root # e2label /dev/hda3 usr # e2label /dev/hda5 Debian The only thing I can think of is that you might have been using an older version of e2fsprogs that was buggy.... - Ted -------------- next part -------------- # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> LABEL=root / ext3 noatime,errors=remount-ro 0 1 /dev/hda2 none swap sw 0 0 LABEL=usr /usr ext3 noatime,errors=remount-ro 0 2 LABEL=Debian /debian ext3 ro,noatime,user 0 2 #/dev/hdc1 /dos vfat uid=15806 0 0 proc /proc proc defaults 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0 tmp /tmp tmpfs defaults 0 1 /dev/fd0 /floppy auto user,noauto 0 0 /dev/cdrom /cdrom iso9660 unhide,ro,user,noauto 0 0 fs:/ /fs nfs noauto,user,exec,suid,intr 0 0 fs:/vicepa /fs/vicepa nfs noauto,user,exec,suid,intr 0 0 fs:/u2 /fs/u2 nfs noauto,user,exec,suid,intr 0 0 fs:/u3 /fs/u3 nfs noauto,user,exec,suid,intr 0 0 fs:/u4 /fs/u4 nfs noauto,user,exec,suid,intr 0 0 fs:/u5 /fs/u5 nfs noauto,user,exec,suid,intr 0 0 fs:/u6 /fs/u6 nfs noauto,user,exec,suid,intr 0 0 fs:/usr /fs/usr nfs noauto,user,exec,suid,intr 0 0 -------------- next part -------------- <device DEVNO="0x1601" TIME="1182412900" UUID="14484e10-81bb-417a-9ae5-6115bbcdf792" TYPE="ext2">/dev/hdc1</device> <device DEVNO="0x1602" TIME="1182412900" TYPE="swap">/dev/hdc2</device> <device DEVNO="0x1603" TIME="1182412900" UUID="afc6b073-ad8b-4440-931d-5558e3618fa9" SEC_TYPE="ext3" TYPE="ext2">/dev/hdc3</device> <device DEVNO="0x0301" TIME="1182412900" UUID="14484e10-81bb-417a-9ae5-6115bbcdf792" TYPE="ext2" LABEL="root" SEC_TYPE="ext3">/dev/hda1</device> <device DEVNO="0x0302" TIME="1182412900" TYPE="swap">/dev/hda2</device> <device DEVNO="0x0303" TIME="1182412900" UUID="afc6b073-ad8b-4440-931d-5558e3618fa9" SEC_TYPE="ext3" TYPE="ext2" LABEL="usr">/dev/hda3</device> <device DEVNO="0x0305" TIME="1182412900" LABEL="Debian" UUID="eaf43bde-8da2-4844-aed7-80729e93bd13" SEC_TYPE="ext3" TYPE="ext2">/dev/hda5</device> <device DEVNO="0x0306" TIME="1182412901" UUID="8ee7a0eb-b8e3-4d33-b831-48f1a0d51dc3" SEC_TYPE="ext3" TYPE="ext2">/dev/hda6</device> <device DEVNO="0x0307" TIME="1182412901" UUID="4036-F32E" TYPE="msdos">/dev/hda7</device> <device DEVNO="0x1604" TIME="1182412901" UUID="516dee8c-6313-4f25-809d-12f0d16b6614" TYPE="ext2">/dev/hdc4</device>