In <200003030442.PAA03148@xxxxxxxxxxxxxxxxxxxxx> Richard Gooch
(rgooch@xxxxxxxxxxxxx) wrote:
RG> Khimenko Victor writes:
>> On Fri, 18 Feb 2000, Richard Gooch wrote:
>> > Let me get this straight: when no medium is inserted, the "disc" entry
>> > exists? That's not what should happen.
>> >
>> Ok. I just checked once more. No, if there are no medium is inserted
>> "disc" entry is not created. Now I recovered the whole situation: I
>> inserted ZIP drive without partition table => ide-floppy loaded,
>> disc entry created. Then I tried to mount is as zip-win (i.e. not as
>> whole disc but as part4) and failed. Then I replaced it with proper
>> zip disc with partiton table and tried to access part4... Yes, most
>> common problem is fixed in recent versions of devfs. This one does
>> not :-(( Of course it's suble problem and so solution can wait :-)
RG> So the problem is that while the "disc" entry is created (zip-win)
RG> medium inserted, no partition entry is created?
No. No partition entry was created when I tried to access partion entry !
>>From what you say, it appears that the medium doesn't have a valid
RG> partition table. When you insert and access the win-zip medium, what
RG> partition table information appears in the kernel logs?
When I insert -- no. When I access -- yes.
RG> Perhaps the problem lies in the Linux partition table reading. If
RG> that's the case, devfs won't see any partitions either.
No. There ARE problems in Linux partition table reading. But it's other issue.
Here we have DESIGN flaw, not IMPLEMENTATION flaw. Kernel will NOT rescan
partition table when you'll try to load already loaded driver. Kernel WILL
rescan partition table if you'll access medium. But when you'll try to use
mount mount will not try to access medium via "disc" entry and "part4" will
not apper there since there was no actual access to medium. Chicken-egg problem.
Here is transcript (not that kernel will correctly read partion table only on
second pass; this is kernel problem and orthogonal issue)
-- cut --
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/disc
of=/dev/null bs=512 count=1
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
NTFS version 990411
MSDOS FS: Using codepage 866
MSDOS FS: IO charset koi8-r
MSDOS FS: Using codepage 866
MSDOS FS: IO charset koi8-r
hdd: 98304kB, 196608 blocks, 512 sector size
hdd: 98304kB, 32/64/96 CHS, 4096 kBps, 512 sector size, 2941 rpm
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/disc
of=/dev/null bs=512 count=1
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
MSDOS FS: IO charset koi8-r
hdd: 98304kB, 196608 blocks, 512 sector size
hdd: 98304kB, 32/64/96 CHS, 4096 kBps, 512 sector size, 2941 rpm
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
[root@localhost /root]# ls -al /dev/ide/host0/bus1/target1/lun0
total 0
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
brw------- 1 root root 22, 64 Jan 1 1970 disc
<disk changed, kernel does not see anything, not dot say anything:normal>
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/part4
of=/dev/null bs=512 count=1
dd: /dev/ide/host0/bus1/target1/lun0/part4: No such file or directory
[root@localhost /root]# dmesg | tail
MSDOS FS: IO charset koi8-r
hdd: 98304kB, 196608 blocks, 512 sector size
hdd: 98304kB, 32/64/96 CHS, 4096 kBps, 512 sector size, 2941 rpm
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
[root@localhost /root]# ls -al /dev/ide/host0/bus1/target1/lun0
total 0
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
brw------- 1 root root 22, 64 Jan 1 1970 disc
<no access to drive => no partition table reload>
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/disc
of=/dev/null bs=512 count=1
Dev 16:40 SGI disklabel: bad magic 50492eeb
unknown partition table
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 50492eeb
unknown partition table
[root@localhost /root]# ls -al /dev/ide/host0/bus1/target1/lun0
total 0
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
brw------- 1 root root 22, 64 Jan 1 1970 disc
<oops, one time is not enough>
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/disc
of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 00000000
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 50492eeb
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0: p4
[root@localhost /root]# ls -al /dev/ide/host0/bus1/target1/lun0
total 0
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
brw------- 1 root root 22, 64 Jan 1 1970 disc
brw------- 1 root root 22, 68 Jan 1 1970 part4
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/part4
of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
<yeah, now all info is there and fine; now I try to remove floppy and insert
one without partition table back>
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/disc
of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
[root@localhost /root]# dd if=/dev/ide/host0/bus1/target1/lun0/part4
of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
1+0 records in
1+0 records out
[root@localhost /root]# dmesg | tail
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0:Dev 16:40 Sun disklabel: bad magic 0000
Dev 16:40 SGI disklabel: bad magic 50492eeb
unknown partition table
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0: p4
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0: p4
VFS: Disk change detected on device ide1(22,64)
/dev/ide/host0/bus1/target1/lun0: p4
<what a hell is going on???>
[root@localhost /root]# rmmod ide-floppy
[root@localhost /root]# ls -al /dev/ide/host0/bus1/target1/lun0
total 0
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
brw------- 1 root root 22, 64 Jan 1 1970 disc
brw------- 1 root root 22, 68 Jan 1 1970 part4
<Huh ? There are NO ide-floppy anymore! I even ejected disk ! Entries are still
there :-(>
-- cut --
|