# Linux disk mount location



## TroyT (Jun 24, 2008)

This may be one of those there is no "right" answer type questions. I've got a linux system to which I'm adding 2 more hard drives. The drives will contain mostly media (movies and what not). These will be a permanent mount at boot time. I've done some research and have seen the /media, /mnt, and /var folders as locations for the mount point. Is there a standard for this type of thing or is it just personal preference? There may not be a correct answer, but I'm open to other peoples thoughts?

Thanks.


----------



## backwoodsman7 (Mar 22, 2007)

I've never heard of mounting drives in /var, but I guess you could. Normally permanently installed drives go in /mnt, and removable drives in /media.


----------



## Nevada (Sep 9, 2004)

^^This^^

Traditionally, Linux mounts are placed in the /mnt directory. In recent years the convention is shifted to placing removable media drives (usb & CD/DVD) in /media. Some Linux desktop distributions now place CD/DVD's into a directory called /cdrom, and it's assigned & mounted automatically if Linux was installed from a CD or DVD. Other common automatic optical drive mount locations are /mnt/cdrom and /media/cdrom depending on the distribution.

This is foreign to Windows users because in Windows additional drives are lettered, and each drive has its own directory tree that starts with "\" to indicate the root directory. In Linux you never leave the directory tree provided by the Linux install drive, so drives have to be "mounted" someplace. So to see information on an additional hard drive you would first have to manually "mount" the drive and then look for the it in the /mnt directory.

The reason Linux does this is to avoid confusion. When a usb drive is inserted into a Windows machine the operating system automatically assigns a drive letter for that device. That's handy, but depending on the order in which drives are inserted the assigned drive letter can vary. In Linux they want drive locations to be more deliberate so drive locations are always going to be the same, even after a system restart. For that reason Linux system admins prefer to assign drive locations themselves manually.

For Linux desktop distributions I suppose they could devise a more automatic system for handling new drives, but remember that Linux is created by nerds for nerds. If you don't like it you can always use Windows or Mac.


----------



## TroyT (Jun 24, 2008)

This is what I've been running into the Filesystem Hierarchy Standard states that /mnt is for temporary drive mounts, not permanent mounts the /media folder is for removable media. There is nothing that I can find that says "this where new internal HD get mapped".


----------



## Nevada (Sep 9, 2004)

TroyT said:


> This is what I've been running into the Filesystem Hierarchy Standard states that /mnt is for temporary drive mounts, not permanent mounts the /media folder is for removable media. There is nothing that I can find that says "this where new internal HD get mapped".


The convention is to put additional hard drives in /mnt. But you can put them anywhere you want. It doesn't matter as long as you know where they are.

The reason for adhering to convention is if someone else is administering your system. Following the conventions I outlined above allows someone else to know where things can be found.


----------



## Meinecke (Jun 30, 2017)

Totally agree Nevada here...
I have mine always in the /var/tmp/ftp path...but that is die to my mods on my FritzBox..
So as long you know where they are...worst case a short "mount" command in console shows all the little dirty secrets


----------



## Nevada (Sep 9, 2004)

Nevada said:


> The convention is to put additional hard drives in /mnt.


To be clear, you wouldn't use /mnt as a hard drive mount point. You would create a directory for the hard drive in the /mnt directory. For example, you might call the new hard drive 'hdd2' and create a directory /mnt/hdd2 for the mount point. That way you could add any number of additional hard drives and find them all in /mnt.


----------



## Nevada (Sep 9, 2004)

Meinecke said:


> Totally agree Nevada here...
> I have mine always in the /var/tmp/ftp path...but that is die to my mods on my FritzBox..
> So as long you know where they are...worst case a short "mount" command in console shows all the little dirty secrets


I have virtual mount points in /var/www/clients for my hosting clients. Those virtual mount points are added automatically by the hosting control panel when a client or domain are added. That serves several purposes. Those mount points provide a "jailed" environment where clients can navigate their own areas without having access to other directories, and allows setting quotas to limit how many megabytes a client can upload. But the hard drive itself isn't mounted in /var.


----------



## Gary in ohio (May 11, 2002)

You can mount the drives wherever you like, As noted /mnt has been the historic location but /media is the new space.
How is the drive going to be used, By one user to serving up as a media server.

If a single user would use them mount it to their home directory under /home/<user>/media/video1 and video2.
If you want to available to all users then /usr/local/media/video1 and /usr/local/media/video2.

/var is NOT where it should go but technical would work. You will need to create the mount point before you mount it, but /usr/local/media is good place to create.


----------



## TroyT (Jun 24, 2008)

Well, I went with the /mnt/xxxx folder method. I've still got some permissions issues to sort out, but I will get there. Thanks for all the help!


----------

