Where should I mount my internal drive partitions?

As far as I searched on the internet, I came to know that

/Media = mount point for removable media that system do it itself ( usb drive , CD )

/Mnt = temporarily mounting anything manually

I can most probably mount anything wherever I want, but if that’s the case what’s the point of /mnt? Just to be organised I suppose.

TLDR

If /mnt is for temporary and /media is for removable where should permanent non-removable devices/partitions be mounted. i.e. an internal HDD which is formatted as NTFS but needs to be automounted at startup?

Asking with the sole reason to know that, what’s the practice of user who know Linux well, unlike me.

I know this is a silly question but I asked anyway.

  • MrSoup@lemmy.zip
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    4 days ago

    The Linux FHS does not address this, so it’s up to you where to mount it. There is no correct choice, but if you want to follow standards just mount it inside /mnt which is the nearest use-case (/media could be automatically used by your DE, so avoid it). Otherwise you can just create a custom folder in root like someone else suggested.

    Take a look at FHS spec.

    Edit:
    On arch forum someone suggests /mnt/data

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      4 days ago

      Thank You.

      Otherwise you can just create a custom folder in root like someone else suggested

      My Files, which are inside the partition mounted in /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do, Only perma delete. When saw properties it said owner is root.

      Is it because mounted at /mnt?

      Files under /media seems fine. files under /media says it’s owner is ‘me’

      • MrSoup@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        3 days ago

        /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do

        You have to change permissions or owner of that folder (not /mnt itself but the subfolder “something”).
        If I’m not wrong changing permissions is enough to use gui “move to trash”, you can use chmod thru cli (man chmod) o your gui file manager with root privileges.

        If you want only your user be able to read/write to that disk, then change the owner using chown thru cli (man chown) or again your gui file manager.

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          So, if I use chmod, I get the access and other users (if any) are free to do so.

          In case of chown, I get the full access and others can’t gain access unless I permit.

          Right?

          • MrSoup@lemmy.zip
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            3 days ago

            On Linux files and folders have permissions info for owner, group and everyone else. So you can set individual permissions for these.

            By setting the owner to root, if you want to make your user able to read/write that folder, you must either give permissions to everyone to read/write OR assign a group to the folder, give the group permissions to read/write and add your user to that group.

            If you instead set your user as the owner of the folder, you can make only your user able to read/write without other fuss.

            If you are a newbie, stick to gui file manager. Can you please tell me what file manager are you using? Most of the time you can change permissions thru right click > propriety > permissions.

            • gpstarman@lemmy.todayOP
              link
              fedilink
              arrow-up
              2
              ·
              3 days ago

              If you instead set your user as the owner of the folder, you can make only your user able to read/write without other fuss.

              Thanks for the tip.

              Can you please tell me what file manager are you using?

              I’m using Nemo. As it’s the default one on Mint Cinnamon.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      Even if I switch my drives or folder names

      You don’t mean changing name of ‘Videos’ right?

      entire drive is mounted to /media first, and then all subdirectories are mounted where I need them.

      So you mount directories accordind to your need not drives and partitions? Seems flexible.

      then your cannot boot into your system anymore.

      Why? Are you talking about removing the drive that contains /?

      • thingsiplay@beehaw.org
        link
        fedilink
        arrow-up
        2
        ·
        4 days ago

        Oh, I deleted my reply a while ago. But you seem to be able to see it still.

        The Videos name change is meant, if I mount the folder on my drive to /home/name/Videos, then next time I mount anything to that place when replacing the drive, then /home/name/Videos will stay the same. That means any application using that path won’t change. That’s the majority how I use my multiple internal drives. I just mount them to fixed positions I use for decades, like in my home.

        I prefer directories over partitions, because I can easily rename directories and place them to other places without ever partitioning or resizing again.

        Why? Are you talking about removing the drive that contains /?

        About the not being able to boot, no I don’t mean the drive that contains the root /. When I mount drives with the /etc/fstab file, then the system tries to mount them on boot time. If the directory that is mounted or the drive is no longer available or I unplug it (lets say when I replace my Documents drive), then at boot time the system tries to mount something that does no longer exist in their view, according to the fstab file.

        By default (at least on my current system EndevaourOS, based on Arch) the system stops booting. It gives me the option to ignore that mount entry, so I can boot again. But if I had not this option to ignore, then one has to edit the /etc/fstab file to outcomment those sections; in example with a boot cd or usb drive. Normally not a problem, but just telling it here, so in case you know what to do (if you ever go that route).

        • NaN@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          4 days ago

          Adding the nofail option to the fstab entry will continue boot if the drive isn’t present.

          • thingsiplay@beehaw.org
            link
            fedilink
            arrow-up
            3
            ·
            4 days ago

            That’s great! I didn’t know this (obviously). I will read into this option more, before making changes. It’s not something I need much often (really only happened a few times in a decade). But its good to know!

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          3
          ·
          4 days ago

          Thank You.

          for some reason Photon UI still shows the deleted comment with just trash can symbol.

              • thingsiplay@beehaw.org
                link
                fedilink
                arrow-up
                2
                ·
                3 days ago

                Caching should be quicker and less dependent on all sources. Can’t say if that is the actual reason here, but those are typical reasons to cache or copy stuff. That also means it is still operational (to a degree) if the other servers are down or slow. Realtime operation makes sense if everything is from one source and is under 100% control. At least in my opinion.

                • gpstarman@lemmy.todayOP
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  3 days ago

                  There are also problems like the above case.

                  Also let’s say some instance have i//egal content on it, it would take only one user from your instance to see that content, and now you are hosting the i/lega/ content.

  • mrvictory1@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    4 days ago

    /mnt is for anything and everything. /media doesn’t even exist on Arch based distros and maybe others.

    • bizdelnick@lemmy.ml
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      3 days ago

      /mnt is not for everything, it is a temporary mount point. For fixed drives that are constantly mounted you should use another location (that could be anywhere in the filesystem tree).

      • gpstarman@lemmy.todayOP
        link
        fedilink
        arrow-up
        2
        ·
        3 days ago

        /mnt is not for everything, it is a temporary mount point.

        Even if I mount fixed drives on /mnt, there won’t be any problems, right ?

        • bizdelnick@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          Technically, no. Until you want to mount something but find /mnt is busy or simply forget about this and mount something there, losing access to previously mounted stuff. The only problem is that you have to remember which mountpoint you use for particular filesystem, while the FHS is designed to avoid this and abstract from physical devices as much as possible.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      My Files, which are inside the partition mounted in /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do, Only perma delete. When saw properties it said owner is root.

      Is it because mounted at /mnt?

      Files under /media seems fine. and says it’s owner is ‘me’

      IDK if I’m doing anything wrong.

  • Heavybell@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    3 days ago

    IMO you should use LVM2 or one of the high level filesystems that have similar features, and then dynamically create partitions and mount them as needed. E.g. Suddenly need 50G for a new VM image? Make a partition and mount it where you need the space.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      If I’m not wrong LVM is a method which joins all your disk into single storage pool.

      Let’s say I stored data all across my LVM, now I remove one of the disks. What happen now?

      • Heavybell@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 days ago

        You are correct, LVM combines 1 or more disks into 1 or more storage pools that can then be allocated out to logical volumes as needed.

        If you just up and pull a disk from a pool (volume group), you’re gonna have a bad time. You can, however, migrate the “extents” allocated to that physical disk to another in order to replace the disk, and your logical volumes can be set up with RAID-like redundancy. There’s a lot of options on how to manage it.

  • Pika@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    3 days ago

    Actually since their permanent non-removable drives, I would say wherever you want to place them, if they’re meant primarily for storing user-based data you can do like what I used to do which was store them in within the home directory just as specific names. Like my old setup before I went proxmox was /backups was my backup drive, /home was my home drive that stored most of my users /home/steam held all my game server drive and /home/storage held my long term cold storage drive.

  • sgtnasty@lemmy.ml
    link
    fedilink
    arrow-up
    1
    arrow-down
    8
    ·
    4 days ago

    that is what the /srv mount point is for. I mount all my external HDDs from there.

  • GnuLinuxDude@lemmy.ml
    link
    fedilink
    arrow-up
    17
    arrow-down
    1
    ·
    4 days ago

    It ultimately doesn’t actually matter because in many cases these things are convention and there is no real system-based effect. So while it would be especially weird if your distro installed packages into those directories, it ultimately doesn’t matter. Someone already linked the filesystem hirearchy. See how tiny the /media and /mnt sections are?

    I put my fixed disks into subdirectories under /mnt and I mount my NAS shares (I keep it offline most of the time) in subdirectories in /media.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      4 days ago

      fixed disks under /mnt

      NAS in /media

      Why ? that’s what I’m asking. Can’t you just put in the same folder and call it a day?

      I put my fixed disk in /mnt

      My Files, which are inside the partition mounted in /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do, Only perma delete. When saw properties it said owner is root.

      Is it because mounted at /mnt?

      Files under /media seems fine. files under /media says it’s owner is ‘me’

      • GnuLinuxDude@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        3 days ago

        The answer to your question why is because I arbitrarily decided on that years ago. That’s basically all there is to it.

        The answer to your file ownership problems I can’t answer, because I don’t have that happening. My files are mounted like so:

        LABEL=BigHD /mnt/BigHD btrfs nosuid,nodev,nofail,noatime,x-gvfs-show,compress-force=zstd:1 0 0

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          3
          ·
          3 days ago

          The answer to your question why is because I arbitrarily decided on that years ago. That’s basically all there is to it.

          Thanks for clarifying bro

      • ReversalHatchery@beehaw.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        Mounting to a specific location should not affect the permissions of the drive. But in the case of NTFS and some other filesystems, Linux is not compatible with their permission model, so it is simplified by e.g. making all files be only accessible by root.
        You can override this default with mount options, or change the permissions to sensible values with chmod and chown, but I’m not sure if changing them will have negative side effects on the windows side so the latter may not be a good idea.

      • rand_alpha19@moist.catsweat.com
        link
        fedilink
        arrow-up
        3
        ·
        4 days ago

        If you try to mount 2 drives to the same location, like /media/drive, the last one that you mounted will just replace the first one. You could put one at /media/drive1 and the other at /media/drive2 though.

        It doesn’t matter where you mount stuff, like it won’t break anything, as long as you’re not replacing an existing directory like I mentioned.

          • rand_alpha19@moist.catsweat.com
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            4 days ago

            I also just saw your edit. Look into Linux ownership and permissions. chmod and chown are important commands to know how to use as a Linux system administrator.

            Running sudo chown -R user:user ./drive in /mnt will give your user account ownership of that directory and all folders inside of it.

            Make sure you replace user with your username and drive with the name of the mount point for the drive.

            • gpstarman@lemmy.todayOP
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              4 days ago

              sudo chown -R user:user ./*

              Not afraid of terminal or anything, but can’t I do it in GUI?

              EDIT: I think I can do it by going to file properties on an elevated file manager.

              • rand_alpha19@moist.catsweat.com
                link
                fedilink
                arrow-up
                4
                ·
                4 days ago

                Hm, you probably can, but I personally don’t and I’m not sure which file manager you’re using. I like the terminal for this because it’s quicker and easier to do (or undo if you fuck up).

                I also gave you the wrong command earlier, sudo chown -R user:user ./* doesn’t affect the top-level folder (e.g., /mnt/drive). My mistake.

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    2
    arrow-down
    5
    ·
    3 days ago

    Mount them where you need. Not /mnt and not /media. Maybe /var or its subdirectory, or /srv, or /opt depending on what kind of data you want to store on that partition.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      5
      ·
      3 days ago

      Not /mnt and not /media

      Why though?

      what kind of data

      Just media files, downloads, images , music kinda stuff.

      • bizdelnick@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        3 days ago

        Why though?

        The filesystem is organized to store data by its type, not by the physical storage. In DOS/Windows you stick to separate “disks”, but not in Unix-like OSes. This approach is inconvenient in case of removable media, that’s why /media exists. And /mnt is not suited for any particular purpose, just for the case when you need to manually mount some filesystem to perform occasional actions, that normally never happens.

        Just media files, downloads, images , music kinda stuff.

        That’s what usually goes to /home/<username>. Maybe mount that device directly to /home? Or, if you want to extend your existent /home partition, use LVM or btrfs to join partitions from various drives. Or mount the partition to some subdirectory of /home/<username>, or even split it and mount its parts to /home/<username>/Downloads, /home/<username>/Movies etc. So you keep the logic of filesystem layout and don’t need to remember where you saved some file (in /home/<username>/Downloads or in /whatever-mountpoint-you-use/downloads).

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          1
          ·
          3 days ago

          mount the partition to some subdirectory of /home/<username>, or even split it and mount its parts to /home/<username>/Downloads, /home/<username>/Movies etc

          Thanks bro. I think that’s what I’m gonna do.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    2 days ago

    Permanent drives should be put wherever you want them to, for example I have mine mounted in /ld1 for Large Disk 1. /media is supposed to be used by systems to mount things you plug, but some systems move that to /var/run/media or other places. /mnt is there so you don’t have to create a folder in case you want to mount something really quick.

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    3 days ago

    Idk, I mount my disks in /mnt/whatever, though I don’t think it matters where you mount them.

  • walden@sub.wetshaving.social
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    4 days ago

    I used to mount network attached storage in /mnt until I had problems accessing it from a Snap. In searching for a solution it was pointed out that snaps are correct in being sandboxed from these types of folders, and users like myself are making things difficult for ourselves by using those system folders.

    They said the best practice would be to mount them in a folder in your home directory. I’ve switched to doing that and it works great.

  • bloodfart@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    4 days ago

    Unless dictated by the particular data in the disks, /mnt is generally used for system managed volumes and /media is used for user managed volumes.

    If you do something else, stick with it so you don’t get confused.