Skip to main content
Topic: /mnt (Read 2325 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

/mnt

Hi,

I just want to ask, do you have /mnt directory under / ? Cause I am not sure whether I did not accidentally delete it.

Thanks

Re: /mnt

Reply #1
Sounds like you did delete it if it isn't there. Just create it again.
Code: [Select]
sudo mkdir /mnt

Re: /mnt

Reply #2
Btw: Is /mnt/ important? I never use it.

Re: /mnt

Reply #3
It's just a place where people conveniently mount their drives manually from /etc/fstab. I also use this folder with cdemu to mount ISO images for my old games backups.

Re: /mnt

Reply #4
Btw: Is /mnt/ important? I never use it.

Yes. It is used to mount external storage devices(external hdd, flash drive, etc), network storage(smb, ftp, sftp, etc), images(iso) or internal drives on which you haven't registered in /etc/fstab.

Quote from: Linux FileSystem Hierarchy Standard section 3.12
3.12. /mnt : Mount point for a temporarily mounted filesystem
3.12.1. Purpose

This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.

This directory must not be used by installation programs: a suitable temporary directory not in use by the system must be used instead.

Source: Linux FileSystem Hierarchy Standard

Re: /mnt

Reply #5
Btw: Is /mnt/ important? I never use it.
I'm going to go with no. I never use it any more either. I used to mount things there but for many years now I have used /tmp for this as then the dirs I create for that purpose clean themselves at reboot.
I suspect I could delete it with absolutely no ill effect, but also suspect I never will.

Re: /mnt

Reply #6
for many years now I have used /tmp for this as then the dirs I create for that purpose clean themselves at reboot.
Dto. But I use /tmp/ in RAM (tmpfs), similar to /run/ where the GUI mounts other Partitions and ext. Drives.

Re: /mnt

Reply #7
Btw: Is /mnt/ important? I never use it.
Btw: Is /mnt/ important? I never use it.


It is a convenience for the root admin.  It is to mount temporary external file systems.  I use it a lot.  But the new desktops automount things, usually under /run/media/ , which I find a security breach not to mention that I find gfvs tends to run memory and cpu crazy.

I have under my home directory a few mnt directories

Code: [Select]
flatbush:[ruben]:~$ ls -d mnt*
mnt   mnt3  mnt5  mnt7        mnt_flash  mnt_oyen2
mnt2  mnt4  mnt6  mnt_fathom  mnt_oyen   mnt_panix

It used to be critical when I had an iomega zip drive..


Re: /mnt

Reply #8
I use /mnt a lot, because I have a couple of 7port powered USB3 hubs and I use a lot of USB sticks and backup drives in a lot of machines so they move around a lot.

Because I use it so much I have a couple of tricks. I have subdirectories in /mnt for each device a machine may encounter, so typically I would have /mnt/usb1, /mnt/iso-latest,  /mnt/backup, etc.

In addition, I have /mnt on a small 1gb partition, which is useful when one copies to a drive one thinks is mounted, but it isn't and the data goes straight to your root partition. In my case the partition is filled almost immediately with no harm done. This helps when there are infinite copy loops, also.

As a third precaution, the /mnt partition is marked read-only in fstab.

That's how you DO overkill.

Re: /mnt

Reply #9
In addition, I have /mnt on a small 1gb partition, which is useful when one copies to a drive one thinks is mounted, but it isn't and the data goes straight to your root partition.
That's a good idea. - But wouldn't it be better to mount /mnt in tmpfs with limited size, so you have no disk writes?

The subdirs can be created when mounting (if a script) or witch rc.local, for example.

Re: /mnt

Reply #10
I don't think tmpfs would do at all. The goal is quick failure when writing to wrong place. Wouldn't tmpfs just take it all and then start swapping to disk?

Re: /mnt

Reply #11
Wouldn't tmpfs just take it all and then start swapping to disk?
I wrote "tmpfs with limited size": If you give it 1G, after 1G it is full: rien ne va plus.

Edit: Just for Mountpoints 640k “should be enough for everyone“. ;)