1

I have a USB disk connected to a server computer which is mounted when the computer starts. I'm thinking that it's not ideal to mount it under the /media directory since it could potentially lead to a naming conflict if a user has the same name as the disk label. Should I therefor mount it in /mnt? Is there a best-practice?

2 Answers 2

2

I too would be wary about using directories which are managed by automounters like that. I think /media/ used to be shared by all users, it wouldn't have been so much of a problem... but it seems ugly to use it now, at least on systems like yours.

There is not one best practice. E.g. read: Preferred mount points for internal HDDs

A subdirectory of /mnt seems to be accepted. That directory is for the system administrator to control, and it's well known as a possibility (even by those who disagree it should be used, I would say :).


Personally I lean towards /mnt/whatever, rather than creating something new in the root directory. Just that the root is fairly cluttered, so if you were looking for something there you could easily miss it.

The FHS gripe against /mnt/whatever is that the historical point of /mnt was to have a convenient directory to mount over. I think it was a valid argument in the context of FHS, which specifies rules for distributions. So FHS defined /media to consolidate the traditional /floppy and /cdrom, advising against putting them in /mnt. But, as the system administrator you can always create e.g. /mnt/tmp when you need to.

1

That is up to you, the system administrator, to determine those conventions but it is indeed a good idea to make sure the mounting points can not conflict with anything else.

Considering that the mounting point is dynamic in this case, it would be even safer to do them in another level of sub-directory such as /mnt/usb or something similar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .