Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I mount USB devices using the following command. I have no /etc/fstab entry, I mount these devices programmatically.

mount -o nodev LABEL=xyz mount-point

As soon as I attach another USB device, the earlier device name which was used at mount (e.g. /dev/sdc) changes to a new name (e.g. /dev/sdd) and my mounted device will not be reachable (typically I receive an I/O error).

How can I avoid this behavior and force the system NOT to "rename" already mounted devices?

It would be VERY important that my device names stay in place.

share|improve this question
    
The device name should not matter, as it is only used when mounting. (Even more, mount finds the correct device name for you, based on the label.) Once the filesystem has been mounted, Linux uses other means to identify the device. It's only a symptom, however; the real problem is that already-attached devices get reinitialized when a new one is plugged in, which is not supposed to ever happen in normal usage. If that is happening, there might be problems with USB itself. –  grawity Dec 6 '11 at 12:55
add comment

1 Answer

It seems that adding a rule to udev solves to problem. Before mounting the device I fetch the serial number of the device and write it into the udev rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.