Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got an external harddrive that I'd like to auto-mount. It will be present most times when my laptop boots. Where is the "correct" place to mount it?

  • /media/my-hd: Will litter /media with an empty folder when the hard-drive was not mounted.
  • /mnt/my-hd: I've heard that /mnt itself is supposed to be used as a temporary mount point. This happens, for example, during the Arch installation process.
share|improve this question
2  
If you use a udev rule to automount, there won't be any empty folders "littering" /media when the drive is unmounted... –  jasonwryan Jul 9 '12 at 19:56
    
You could certainly make the mount point directory mode 0500 owner root:root, and the root directory on the drive something like 0755 owner you:users. That would largely ensure that you don't accidentally save things there when the drive is not mounted, and wonder where they ended up... –  Michael Kjörling Jul 10 '12 at 9:32

2 Answers 2

up vote 5 down vote accepted

The recommendation in the Filesystem Hierarchy Standard is that /media contains subdirectories for mount points of removable media. There are two conflicting traditions about /mnt: some consider it a mount point, whereas others consider it a directory for mount points. The FHS requests that distributions leave /mnt alone, so that the administrator can do what they like with it, and set up mount points under /media. System installation is a special case: it's a dedicated system, so it doesn't need to worry about competing conventions.

If you use an automounting script (such as an udev rule as suggested by jasonwryan — see How to get my USB key to auto mount), it can take care of creating the mount point. But there's no harm in having the mount point all the time.

share|improve this answer
    
I'm having a similar situation, that differs in that the system in question is a server running from microSD, having an external hard drive as a larger storage for non-system files, and the mount is pretty much fixed/permanent. My intention is to soft-link appropriate files and directories under, for example, /srv as I see fit. I think that your answer clears up my problem, and I assume that the correct mount point is under /media. In case I've misunderstood or you have something to say about this, let me know and I'll write a question and notify you about it so you can give a proper answer. –  montiainen Oct 11 at 9:50

TL;DR /mnt/my-hd

The Linux Filesystem Hierarchy conventions are documented over at tldp.org.

The /media entry reads,

Amid much controversy and consternation on the part of system and network administrators a directory containing mount points for removable media has now been created.

Your hard drive isn't removable media, so it should be mounted under /mnt.

That being said, it really is up to you. On a personal system, it really doesn't matter!

share|improve this answer
1  
This answer makes no sense: the distinction between /mnt and /media is not about removable vs non-removable media. Besides we're talking about a removable media here. –  Gilles Jul 9 '12 at 22:28

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.