Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

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

  1. #21
    Join Date
    Jun 2010
    Beans
    532

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

    Quote Originally Posted by rbmorse View Post
    I got confused long before TheFu did.

    How do your hotswap bays interface to the motherboard?
    I don't think this is the problem. In fact, I'm sure it is not. They are not new. When I built the computer, I put in the hot swap bays. They simply allow for a drive to be inserted or removed while the computer is on. They have a standard cable to the MB, which has the capability for many drives to be connected. BIOS is set up to be happy with the arrangement and in fact it has been until recently. I have used this set up for many years and never had this problem before. Recently I decided to make my OS drive smaller, and had to move data to a new data drive - and this happened when I chown'd the drive. Was there a switch I needed to add at the end of the chown line that did this? I have no idea how to remove or change lines in the mnt file - there IS an entry for this drive and I did not put it in.

    The fstab manpage seems to indicate I set it up correctly when I did have an entry [now ut]. At the moment there is no entry for the drive. Either way it mounts. Something else is telling it to mount and be mounted in such a way I can not unmount it......

    Very strange and annoying.

  2. #22
    Join Date
    Dec 2009
    Beans
    6,772

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

    Wow.

    Some of these questions have been asked before by others but I'll ask them again.
    Quote Originally Posted by crazybear View Post
    I have no idea how to remove or change lines in the mnt file - there IS an entry for this drive and I did not put it in.
    [1] What is this mnt file you speak of? Are you talking about /etc/fstab?

    [2] If it is not fstab can you tell us the path to and the contents of this mnt file?
    The fstab manpage seems to indicate I set it up correctly when I did have an entry [now ut]. At the moment there is no entry for the drive. Either way it mounts.
    With no entry for this "drive" ( partition ) where does it mount? Is it at /media/your-username/XXX?
    Something else is telling it to mount and be mounted in such a way I can not unmount it......
    [3] OK, um ... I think that's a new symptom or did you mention this before?

    [4] And just to be clear did you install dconf-editor and set the "use default value" to off as I suggested above? Or did you just assume it wouldn't work because ... um ... of my typo where I used the word "external" when I meant to say hot-swapable ?
    Last edited by Morbius1; May 22nd, 2019 at 01:39 PM.

  3. #23
    Join Date
    Jun 2010
    Beans
    532

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

    Quote Originally Posted by Morbius1 View Post
    Wow.

    Some of these questions have been asked before by others but I'll ask them again.

    [1] What is this mnt file you speak of? Are you talking about /etc/fstab?

    [2] If it is not fstab can you tell us the path to and the contents of this mnt file?

    With no entry for this "drive" ( partition ) where does it mount? Is it at /media/your-username/XXX?

    [3] OK, um ... I think that's a new symptom or did you mention this before?

    [4] And just to be clear did you install dconf-editor and set the "use default value" to off as I suggested above? Or did you just assume it wouldn't work because ... um ... of my typo where I used the word "external" when I meant to say hot-swapable ?
    Sorry for the delay...for some reason no email was sent to me to inform me of a new reply. I was just coming here to ask for help again, as I'm not making any progress. The 'mnt' I'm talking about is /mnt folder which I have never knowingly done anything with, but I see there is a folder for the drive giving me a problem, when I try to delete it, I'm told I don't have permission to do so - and I don't know the command language to do so or its effect.

    Whenever the drive is listed in fstab NO MATTER how it is listed [as far as I can tell - noauto or relatime - but I want noauto!], then it mounts and CAN NOT BE UNMOUNTED at all, ever. So, yes that is new and I've tried several variations in fstab. I have also used a program called Storage Device Manager that puts very strange [to me] entries into fstab. Again, I have tried many variations, but none work. I suspect the entry in /mnt is the problem. I do not know how it was created nor how to remove it.

    It mounts at /media/correct-disk-name

    I just looked at the reply in terminal to mount command and it is listed as relatime, but I typed in noauto in fstab?!?!..... My computer has ghosts and obviously various programs are doing different things. Another data drive I rarely use also shows up with the eject option and automatically mounts - even though there is NO entry for it in fstab. However, as annoying as that one is, I can unmount it. I still think it was how I chown(ed) these two was not proper for what I wanted, and that somehow caused entries in /mnt - but how do I remove those entries or correctly (re)chown the drives?

    I can't get a clear idea of what deconf-editor is or if it has another name and is already in my 16.04.3. Why would I want it and what advantage would it be? No, I do not remember adding it but that doesn't mean it is not there under some other name. Please know [since some entries on deconf-editor refer to Unity] I do not use unity and dislike it with a passion. I have a Ubuntu Gnome version of 16.04.3. I finally found it on the internet to download and open in package manager and package manager tells me it is installed but not where nor under what name. Further investigation seems to indicate it is installed but not working as it conflicts with Gnome. I need to know what something is, what it does and if it will conflict with my system before I mess with it or even install it. It is installed, but apparently not working due to some conflicts. Package manager says it can re-install but only if it removes Gnome desktop - my most important program...no way! I did find it in Synaptic and version 3.18.2-1 is installed and the latest version..but how does one invoke it?
    Last edited by crazybear; May 26th, 2019 at 05:17 AM.

  4. #24
    Join Date
    Jun 2007
    Beans
    17,337

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

    If you list the drive in fstab it'll be auto mounted by root so to un-mount you need to do so as root.

    Based on your orig. post it leads to these orig. assumptions
    1. Orig. none of the data drives are in fstab.
    2. One drive out of all of them automounted, the rest don't.

    Are the above true true to the orig. issue? If so then maybe consider , if not ignore below-

    In default Ubuntu/Gnome there are 2 ways a volume would be auto mounted.
    Either at boot thru an fstab entry or at boot/login if the block device is detected as and set 'removable'

    A small section of the kernel code seems to suggests how scsi drives are set, i.e
    /* set scsi removable (RMB) bit per ata bit, or if the
    * AHCI port says it's external (Hotplug-capable, eSATA).
    */
    You can check the removable attribute of any block device in /sys/block/sd*/removable, a value of 0 represents removable=no, 1 represents removable=yes
    Ex. /dev/sdc
    Code:
    cat /sys/block/sdc/removable
    or use udevadm to ck. attributes of your device(s)

    full info, ex. /dev/sdc -
    Code:
    udevadm info -a -n /dev/sdc
    or to ck. just the removable attribute
    Code:
    udevadm info -a -n /dev/sda1 |grep removable
    So compare devices that don't automount vs. the problem one(s)

  5. #25
    Join Date
    Jun 2010
    Beans
    532

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

    Quote Originally Posted by mc4man View Post
    If you list the drive in fstab it'll be auto mounted by root so to un-mount you need to do so as root.

    Based on your orig. post it leads to these orig. assumptions
    1. Orig. none of the data drives are in fstab.
    2. One drive out of all of them automounted, the rest don't.

    Are the above true true to the orig. issue? If so then maybe consider , if not ignore below-

    In default Ubuntu/Gnome there are 2 ways a volume would be auto mounted.
    Either at boot thru an fstab entry or at boot/login if the block device is detected as and set 'removable'

    A small section of the kernel code seems to suggests how scsi drives are set, i.e


    You can check the removable attribute of any block device in /sys/block/sd*/removable, a value of 0 represents removable=no, 1 represents removable=yes
    Ex. /dev/sdc
    Code:
    cat /sys/block/sdc/removable
    or use udevadm to ck. attributes of your device(s)

    full info, ex. /dev/sdc -
    Code:
    udevadm info -a -n /dev/sdc
    or to ck. just the removable attribute
    Code:
    udevadm info -a -n /dev/sda1 |grep removable
    So compare devices that don't automount vs. the problem one(s)
    Yes, originally no data drives were in fstab and there were no problems. Now two are a problem and the present slightly differently as problems. One can be unmounted, the other I can not find any way to unmount!

    Those commands you gave a fine, but what do I do to correct the drives listed incorrectly? Why did my earlier [and still used] data drives not misbehave and the two latest not behave...one really being crazy in that it can never be unmounted - even though and option to unmount and eject shows...but does not effect those events?!?!?

  6. #26
    Join Date
    Jun 2007
    Beans
    17,337

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

    Quote Originally Posted by crazybear View Post
    Yes, originally no data drives were in fstab and there were no problems. Now two are a problem and the present slightly differently as problems. One can be unmounted, the other I can not find any way to unmount!

    Those commands you gave a fine, but what do I do to correct the drives listed incorrectly? Why did my earlier [and still used] data drives not misbehave and the two latest not behave...one really being crazy in that it can never be unmounted - even though and option to unmount and eject shows...but does not effect those events?!?!?
    The whole point of above commands was to see if 'good' drives have attribute removable 0 and the 'bad' drives removable 1. If so then see if there is a way to alter that attribute, maybe thru a udev rule??
    "a(re) fine" means nothing to me...

  7. #27
    Join Date
    Jun 2010
    Beans
    532

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

    $ udevadm info -a -n /dev/sda1 |grep removable
    ATTRS{removable}=="0"
    $ udevadm info -a -n /dev/sdb1 |grep removable
    ATTRS{removable}=="0"
    $ udevadm info -a -n /dev/sdc1 |grep removable
    ATTRS{removable}=="1"
    $ udevadm info -a -n /dev/sdd1 |grep removable
    ATTRS{removable}=="0"
    $ udevadm info -a -n /dev/sde1 |grep removable
    ATTRS{removable}=="0"
    sda = OK data drive [no problems, not listed in fstab ever nor in /mnt]
    sdb = OS drive and swap file [sdb2]
    sdc = Data drive that gets mounted, though not listed in fstab, but can be unmounted
    sdd = Data drive that doesn't get mounted, but can be and can also be unmounted
    sde = Data drive that can not be unmounted

  8. #28
    Join Date
    Jun 2007
    Beans
    17,337

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

    Well /dev/sdc shows the removable attribute 1 (true) so that's why it's automounted and why it gets the eject option.
    How to change this, i.e edit the attributes of a block device?, not sure. (I suspect the initial info comes from the kernel, then udisks2 (udev) acts on it.

    A quick search didn't show anything short of recompiling the kernel but did see this page on the archlinux wiki. There is a section near bottom on the page concerning the opposite of your issue. Maybe try the solution but use the opposite values. Shouldn't cause any harm to try.
    https://wiki.archlinux.org/index.php/Udev

    Example in screen 2 of the created rule using the short id and opposite values as in the wiki.. Create file, reboot, see..
    Attached Images Attached Images

  9. #29
    Join Date
    Jun 2010
    Beans
    532

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

    Quote Originally Posted by mc4man View Post
    Well /dev/sdc shows the removable attribute 1 (true) so that's why it's automounted and why it gets the eject option.
    How to change this, i.e edit the attributes of a block device?, not sure. (I suspect the initial info comes from the kernel, then udisks2 (udev) acts on it.

    A quick search didn't show anything short of recompiling the kernel but did see this page on the archlinux wiki. There is a section near bottom on the page concerning the opposite of your issue. Maybe try the solution but use the opposite values. Shouldn't cause any harm to try.
    https://wiki.archlinux.org/index.php/Udev

    Example in screen 2 of the created rule using the short id and opposite values as in the wiki.. Create file, reboot, see..
    Thanks, but sorry, my /etc/udev/rules.d contains NOTHING related to disks [only other things like printers, etc.]!....... and I don't see where creating one would not just make things more complex. Obviously something else somewhere is telling [against my will and planning] which drives to mount and which not to. Even my disk mount program when 'set correctly' doesn't do the thing I set them to do [the disks]. There are also many lines of caution to not use udev or udisk for drives....which are not very clear - but enough to make me stay away from this. Your suggestion ignores the most problematic disk sde which has attribute 0.
    Last edited by crazybear; June 4th, 2019 at 06:03 PM.

  10. #30
    Join Date
    Jun 2007
    Beans
    17,337

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

    Quote Originally Posted by crazybear View Post
    Thanks, but sorry, my /etc/udev/rules.d contains NOTHING related to disks [only other things like printers, etc.]!....... and I don't see where creating one would not just make things more complex. Obviously something else somewhere is telling [against my will and planning] which drives to mount and which not to. Even my disk mount program when 'set correctly' doesn't do the thing I set them to do [the disks]. There are also many lines of caution to not use udev or udisk for drives....which are not very clear - but enough to make me stay away from this. Your suggestion ignores the most problematic disk sde which has attribute 0.
    I never suggested using udev to mount a drive, only to change one of it's attributes (dev/sdc
    As far as /dev/sde, that was not part of your orig. issue so you caused it's current behavior. It's likely mounted by root, that's why you can't unmount it. Why? maybe an fstab entry or something else you did, at this point don't know.
    Good luck..
    Last edited by QIII; June 6th, 2019 at 01:18 AM. Reason: Edited unintended unfriendly tone.

Page 3 of 4 FirstFirst 1234 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
  •