Dear Amir,

I have found a partial solution to my problem (see older message
below) and I am communicating it to you in case it will be of help to
other users of Disk on Key. As you will see it is not very user
friendly (one has to be able to e root, problematic with many disk on
keys or other devices using usb-storage) so in a sense the question
remains. But still it is possible to plug the device many times
without rebooting:

1. Insert Disk on Key
2. Mount Disk on Key
3. ....use...
4. Unmount Disk on Key
5. rmmod usb-storage         <--- here user root is required
6. Remove disk on key
7. Re-insert Disk on key
8. Goto 2.

In this way the device number (in /proc/bus/usb/001/) continues to
increase each time the key is re inserted but the key is re
initialized and I am able to mount it. See the above cycle in the
system log (/var/log/messages) from 5. -> 5.


Feb 18 21:32:14 m kernel: usb.c: deregistering driver usb-storage
Feb 18 21:32:14 m kernel: scsi : 0 hosts left.
Feb 18 21:32:18 m kernel: usb.c: USB disconnect on device 16
Feb 18 21:34:17 m kernel: hub.c: USB new device connect on bus1/1, assigned device 
number 17
Feb 18 21:34:17 m kernel: usb.c: USB device 17 (vend/prod 0x8ec/0x10) is not claimed 
by any active driver.
Feb 18 21:34:20 m /etc/hotplug/usb.agent: Setup usb-storage for USB product 8ec/10/200
Feb 18 21:34:20 m kernel: Initializing USB Mass Storage driver...
Feb 18 21:34:20 m kernel: usb.c: registered new driver usb-storage
Feb 18 21:34:20 m kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Feb 18 21:34:20 m kernel:   Vendor: M-Sys     Model: DiskOnKey         Rev: 2.51
Feb 18 21:34:20 m kernel:   Type:   Direct-Access                      ANSI SCSI 
revision: 02
Feb 18 21:34:20 m kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, 
lun 0
Feb 18 21:34:20 m kernel: SCSI device sda: 256352 512-byte hdwr sectors (131 MB)
Feb 18 21:34:20 m kernel: sda: Write Protect is off
Feb 18 21:34:20 m kernel:  sda: sda1
Feb 18 21:34:20 m kernel: USB Mass Storage support registered.
Feb 18 21:38:50 m kernel: usb.c: deregistering driver usb-storage
Feb 18 21:38:51 m kernel: scsi : 0 hosts left.
Feb 18 21:39:08 m kernel: usb.c: USB disconnect on device 17


Best Regards,
-- 
Konstantinos Anagnostopoulos
****************************************************************************
|Department of Physics, University of Crete, P.O. Box 2208                 |
|GR-710 03 Heraklion, Crete, GREECE                                        |
|tel.  : +30 2810394253(work),2810394200(secretary),2810394201(fax)        |
|            2810236964(home),6973987183(mobile)                           |
|e-mail: [EMAIL PROTECTED] WWW: http://hep.physics.uoc.gr/~konstant/ |
****************************************************************************




----------------------------------------------------------------------
Operating system: Linux  2.4.18-3, Red Hat 7.3, i686
Hardware:         Laptop, Acer TravelMate 340T, PIII 450MHz
Disk On key:      128Mb Serial No.: 2443E201591D62
===========================================================

Dear Amir, 

I am writing to you on some questions/problems I have using my new
Disk on Key I purchased recently. I would appreciate any help you
could give me, especially on the problem of mounting disk on key
multiple times on the same session (Question 3), since this is crucial
for using it on my workstation at work which I don;t want to reboor
without serious reason.


1. I am using mkfs to create a Linux filesystem and mkfs.msdos to
   create an MSDOS filesystem to be used with windows. Since I need to
   switch from one to the other, is there a possibility to damage the
   hardware of the key by frequent refomatting? Whare are the limits
   if known? 

2. Is there a filesystem that keeps ownerships and permissions of the
   linux file system and at the same time is readable by windows that
   can be created on disk on key and how? (like iso9660 used on CDs?)
   I do not dare trying without asking you.... (fdisk has a c command
   for changing a dos compatibility mode, but is that all?)

3. I have problem mounting Disk on Key after plugging it for the
   second time or more during the same session. This results hanging
   of the commands

   mount  /mnt/diskonkey
   fdisk -l /dev/sda
   (/etc/fstab entry:
/dev/sda1               /mnt/diskonkey          auto    noauto,owner,user 0 0
   )

   or sometimes the umount command hangs (it happened to me only with
   a dos filesystem). Then I cannot even reboot the system (kill -9
   fails too as expected), I have to switch off the machine. 

   What I see in /var/log/messages is that the second,third etc time I
   plug the machine is 

- ----------------------------------------------------------------------
Feb 12 23:36:29 m kernel: usb.c: USB disconnect on device 2
Feb 12 23:42:06 m kernel: hub.c: USB new device connect on bus1/1, assigned device 
number 3
Feb 12 23:42:09 m /etc/hotplug/usb.agent: Setup usb-storage for USB product 8ec/10/200
- ----------------------------------------------------------------
  and then a entry 
  /proc/bus/usc/001/003 appears (003 becomes 004, 005 etc each time I
  reconect). The entries /proc/scsi/usb-storage-0/0 and scsi are
  always there and when connected always
