Theodore Tso wrote:
OK, can you try the following?  Right after you boot, can you try
running this command, and let me know whether it returns the correct
information?

        blkid -t LABEL=vms6

Or you don't have to reboot; try changing the device name at the end
of the line for vmm6, changing it to be something like this:

<device DEVNO="0x0831" TIME="1202040663" LABEL="vms6" UUID="82a15e8d-bae0-4300-8329-dc89268a71c4" 
TYPE="ext3" SEC_TYPE="ext2">/dev/sda5</device>

(The above is all one line)

and then try the above line, and see whether you get the right
information.

Blkid has always done the right thing in this regard, and nothing has
changed here recently --- that's why I'm asking you what version of
e2fsprogs you upgraded from previously.

I'm wondering if the issue is that the kernel is taking longer to
autodetect your USB devices, so they simpler aren't showing up at
boot.  If the above works after the boot process.

So I would try the following.  Try corrupting /etc/blkid.tab so the
device information for vms6 is wrong, and then try the mount.  If it
works, but it's not working at boot time, try adding a sleep 15 before
the mount -a command in the init scripts, and see if that fixes it...

It seems to have something to do with device nodes which do exists in namespace, but returns an ENOMEDIUM on open (*). When I tried your example, or /dev/sda5 & 0x805, or any other /dev/sd* node (/dev/sd* is maintained by udev on my box), or non-existing node, or node which reports ENXIO (/dev/.static/dev/sdk1, /dev/.static/dev/sdg5) everything is fine.

But when I pointed entry to:

<device DEVNO="0x0811" TIME="1202096532" LABEL="vms6" UUID="82a15e8d-bae0-4300-8329-dc89268a71c4" TYPE="ext3">/dev/.static/dev/sdb1</device>

(/dev/.static/dev/sdb1 is partition on device which returns ENOMEDIUM on open)

it added correct line, but left incorrect in place as well. So blkid now reports two results:

gwy:/home/petr# blkid -t LABEL=vms6
/dev/.static/dev/sdb1: LABEL="vms6" UUID="82a15e8d-bae0-4300-8329-dc89268a71c4" TYPE="ext3" /dev/sdg1: LABEL="vms6" UUID="82a15e8d-bae0-4300-8329-dc89268a71c4" TYPE="ext3"

And monut reports 'No medium' - with either one or two lines in blkid.tab (and while blkid adds correct entry, mount does not do anything).

I've attached "strace blkid -t LABEL=vms6" output for case where there was only bogus sdb1 entry in blkid.tab.

I suspect that problem is that volume in question was repartitioned & reformatted recently - apparently it took udev some time to create nodes in /dev, so blkid somehow found devices in /dev/.static/dev/sdX1, and that triggered ENOMEDIUM problems on next boot - as for udev /dev/sdX1 would not exist, and so blkid would notice.

(*) I've looked at sources, and blkid has special case for ENXIO/ENOENT/ENODEV. For ENOMEDIUM it reports back "returning unverified data", and returns whatever it found in cache. I have no idea what correct behavior should be - I'm sure in some cases users are trying to mount drives without medium inside.

                                                        Petr
