Wrong type in blkid cache causes fsck on boot to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs |
Invalid
|
Undecided
|
Unassigned | ||
util-linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
I have had this bug since end of intrepid/beginning of jaunty I think. I have two similar jaunty setups; one boots fine, the other keeps failing the fsck on boot:
bee# fsck -C -R -a /boot
fsck 1.41.3 (12-Oct-2008)
fsck.ext3: Device or resource busy while trying to open /dev/sda2
Filesystem mounted or opened exclusively by another program?
(actually what runs on boot is fsck -C -R -a -A which fails with the same error message)
The "device or resource busy" is due to /boot being on /dev/md1 which is made of /dev/sda2 and /dev/sdb2.
This behavior is racy; I ran blkid:
bee# blkid
/dev/mapper/
/dev/mapper/
/dev/mapper/
/dev/mapper/
/dev/sda1: UUID="db18614f-
/dev/sda2: UUID="b1a8d7aa-
/dev/sdb1: UUID="659550dd-
/dev/md0: UUID="659550dd-
/dev/mapper/
/dev/mapper/
/dev/mapper/
/dev/sdb2: UUID="40a955ce-
/dev/sdb3: UUID="60b75582-
/dev/sda3: UUID="60b75582-
/dev/md2: UUID="gy0khl-
/dev/md1: UUID="b1a8d7aa-
and now suddenly fsck knows that /boot is /dev/md1 and not /dev/sda2!
bee# fsck -C -R -A -a
fsck 1.41.3 (12-Oct-2008)
/dev/md1 is mounted. e2fsck: Cannot continue, aborting.
/dev/mapper/
/dev/mapper/
I think this is due to /etc/blkid.tab; a cache of device information.
Bye
description: | updated |
affects: | e2fsprogs (Ubuntu) → util-linux (Ubuntu) |
Changed in e2fsprogs: | |
status: | New → Invalid |
So I discovered that "blkid -c /dev/null" reports the correct results, but /etc/blkid.tab is always wrong; even "blkid -c /dev/null -w /dev/blkid.tab" doesn' t fix the file (sda2 still appears as ext3/ext2 instead of mdraid).
The only way to fix my blkid cache was to move it out of the way; then "blkid" generated a good new cache.