Bought today two identical usb-sticks and made some observations.

1. not related to the two usb-sticks being identical:

   * some env variables are already exported by udev:

        ID_BUS=usb
        ID_FS_SEC_TYPE=msdos
        ID_FS_TYPE=vfat
        ID_FS_USAGE=filesystem
        ID_FS_UUID=A81E-4052
        ID_FS_UUID_ENC=A81E-4052
        ID_FS_VERSION=FAT16
        ID_INSTANCE=0:0
        ID_MODEL=USB_Flash_Disk
        ID_MODEL_ENC='USB\x20Flash\x20Disk\x20\x20'
        ID_MODEL_ID=0165
        ID_PATH=pci-0000:00:1d.7-usb-0:3.2:1.0-scsi-0:0:0:0
        ID_REVISION=0.00
        ID_SERIAL=Ut165_USB_Flash_Disk_00000000000E89-0:0
        ID_SERIAL_SHORT=00000000000E89
        ID_TYPE=disk
        ID_USB_DRIVER=usb-storage
        ID_USB_INTERFACES=:080650:
        ID_USB_INTERFACE_NUM=00
        ID_VENDOR=Ut165
        ID_VENDOR_ENC='Ut165\x20\x20\x20'
        ID_VENDOR_ID=1307

     and accessible to all:

        /usr/share/usbmount/usbmount
        /etc/usbmount/mount.d/00_create_model_symlink
        /etc/usbmount/umount.d/00_remove_model_symlink

     scripts, so re-exporting:

        + export UM_FILESYSTEM=vfat
                same as ID_FS_TYPE=vfat
        + export UM_VENDOR=Ut165
                same as ID_VENDOR=Ut165
        + export 'UM_MODEL=USB Flash Disk'
                (almost) same as ID_MODEL=USB_Flash_Disk

     shouldn't be needed, and would simplify and improve performance.

2. related to the two usb-sticks being identical:

   * they are in fact so identical, that the only differences lay in:

        ID_PATH=pci-0000:00:1d.7-usb-0:3.4:1.0-scsi-0:0:0:0
        ID_SERIAL=Ut165_USB_Flash_Disk_00000000000E7F-0:0
        ID_SERIAL_SHORT=00000000000E7F

3. the next thing is the mounted device is (for example) /dev/sdc instead
   of the expected /dev/sdc1:

        $ cat /proc/mounts
        /dev/sdc /media/usb0 vfat 
rw,nodev,noexec,noatime,nodiratime,gid=25,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,errors=remount-ro
 0 0

        $ mount
        /dev/sdc on /media/usb0 type vfat 
(rw,noexec,nodev,noatime,nodiratime,gid=25,dmask=0007,fmask=0117)

   * fidsk reports:

        # fdisk -l /dev/sdc
        GNU Fdisk 1.2.3

        Disk /dev/sdc: 2 GB, 2015193600 bytes
        255 heads, 63 sectors/track, 245 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
        /dev/sdc1               1         246     1975963   83  Linux
        Warning: Partition 1 does not end on cylinder boundary.

   * fsck reports:

        # fsck.vfat  /dev/sdd
        dosfsck 3.0.6, 04 Oct 2009, FAT32, LFN
        /dev/sdd: 1 files, 2606/61664 clusters

   now, this could be a problem with udev, the kernel, or elsewhere.

4. the created symlinks under /var/run/usbmount for the two sticks are
   identical (/var/run/usbmount/Ut165_USB_Flash_Disk), at least with my
   modified scripts, and that leeds to confusion

I guess the easiest way to reproduce this is to 'dd' one stick to the
other, but I didn't test that.

May be so that using ID_SERIAL_SHORT would be a partial workaround, but I
didn't try that either, yet.


Cheers,

-- 
Cristian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to