This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467T USB automounting issues

Hello,

I have configured DM6467T DVEVM board to use USB as a host. After I plug in USB drive to the socket, udev automounts it without any problems as /dev/sda1 to /media/sda1, and I can work with the drive. However, if I pull out the drive, automounting hangs, the device is still listed as mounted, and the processes accessing it ([usb_storage], [scsi_eh_1] are still active. Changing umount flags to -f solves the problem partially. In this case only [scsi_eh_1] stays active, but the /dev/sda1 is still listed as mounted, so if I plug in the stick again, it will be mounted as /dev/sdb1 which is apparently quite inconvenient.

Does anyone know how to deal with this situation, i.e. to remove all traces of the USB device after its unplugged from the board?

Alex

  • Alex,

    Are you unmounting the USB drive first?  It is not a good idea to remove a USB drive without unmounting it because data stored in the file system caches may not have been written to the drive.  The safest way to do this is to use the "umount" command to unmount the drive.  Then you can safely remove the USB drive.  Next time you plug the drive in it should come up as /dev/sda1 again.

    Chase

  • Chase,

    I know that unmounting USB drive first is a good idea. However, people tend to just remove the sticks from the ports because they are used to do so on PCs, and the embedded system should be robust enough to handle erroneous user actions. Is there a way to get rid of all the traces of the previous mounts?

    Alex