Bug 162927
Summary: | blkid: poor ext2 revalidate | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Jaegermann <michal> | ||||
Component: | e2fsprogs | Assignee: | Karel Zak <kzak> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | kzak, sct | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-09-05 13:44:41 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Michal Jaegermann
2005-07-11 18:11:58 UTC
The mount uses /proc/filesystem for unknown (=known for kernel) filesystems only. The standard FS should be recognized by libblkid (from e2fsprogs package). I can't reproduce it on FC4 where is almost same util-linux and e2fsprogs package. > The mount uses /proc/filesystem ... We are talking about /etc/filesystems. Quoting from a description of an option '-t' in 'man mount' Otherwise, mount guesses itself by probing the superblock; if that does not turn up anything that looks familiar, mount will try to read the file /etc/filesystems, or, if that does not exist, /proc/filesystems. and the next paragraph talks about how a probe ordering is affected. > I can't reproduce it on FC4 Unfortunately I do no have a suitable FC4 installation where I could try that but indeed on FC3 ext3 file systems are mounted ext3 and not ext2 without beeing explicit. But before lines quoted from the manpage there is: .... If mount was compiled with the blkid library, the guessing is done by this library. Maybe this is what changed? It seems to come from e2fsprogs-1.37-4 on my test system. Oh, I see. Something wrote /etc/blkid.tab. If I will 'blkid /dev/sda7', which reads this file, then I see /dev/sda7: LABEL="spare" UUID="f8e4c33d-6f57-4a30-a51c-adcbddd3c5a0" SEC_TYPE="ext3" TYPE="ext2" but if I will do instead 'blkid -c /dev/null /dev/sda7' then I am getting /dev/sda7: LABEL="spare" UUID="f8e4c33d-6f57-4a30-a51c-adcbddd3c5a0" SEC_TYPE="ext2" TYPE="ext3" which is different. After rewriting /etc/blkid.tab in the following way blkid -c /dev/null > /etc/blkid.tab I can do 'mount /dev/sda7 /mount/point' and indeed it mounts as ext3. The catch seesm to be that apparently something rewrites /etc/blkid.tab on some occasions. Please, try: rm -f /etc/blkid.tab mount /dev/sda7 /mount/point Action from comment #3 do work and ext3 systems are not mounted as ext2. Runnning 'mount' creates a new /etc/blkid.tab file which differs from the one which I rebuild with 'blkid -c /dev/null > /etc/blkid.tab' only in time fields. It looks like that every invocation of 'mount' rewrites /etc/blkid.tab, hence a reboot too, but types of filesystems are kept. This constant rewrites could be a bother with / mounted read-only. I found a problem. The libblkid doesn't check for journal when revalidate the cache information about an ext2 device. # rm -f /etc/blkid.tab # mkfs.ext2 /dev/loop0 &> /dev/null # blkid -s TYPE /dev/loop0 /dev/loop0: TYPE="ext2" # mkfs.ext3 /dev/loop0 &> /dev/null # blkid -s TYPE /dev/loop0 /dev/loop0: TYPE="ext2" That bug doesn't appear when libblkid creates new cache and checks for all possible filesystems, because it tries ext3 before ext2. BUT when the library only revalidate the cache it first probes for old cached filesystem (e.g. ext2). Created attachment 116706 [details]
blkid ext2 probe bug fix patch
A stupid question (as I was not testing that). What libblkid will do with removable media, like /dev/fd0, where the next file system to mount may not have anything in common with the previous one? Users cannot pass options to mount and floppies are not handled by hotplug. One may possibly find some hooks to override caches with CDs. Or these things will be never cached? to comment #7: it's same for all devices: 1. check device for cached FS + --> FS is still same: 2. call mount() 3. update cache (TIME field only) 4. exit() - --> or: 2. determine actual FS on device 3. call mount() 3. update cache 3) exit() I think it's pretty reliable. > 1. check device for cached FS
> + --> FS is still same:
....
Ah, you mean that only this check was failing when ext2 was in cache, for
whatever reasons, and FS was ext3. Makes sense. Thanks!
|