execve("/sbin/blkid", ["blkid", "-t", "LABEL=vms6"], [/* 31 vars */]) = 0
brk(0)                                  = 0x954e000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f77000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=152329, ...}) = 0
mmap2(NULL, 152329, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7f51000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libblkid.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\"\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=33816, ...}) = 0
mmap2(NULL, 36684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7f48000
mmap2(0xf7f50000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xf7f50000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libuuid.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \20\0\000"..., 512) = 
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=12656, ...}) = 0
mmap2(NULL, 15440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7f44000
mmap2(0xf7f47000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xf7f47000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1356196, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f43000
mmap2(NULL, 1361520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7df6000
mmap2(0xf7f3d000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x147) = 0xf7f3d000
mmap2(0xf7f40000, 9840, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7f40000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdevmapper.so.1.02.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`1\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=88896, ...}) = 0
mmap2(NULL, 87768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7de0000
mmap2(0xf7df4000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xf7df4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libselinux.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320>\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=83512, ...}) = 0
mmap2(NULL, 88980, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7dca000
mmap2(0xf7dde000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xf7dde000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\000"..., 512) = 
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9684, ...}) = 0
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7dc6000
mmap2(0xf7dc8000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xf7dc8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libsepol.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2204\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=220764, ...}) = 0
mmap2(NULL, 266048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xf7d85000
mmap2(0xf7dbb000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35) = 0xf7dbb000
mmap2(0xf7dbc000, 40768, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7dbc000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7d84000
set_thread_area({entry_number:-1 -> 12, base_addr:0xf7d84ab0, limit:1048575, 
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, 
useable:1}) = 0
mprotect(0xf7f3d000, 4096, PROT_READ)   = 0
munmap(0xf7f51000, 152329)              = 0
brk(0)                                  = 0x954e000
brk(0x956f000)                          = 0x956f000
open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=591, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, "# This file controls the state o"..., 4096) = 591
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
statfs64("/selinux", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, 
f_blocks=48541760, f_bfree=7051520, f_bavail=4585744, f_files=24657920, 
f_ffree=22697319, f_fsid={1095621996, 789635686}, f_namelen=255, 
f_frsize=4096}) = 0
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 1024) = 1024
read(3, "e /proc/fs/vmblock/mountPoint vm"..., 1024) = 45
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
getuid32()                              = 0
geteuid32()                             = 0
getgid32()                              = 0
getegid32()                             = 0
prctl(0x3, 0, 0, 0, 0)                  = 1
open("/etc/blkid.tab", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1019, ...}) = 0
fcntl64(3, F_GETFL)                     = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFREG|0644, st_size=1019, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
_llseek(3, 0, [0], SEEK_CUR)            = 0
read(3, "<device DEVNO=\"0x0801\" TIME=\"120"..., 4096) = 1019
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
open("/etc/blkid.tab", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1019, ...}) = 0
close(3)                                = 0
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, "Character devices:\n  1 mem\n  2 p"..., 1024) = 501
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
open("/proc/misc", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, " 63 vmci\n165 vmmon\n200 tun\n229 f"..., 1024) = 111
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
stat64("/dev/mapper/control", 0xffd955b8) = -1 ENOENT (No such file or 
directory)
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, "Character devices:\n  1 mem\n  2 p"..., 1024) = 501
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
open("/proc/misc", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, " 63 vmci\n165 vmmon\n200 tun\n229 f"..., 1024) = 111
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
stat64("/dev/mapper/control", 0xffd955b8) = -1 ENOENT (No such file or 
directory)
open("/proc/evms/volumes", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/proc/lvm/VGs", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = -1 
ENOENT (No such file or directory)
open("/proc/partitions", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
read(3, "major minor  #blocks  name\n\n   8"..., 1024) = 401
time(NULL)                              = 1202097396
open("/dev/sda1", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\353R\220NTFS    \0\2\10\0\0\0\0\0\0\0\370\0\0?\0\360\0"..., 69632) = 
69632
lseek(4, 1073758208, SEEK_SET)          = 1073758208
read(4, "FILE0\0\3\0F\2364\3\0\0\0\0\1\0\1\0008\0\1\0\260\1\0\0"..., 1024) = 
1024
lseek(4, 1073741824, SEEK_SET)          = 1073741824
read(4, "FILE0\0\3\0F\2364\3\0\0\0\0\1\0\1\0008\0\1\0\260\1\0\0"..., 1024) = 
1024
lseek(4, 1073744896, SEEK_SET)          = 1073744896
read(4, "[EMAIL PROTECTED]"..., 1024) = 1024
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sda2", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\353R\220NTFS    \0\2\10\0\0\0\0\0\0\0\370\0\0?\0\377\0"..., 69632) = 
69632
_llseek(4, 54800924672, [54800924672], SEEK_SET) = 0
read(4, "FILE0\0\3\0001\305\10\212\2\0\0\0\1\0\1\0008\0\1\0\10\2"..., 1024) = 
1024
_llseek(4, 3221225472, [3221225472], SEEK_SET) = 0
read(4, "FILE0\0\3\0001\305\10\212\2\0\0\0\1\0\1\0008\0\1\0\10\2"..., 1024) = 
1024
_llseek(4, 3221228544, [3221228544], SEEK_SET) = 0
read(4, "FILE0\0\3\0>\251\v\214\0\0\0\0\3\0\1\0008\0\1\0\0\2\0\0"..., 1024) = 
1024
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sda5", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 5), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sda6", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 6), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sdf1", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 81), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/.static/dev/cdrom", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/devices/sdg1", 0xffd96694)     = -1 ENOENT (No such file or directory)
stat64("/devfs/sdg1", 0xffd96694)       = -1 ENOENT (No such file or directory)
stat64("/dev/sdg1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 97), ...}) = 0
time(NULL)                              = 1202097396
open("/dev/sdg1", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 97), ...}) = 0
uname({sys="Linux", node="gwy", ...})   = 0
ioctl(4, BLKGETSIZE64, 0xffd955d8)      = 0
_llseek(4, 1000201977856, [1000201977856], SEEK_SET) = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 
4096
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sdh1", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 113), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
time(NULL)                              = 1202097396
open("/dev/sdi1", O_RDONLY)             = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 129), ...}) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 
69632
time(NULL)                              = 1202097396
close(4)                                = 0
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
stat64("/etc/blkid.tab", {st_mode=S_IFREG|0644, st_size=1019, ...}) = 0
access("/etc/blkid.tab", W_OK)          = 0
gettimeofday({1202097396, 920030}, NULL) = 0
getpid()                                = 10534
open("/etc/blkid.tab-t1c0Pq", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
_llseek(3, 0, [0], SEEK_CUR)            = 0
fchmod(3, 0644)                         = 0
write(3, "<device DEVNO=\"0x0801\" TIME=\"120"..., 1006) = 1006
close(3)                                = 0
munmap(0xf7f76000, 4096)                = 0
unlink("/etc/blkid.tab.old")            = 0
link("/etc/blkid.tab", "/etc/blkid.tab.old") = 0
rename("/etc/blkid.tab-t1c0Pq", "/etc/blkid.tab") = 0
time(NULL)                              = 1202097397
time(NULL)                              = 1202097397
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f76000
write(1, "/dev/sdg1: LABEL=\"vms6\" UUID=\"82"..., 81) = 81
exit_group(0)                           = ?

Reply via email to