3

This was originally asked on the Ubuntu SE, but only received a couple of comments and no answers, so I have moved it here since it is a very basic and general Linux question.

I have a linux machine with an external solid state drive (connected using a SATA to USB adapter) simply to provide additional storage, and have this drive automatically being mounted on boot-up (using fstab).

The question is what is the convention for where I set this drive to be mounted? Should it be at /mnt/ or at /media/ ?

For example, I read this answer, which says "/media/ is for removable media such as CD-ROMs and floppy disks", whereas "/mnt/ is for filesystems for a short period of time".

Although my external drive is strictly removable (it is connected via USB, and can be removed), it is not going to be plugged in and out all the time like a CD-ROM or floppy disk - I intend to keep it permenantly connected as a way to add extra storage. Should I describe my drive as "removable"?

However, it is also not going to be mounted for a "short period of time", so is /mnt/ not suitable?

Sorry if this is old ground and has been asked many times before - I couldn't find an answer for what is the convention in this scenario. Thanks.

teeeeee
  • 157
  • I don't think there is a convention. I'd probably use something like /data. On the other hand since it's external you could just let the system mount it under /media – Chris Davies Jun 14 '20 at 09:29
  • 1
    Ubuntu uses /media/$username/$whatever for automounted drives, so if you just plugged it in on an Ubuntu machine and forgot about it, that's what you'd likely get. Under /media seems sensible enough, but do what feels good to you, it's not like anyone would come to inspect your machine and mounts ;) IMO The standard filesystem layout doesn't really apply too well, as something like /var is defined by the function but here it's probably a good idea to keep the external disk separate just for the technical distinction. – ilkkachu Jun 14 '20 at 10:02
  • 1
    If I was running a shared system, I suppose I would like such a drive to mounted where people would expect to find it. I guess that's what I'm asking - if you came to a new system, and you knew it had a permenant external drive for storage, then where would you intuitively expect this type of disk to be mounted. – teeeeee Jun 14 '20 at 10:11
  • 1
  • But isn't the /media/ directory designed for automounted removable stuff? Mine is neither of those (it is set to be mounted at boot using fstab, andwill be permenantly attached) – teeeeee Jun 14 '20 at 10:12
  • 1
    FWIW, I put everything additional I mount via fstab into /mnt/..., on Debian. That's also where I would look for it (but YMMV). Anything that gets automounted I'd put in /media/. – dirkt Jun 14 '20 at 10:30
  • 1
    You may want to automount, so if you do unplug it that it does not prevent boot or make boot very long as it has to timeout. https://wiki.archlinux.org/index.php/fstab#Automount_with_systemd – oldfred Jun 14 '20 at 16:16

0 Answers0