How to reserve a frequently used mount point?












1














I have a drive that I'd like to always automount at a convenient path, say /mnt/my_drive. However, how do I know some other program won't try to use this mountpoint in the future, either preventing my drive from mounting (and breaking programs that rely on it) or breaking itself when the drive is already mounted? Is there some list of "reserved mountpoints" in Linux?










share|improve this question


















  • 2




    /etc/fstab is the answer
    – m c squared
    Dec 9 at 4:28










  • Use a label with a distinctive name...
    – jasonwryan
    Dec 9 at 5:36
















1














I have a drive that I'd like to always automount at a convenient path, say /mnt/my_drive. However, how do I know some other program won't try to use this mountpoint in the future, either preventing my drive from mounting (and breaking programs that rely on it) or breaking itself when the drive is already mounted? Is there some list of "reserved mountpoints" in Linux?










share|improve this question


















  • 2




    /etc/fstab is the answer
    – m c squared
    Dec 9 at 4:28










  • Use a label with a distinctive name...
    – jasonwryan
    Dec 9 at 5:36














1












1








1







I have a drive that I'd like to always automount at a convenient path, say /mnt/my_drive. However, how do I know some other program won't try to use this mountpoint in the future, either preventing my drive from mounting (and breaking programs that rely on it) or breaking itself when the drive is already mounted? Is there some list of "reserved mountpoints" in Linux?










share|improve this question













I have a drive that I'd like to always automount at a convenient path, say /mnt/my_drive. However, how do I know some other program won't try to use this mountpoint in the future, either preventing my drive from mounting (and breaking programs that rely on it) or breaking itself when the drive is already mounted? Is there some list of "reserved mountpoints" in Linux?







automounting






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 9 at 0:36









Bagalaw

1891213




1891213








  • 2




    /etc/fstab is the answer
    – m c squared
    Dec 9 at 4:28










  • Use a label with a distinctive name...
    – jasonwryan
    Dec 9 at 5:36














  • 2




    /etc/fstab is the answer
    – m c squared
    Dec 9 at 4:28










  • Use a label with a distinctive name...
    – jasonwryan
    Dec 9 at 5:36








2




2




/etc/fstab is the answer
– m c squared
Dec 9 at 4:28




/etc/fstab is the answer
– m c squared
Dec 9 at 4:28












Use a label with a distinctive name...
– jasonwryan
Dec 9 at 5:36




Use a label with a distinctive name...
– jasonwryan
Dec 9 at 5:36










1 Answer
1






active

oldest

votes


















4














You might want to read the Filesystem Hierarchy Standard.



Generally, programs won't mount things on their own initiative, but only following sysadmin-specified configuration. A program that expects to be able to mount something into an arbitrary non-standard location without allowing the sysadmin to modify that choice would be open to ridicule as a stupid design.



Only root can mount filesystems to any mountpoint; all others will need the mount permissions explicitly granted to them by root.



For example, removable media mounting tools included in desktop environments usually place their mount points under a fixed location, normally /media/<media name or serial number> or /media/<username>/<media name or serial>. Some tools might allow users a greater freedom to mount some things at any location that is writeable to them; in that case, the user will have to be responsible for his/her own choices.



If you're configuring an actual automounter (an autofs/automount service or a systemd automount unit), then the configuration will also always specify not only what the automounter can mount, but also where each automounted filesystem is supposed to be mounted. The configuration for a traditional automounter can normally be found in /etc/auto.* files.



If you grant mount permission to regular users by using the user or owner options in /etc/fstab, it will only allow the specific mountpoint that the fstab line in question applies to.



At the end, the system administrator is responsible for choosing the mountpoints and making sure they don't conflict with each other. In a nutshell:




  • know the standard mount points listed in the Filesystem Hierarchy Standard

  • check /etc/fstab, /etc/auto.* and systemctl -t automount

  • know your own environment and its customizations, including any tools that can allow non-root users to mount things






share|improve this answer





















  • Is this assuming that every other developer follows the standard?
    – Bagalaw
    Dec 9 at 21:01











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486864%2fhow-to-reserve-a-frequently-used-mount-point%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














You might want to read the Filesystem Hierarchy Standard.



Generally, programs won't mount things on their own initiative, but only following sysadmin-specified configuration. A program that expects to be able to mount something into an arbitrary non-standard location without allowing the sysadmin to modify that choice would be open to ridicule as a stupid design.



Only root can mount filesystems to any mountpoint; all others will need the mount permissions explicitly granted to them by root.



For example, removable media mounting tools included in desktop environments usually place their mount points under a fixed location, normally /media/<media name or serial number> or /media/<username>/<media name or serial>. Some tools might allow users a greater freedom to mount some things at any location that is writeable to them; in that case, the user will have to be responsible for his/her own choices.



If you're configuring an actual automounter (an autofs/automount service or a systemd automount unit), then the configuration will also always specify not only what the automounter can mount, but also where each automounted filesystem is supposed to be mounted. The configuration for a traditional automounter can normally be found in /etc/auto.* files.



If you grant mount permission to regular users by using the user or owner options in /etc/fstab, it will only allow the specific mountpoint that the fstab line in question applies to.