- -------------------------------------------------------------------
[root@m ~]# cat /proc/scsi/usb-storage-0/0 
   Host scsi0: usb-storage
       Vendor: M-Systems
      Product: DiskOnKey
Serial Number: 0817A20F18001573
     Protocol: Transparent SCSI
    Transport: Bulk
         GUID: 08ec00100817a20f18001573
     Attached: Yes
- --------------------------------------------------------------------
  (Attached -> No when I unplug it)
  After the second time a directory
  /proc/scsi/sg
  sometimes appears (generic scsi???) which **is not there the first
  time** I connect the disk on key. Some of the files there know it is
  a M-Systems disk on key. 


I attach some extra information on my system in case it will be
helpful. /var/log/messages is attached separately in case some
information in it could be useful for you. If you have any questions,
please contact me. 

Thank you,

- -- 
Konstantinos Anagnostopoulos
****************************************************************************
|Department of Physics, University of Crete, P.O. Box 2208                 |
|GR-710 03 Heraklion, Crete, GREECE                                        |
|tel.  : +30 2810394253(work),2810394200(secretary),2810394201(fax)        |
|            2810236964(home),6936185826(mobile)                           |
|e-mail: [EMAIL PROTECTED] WWW: http://hep.physics.uoc.gr/~konstant/ |
****************************************************************************


- -------------------------------------------------------------------------
the /etc/fstab entry
- -------------------------------------------------------------------------
/dev/sda1               /mnt/diskonkey          auto    noauto,owner,user  0
0

- -------------------------------------------------------------------------

- -------------------------------------------------------------------------
the /dev/sda1 device
- -------------------------------------------------------------------------
[root@m ~]# ls -l /dev/sda1
brw-------    1 konstant disk       8,   1 Apr 11  2002 /dev/sda1

- -------------------------------------------------------------------------
the /proc entry for the device
- -------------------------------------------------------------------------
[root@m ~]# cat /proc/scsi/usb-storage-0/0 
   Host scsi0: usb-storage
       Vendor: M-Systems
      Product: DiskOnKey
Serial Number: 0817A20F18001573
     Protocol: Transparent SCSI
    Transport: Bulk
         GUID: 08ec00100817a20f18001573
     Attached: Yes

- ------------------------------------------------------------------------
the /proc/scsi/scsi contents
- ------------------------------------------------------------------------
[root@m ~]# cat /proc/scsi/scsi 
Attached devices: 
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: M-Sys    Model: DiskOnKey        Rev: 2.51
  Type:   Direct-Access                    ANSI SCSI revision: 02

- ----------------------------------------------------------------
more related /proc entries
- ----------------------------------------------------------------
[root@m ~]# ls -l /proc/bus/usb/001/
total 1
- -rw-r--r--    1 root     root           18 Feb 14 14:56 001
- -rw-r--r--    1 root     root           18 Feb 14 14:56 002
[root@m ~]# ls -l /proc/bus/usb/
total 0
dr-xr-xr-x    1 root     root            0 Feb 14 14:56 001/
- -r--r--r--    1 root     root            0 Feb 14 14:56 devices
- -r--r--r--    1 root     root            0 Feb 14 14:56 drivers
[root@m ~]# cat /proc/bus/usb/devices 
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB OHCI Root Hub
S:  SerialNumber=cc893000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=08ec ProdID=0010 Rev= 2.00
S:  Manufacturer=M-Systems
S:  Product=DiskOnKey
S:  SerialNumber=0817A20F18001573
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 94mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
[root@m ~]# cat /proc/bus/usb/drivers 
         usbdevfs
         hub
         usb-storage

- ---------------------------------------------------------------------
the stete of the computer when the mount,fdisk hangs:
- ---------------------------------------------------------------------
[2001] 2:58pm m:~> cat /etc/mtab
/dev/hda2 / ext3 rw 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/hda3 /home ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda6 /tmp ext3 rw 0 0
/dev/hda8 /usr ext3 rw 0 0
/dev/hda7 /var ext3 rw 0 0
/dev/hda1 /win vfat rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0


- --------------------------------------------------------------------------
The outpout of the mkfs commands:
- --------------------------------------------------------------------------
> /sbin/mkfs /dev/sda1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32128 inodes, 128110 blocks
6405 blocks (5.00%) reserved for the super user
First data block=1
16 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

- --------------------------------------------------------------------
partitions :
- -------------------------------------------------------------------
[root@m ~]# fdisk -l /dev/sda

Disk /dev/sda: 6 heads, 63 sectors, 678 cylinders
Units = cylinders of 378 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1             1       678    128110+  83  Linux


-- 
Konstantinos Anagnostopoulos
****************************************************************************
|Department of Physics, University of Crete, P.O. Box 2208                 |
|GR-710 03 Heraklion, Crete, GREECE                                        |
|tel.  : +30 2810394253(work),2810394200(secretary),2810394201(fax)        |
|            2810236964(home),6973987183(mobile)                           |
|e-mail: [EMAIL PROTECTED] WWW: http://hep.physics.uoc.gr/~konstant/ |
****************************************************************************



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to