[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Nov 2009 ]

Re: [edlug] Is a USB drive mounted




Well /proc/mounts contains the list of mounted file systems, but I'm not 
sure that this will tell you anything that mount does not, although, 
mount does not seem to access it:

$ strace mount 2>&1 | grep mounts

returns nothing. 

Anyway, are you sure that detecting that these devices are mounted as 
filesystems is what you want? Sometimes when you have intermittent 
connectivity, the mounting and unmounting can get into a bit of a 
mess, because it can take a long time for IOs that are in flight to time 
out, and the file system will remain mounted until the buffers can be 
flushed. If you know the device name, it would be much more accurate 
to test the physical connection in /sys/block.

Hope this helps!

cheers,
Jerome


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble+RM@xxx.xxx.xxx
Morpheux
HomePage