At the end, the system administrator is responsible for choosing the mountpoints and making sure they don't conflict with each other. In a nutshell:




  • know the standard mount points listed in the Filesystem Hierarchy Standard

  • check /etc/fstab, /etc/auto.* and systemctl -t automount

  • know your own environment and its customizations, including any tools that can allow non-root users to mount things






share|improve this answer





















  • Is this assuming that every other developer follows the standard?
    – Bagalaw
    Dec 9 at 21:01
















4














You might want to read the Filesystem Hierarchy Standard.



Generally, programs won't mount things on their own initiative, but only following sysadmin-specified configuration. A program that expects to be able to mount something into an arbitrary non-standard location without allowing the sysadmin to modify that choice would be open to ridicule as a stupid design.



Only root can mount filesystems to any mountpoint; all others will need the mount permissions explicitly granted to them by root.



For example, removable media mounting tools included in desktop environments usually place their mount points under a fixed location, normally /media/<media name or serial number> or /media/<username>/<media name or serial>. Some tools might allow users a greater freedom to mount some things at any location that is writeable to them; in that case, the user will have to be responsible for his/her own choices.



If you're configuring an actual automounter (an autofs/automount service or a systemd automount unit), then the configuration will also always specify not only what the automounter can mount, but also where each automounted filesystem is supposed to be mounted. The configuration for a traditional automounter can normally be found in /etc/auto.* files.



If you grant mount permission to regular users by using the user or owner options in /etc/fstab, it will only allow the specific mountpoint that the fstab line in question applies to.



At the end, the system administrator is responsible for choosing the mountpoints and making sure they don't conflict with each other. In a nutshell:




  • know the standard mount points listed in the Filesystem Hierarchy Standard

  • check /etc/fstab, /etc/auto.* and systemctl -t automount

  • know your own environment and its customizations, including any tools that can allow non-root users to mount things






share|improve this answer





















  • Is this assuming that every other developer follows the standard?
    – Bagalaw
    Dec 9 at 21:01














4












4








4






You might want to read the Filesystem Hierarchy Standard.



Generally, programs won't mount things on their own initiative, but only following sysadmin-specified configuration. A program that expects to be able to mount something into an arbitrary non-standard location without allowing the sysadmin to modify that choice would be open to ridicule as a stupid design.



Only root can mount filesystems to any mountpoint; all others will need the mount permissions explicitly granted to them by root.



For example, removable media mounting tools included in desktop environments usually place their mount points under a fixed location, normally /media/<media name or serial number> or /media/<username>/<media name or serial>. Some tools might allow users a greater freedom to mount some things at any location that is writeable to them; in that case, the user will have to be responsible for his/her own choices.



If you're configuring an actual automounter (an autofs/automount service or a systemd automount unit), then the configuration will also always specify not only what the automounter can mount, but also where each automounted filesystem is supposed to be mounted. The configuration for a traditional automounter can normally be found in /etc/auto.* files.



If you grant mount permission to regular users by using the user or owner options in /etc/fstab, it will only allow the specific mountpoint that the fstab line in question applies to.



At the end, the system administrator is responsible for choosing the mountpoints and making sure they don't conflict with each other. In a nutshell:




  • know the standard mount points listed in the Filesystem Hierarchy Standard

  • check /etc/fstab, /etc/auto.* and systemctl -t automount

  • know your own environment and its customizations, including any tools that can allow non-root users to mount things






share|improve this answer












You might want to read the Filesystem Hierarchy Standard.



Generally, programs won't mount things on their own initiative, but only following sysadmin-specified configuration. A program that expects to be able to mount something into an arbitrary non-standard location without allowing the sysadmin to modify that choice would be open to ridicule as a stupid design.



Only root can mount filesystems to any mountpoint; all others will need the mount permissions explicitly granted to them by root.



For example, removable media mounting tools included in desktop environments usually place their mount points under a fixed location, normally /media/<media name or serial number> or /media/<username>/<media name or serial>. Some tools might allow users a greater freedom to mount some things at any location that is writeable to them; in that case, the user will have to be responsible for his/her own choices.



If you're configuring an actual automounter (an autofs/automount service or a systemd automount unit), then the configuration will also always specify not only what the automounter can mount, but also where each automounted filesystem is supposed to be mounted. The configuration for a traditional automounter can normally be found in /etc/auto.* files.



If you grant mount permission to regular users by using the user or owner options in /etc/fstab, it will only allow the specific mountpoint that the fstab line in question applies to.



At the end, the system administrator is responsible for choosing the mountpoints and making sure they don't conflict with each other. In a nutshell:




  • know the standard mount points listed in the Filesystem Hierarchy Standard

  • check /etc/fstab, /etc/auto.* and systemctl -t automount

  • know your own environment and its customizations, including any tools that can allow non-root users to mount things







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 9 at 5:24









telcoM

15.6k12143




15.6k12143












  • Is this assuming that every other developer follows the standard?
    – Bagalaw
    Dec 9 at 21:01


















  • Is this assuming that every other developer follows the standard?
    – Bagalaw
    Dec 9 at 21:01
















Is this assuming that every other developer follows the standard?
– Bagalaw
Dec 9 at 21:01




Is this assuming that every other developer follows the standard?
– Bagalaw
Dec 9 at 21:01


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486864%2fhow-to-reserve-a-frequently-used-mount-point%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre