Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Data drive mounts every boot when I do not want it to mount

  1. #1
    Join Date
    Jun 2010
    Beans
    378

    Data drive mounts every boot when I do not want it to mount

    I have a large computer with many HDDs. One is the Ubuntu drive, and the others are data drives I do NOT want mounted unless I specifically mount [need] them. However, one always is now mounted - yet is not listed in fstab. I can't figure out how to stop it from automounting. It seems to be seen as a removable drive as the option to 'eject' it is also listed. It is a 2TB HDD, not a thumbdrive. Help would be appreciated. Thanks. The collateral question would be how do I chown a drive so that this doesn't happen again? I thought I did chown the same way as with other similar data drives [which do not mount automatically], but obviously not..... I fairly often format and then chown a new data drive and now I'm not sure how/what options or switches are best for me. If I wanted to have something mount on boot, I'd put it in fstab. the /mnt folder and what that does is a mystery to me. I looked at it and only got confused - it didn't seem to provide any answer to my problem.
    Last edited by crazybear; 6 Days Ago at 06:38 PM.

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,533
    Distro
    Xubuntu 18.10 Cosmic Cuttlefish

    Re: Data drive mounts every boot when I do not want it to mount

    If the file manager shows the option to eject the drive, it was mounted through the file manager. The file manager shows this option for all filesystems it has mounted, internal or external doesn't matter (and there are also 2TB removable HDDs). It normally does so in /media/username/.

    chowning a drive doesn't make sense. You can chown the mountpoint, provided the filesystem supports Unix-style permissions, which has the desired effect. If the filesystem doesn't support Unix-style permissions, you can only change ownership by using the right mount options. Anyway, chown has nothing to do with automounting.

    If you put a filesystem in your /etc/fstab with the noauto option, it won't be mounted automatically at boot and the file manager should no longer offer to mount it. The root user can still mount it, and if you add the user option all users can do so.

  3. #3
    Join Date
    Jun 2010
    Beans
    378

    Re: Data drive mounts every boot when I do not want it to mount

    There are NO other users. For security reasons only I use this computer ever. All Data Drives are ext4 with no OS. What confuses me are all the different ways to get the 'name/designation' of a disk/partition - from the name I have given it, to the drive letter to the UUID and which to use when. I also thought I had done the same as with other data drives, yet got a totally different result. All Data drives also have only ONE partition.
    I tried a few things but nothing changed. I'll try to add this 'negative' entry in fstab, but none of the other data drives have this and they do not mount. Additional question: does a disk spin up even if not mounted - or only when mounted? If ejected? The reason I don't mount all the data drives is [hopefully] to prolong their life - and in fact I don't need to look inside them very often. Can't seem to find that information. Thanks.

  4. #4
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,533
    Distro
    Xubuntu 18.10 Cosmic Cuttlefish

    Re: Data drive mounts every boot when I do not want it to mount

    There are plenty of other users. Maybe not carbon/water based users mechanically interacting with the keyboard, but silicon based users living inside the computer.

    There are basically three ways to refer to a particular partition: device name, label and UUID. Device names (like /dev/sda1) are easy and the classic way, but may change when rebooting a computer with multiple hard drives or when removing/replugging a removable drive. Labels don't change and are easy to memorise, but duplicates are likely. UUIDs are quite robust (although duplicates are not impossible), but hard to memorise. Use the one that's most appropriate for your case.

    Maybe you inadvertently used the file manager of some other gui tool to mount the partition automatically?

    I guess that most hard drives would at least spin up once after booting the computer, so that the OS (and before that the UEFI/BIOS) can read what partitions are present on that drive. When not used, it may spin down, even when mounted, but may require some configuration to do so. You may be able to find more information concerning this if you search for power saving.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    16,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Data drive mounts every boot when I do not want it to mount

    The jury is out as to whether stopping spinning disks is helpful for lifespan or not.
    I'm firmly in the 'have it spin always' camp, to avoid the stop and start jults on the disk hardware. Unsure if this helps you, but I have disks that are over 10 yrs old following this exact method which SMART data says have no issues at all. I go out of my way to change firmware settings in HDDs to prevent sleep modes.

    There are a few other ways to safely access partitions in a unique way. All are under:
    Code:
    /dev/disk$ ls
    by-id/  by-label/  by-partlabel/  by-partuuid/  by-path/  by-uuid/
    Your system will have the same directories. If you look inside, you'll see the symbolic links back to the device names. For systems with lots of disks and multiple HBAs, the by-path/ method is excellent. The names only change when a physical is moved.

    BTW, the more disks you have, the more a volume manager like LVM or ZFS makes sense. Just be certain you have excellent backups regardless. If the data is worth putting on a $200 HDD, it is worth having backed up, right?

  6. #6
    Join Date
    Jun 2010
    Beans
    378

    Re: Data drive mounts every boot when I do not want it to mount

    Quote Originally Posted by TheFu View Post
    The jury is out as to whether stopping spinning disks is helpful for lifespan or not.
    I'm firmly in the 'have it spin always' camp, to avoid the stop and start jults on the disk hardware. Unsure if this helps you, but I have disks that are over 10 yrs old following this exact method which SMART data says have no issues at all. I go out of my way to change firmware settings in HDDs to prevent sleep modes.

    There are a few other ways to safely access partitions in a unique way. All are under:
    Code:
    /dev/disk$ ls
    by-id/  by-label/  by-partlabel/  by-partuuid/  by-path/  by-uuid/
    Your system will have the same directories. If you look inside, you'll see the symbolic links back to the device names. For systems with lots of disks and multiple HBAs, the by-path/ method is excellent. The names only change when a physical is moved.

    BTW, the more disks you have, the more a volume manager like LVM or ZFS makes sense. Just be certain you have excellent backups regardless. If the data is worth putting on a $200 HDD, it is worth having backed up, right?
    Thanks for the thoughts on drive life. I guess the spindle motor these days is rarely the problem, but head crash or something with the arms etc. I buy top-notch and top dollar drives and have lately not had any problems....but just in case, yes, they are backed up. My computer is entirely hot swap and I do change drives around so what is which drive letter changes endlessly...so will never use that method. I have some Ubuntu Gnome manager for drives, but I'll look into the ones you suggested.

  7. #7
    Join Date
    Jun 2010
    Beans
    378

    Re: Data drive mounts every boot when I do not want it to mount

    Quote Originally Posted by Impavidus View Post
    If the file manager shows the option to eject the drive, it was mounted through the file manager. The file manager shows this option for all filesystems it has mounted, internal or external doesn't matter (and there are also 2TB removable HDDs). It normally does so in /media/username/.

    chowning a drive doesn't make sense. You can chown the mountpoint, provided the filesystem supports Unix-style permissions, which has the desired effect. If the filesystem doesn't support Unix-style permissions, you can only change ownership by using the right mount options. Anyway, chown has nothing to do with automounting.

    If you put a filesystem in your /etc/fstab with the noauto option, it won't be mounted automatically at boot and the file manager should no longer offer to mount it. The root user can still mount it, and if you add the user option all users can do so.
    OK, so I found the UUID of the drive and put it into the fstab. I put noauto, but it still mounts and still shows eject as an option. What is wrong - more likely what am I doing or not doing. Need I remove some entry from /mnt and how does one do that? Stranger still, I can open it, BUT NOW I CAN NOT UNMOUNT IT! Was assigning it a mount point the problem? I'm confused.....as often. I've never listed any drives in fstab other than my Ubuntu OS drive and the swap space on that same drive. All other drives are data drives...and maybe I don't know what to put in each of the columns or if to leave them blank...or....
    Last edited by crazybear; 4 Days Ago at 06:29 PM.

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    16,304
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Data drive mounts every boot when I do not want it to mount

    Linux doesn't have drive letters. No idea what you are describing there.
    There is an option for gvfs to hide partitions from GUIs. I don't use GUIs to mount storage, so I have no idea what it is. The gvfs documentation might have that info. Google found this: https://askubuntu.com/questions/1227...lus-left-panel I've never used it. "gvfs options hide" was the search terms. Obviously, if you don't know about gvfs, you'd never find it. ;(

  9. #9
    Join Date
    Dec 2009
    Beans
    6,190

    Re: Data drive mounts every boot when I do not want it to mount

    If I might make a suggestion. Why not post the output of the following commands so the folks here can work with something definable:

    Code:
    sudo blkid -c /dev/null
    Code:
    cat /etc/fstab
    Code:
    mount

  10. #10
    Join Date
    Jun 2010
    Beans
    378

    Re: Data drive mounts every boot when I do not want it to mount

    $ sudo blkid -c /dev/null
    /dev/loop0: TYPE="squashfs"
    /dev/loop1: TYPE="squashfs"
    /dev/loop2: TYPE="squashfs"
    /dev/loop3: TYPE="squashfs"
    /dev/sda1: LABEL="XXXXX" UUID="5658d31c-d367-4eec-9c41-99d79307e8cC" TYPE="ext4" PTTYPE="dos" PARTUUID="70405148-02"
    /dev/sda2: LABEL="16.04swap" UUID="7da95bc8-ab6d-4d3a-a7eb-510e06b50378" TYPE="swap" PARTUUID="70405148-03"
    /dev/sdb1: LABEL="YYYYY" UUID="e262cf2d-7816-4b40-b24b-72aa05c02d83" TYPE="ext4" PARTUUID="5eb201c3-02"
    /dev/sdc1: LABEL="ZZZZZ" UUID="9b1d11ca-7255-4645-adb9-5c9a915dcbc1" TYPE="ext4" PARTUUID="80269eb9-2c1c-4f1a-86f8-ba7d987bf8fe"
    /dev/sdd1: LABEL="AAAAA" UUID="0d8be9c9-49bb-558e-8633-5a5ebe6deab6" TYPE="ext4" PARTUUID="0c73caa7-4864-4666-ad53-681227926a65"

    $ cat /etc/fstab
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=5658d31c-d367-4eec-9c41-99d79307e8cC / ext4 relatime,rw 0 1
    UUID=7da95bc8-ab6d-4d3a-a7eb-510e06b50378 none swap sw 0 0
    UUID=e262cf2d-7816-4b40-b24b-72aa05c02d83 /media/YYYYY ext4 noauto 0 1

    $ mount
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs (rw,nosuid,relatime,size=12243368k,nr_inodes=30608 42,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode =000)
    tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=2454916k,mode=755)
    /dev/sda1 on / type ext4 (rw,relatime,stripe=32750,data=ordered)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
    tmpfs on /sys/fs/cgroup type tmpfs (rw,mode=755)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_age nt=/lib/systemd/systemd-cgroups-agent,name=systemd)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,releas e_agent=/run/cgmanager/agents/cgm-release-agent.perf_event)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
    cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma,release_agen t=/run/cgmanager/agents/cgm-release-agent.rdma)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,clone_chil dren)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,release_a gent=/run/cgmanager/agents/cgm-release-agent.hugetlb)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,release_agen t=/run/cgmanager/agents/cgm-release-agent.pids)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,max proto=5,direct,pipe_ino=24230)
    mqueue on /dev/mqueue type mqueue (rw,relatime)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
    configfs on /sys/kernel/config type configfs (rw,relatime)
    /var/lib/snapd/snaps/shotcut_45.snap on /snap/shotcut/45 type squashfs (ro,nodev,relatime)
    /var/lib/snapd/snaps/core_6673.snap on /snap/core/6673 type squashfs (ro,nodev,relatime)
    /var/lib/snapd/snaps/shotcut_43.snap on /snap/shotcut/43 type squashfs (ro,nodev,relatime)
    /var/lib/snapd/snaps/core_6818.snap on /snap/core/6818 type squashfs (ro,nodev,relatime)
    /dev/sdb1 on /media/YYYYY type ext4 (rw,relatime,data=ordered)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
    cgmfs on /run/cgmanager/fs type tmpfs (rw,relatime,size=100k,mode=755)
    tmpfs on /run/user/125 type tmpfs (rw,nosuid,nodev,relatime,size=2454916k,mode=700,u id=125,gid=136)
    tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=2454916k,mode=700,u id=1000,gid=1000)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=10 00)
    Last edited by crazybear; 3 Days Ago at 05:55 AM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •