[solved] mountpoint chenged automatically, problem with files.....

Forum rules
Before you post please read this
Post Reply
kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

[solved] mountpoint chenged automatically, problem with files.....

Post by kalimerox » Tue Jul 31, 2018 4:26 pm

Hi there,

a strange thing happened: The mountpoint of a second data disk on my thinkpad x220 just changed "itself" from /store here to /store here1. So i can mount the disk and read the files. but allt the links are broken (mostly DAW and NLE sessions I m storing on that device doesnt find their files anymore )


is there any way to reverse this? what could be the cause of that sudden change?

thanks in advance!!
Last edited by kalimerox on Wed Aug 01, 2018 6:19 pm, edited 1 time in total.

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: mountpoint chenged automatically, problem with files.....

Post by gm10 » Tue Jul 31, 2018 4:35 pm

Depends on how you mount it. If you defined the disk in /etc/fstab then check the mount point defined there. Otherwise check whatever code you are using to mount this (it's not a system default mount point so must have customized this).

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Tue Jul 31, 2018 4:59 pm

thanks for your answer, this is a very good question ;( as i dont recall exactly,

i have a dual boot system with manjaro ,

in the linux mint fstab there is only this

# / was on /dev/sdb2 during installation
UUID=31de3437-9243-48ce-861b-bf3b50d5a05d / ext4 errors=remount-ro 0 1




sorry for the mess.. I ll boot into manjaro now and hope i ll see something there...

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: mountpoint chenged automatically, problem with files.....

Post by gm10 » Tue Jul 31, 2018 5:30 pm

how you mount it in Manjaro doesn't affect how it's mounted in Mint. If it's not in your fstab you must be running some script that mounts it or some auto-mounter software (the latter could explain the changing mount point I guess). I don't know anything that auto-mounts to /store by default though, so can't help you further. The logs (syslog, journalctl) might give you some info on how/when it's getting mounted.

User avatar
slipstick
Level 5
Level 5
Posts: 773
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: mountpoint chenged automatically, problem with files.....

Post by slipstick » Tue Jul 31, 2018 6:10 pm

kalimerox wrote:
Tue Jul 31, 2018 4:26 pm
The mountpoint of a second data disk on my thinkpad x220 just changed "itself" from /store here to /store here1. So i can mount the disk and read the files. but allt the links are broken
This reminds me of a problem I had some time ago with my external HDD. It's been quite a while, so my memory of this is rather vague, but as I remember it, I had my external HDD with a partition on it mounted to /media/steve/some_directory. I think I did something I shouldn't have, like maybe unplugging the drive without clicking on "safely remove drive" first (don't remember exactly what I did). Anyway, the contents of my mounted partition had disappeared. Opening a terminal, I could see that I now had two directories at /media/steve - "some_directory" and "some_directory1" with the files which had been in "some_directory" now in "some_directory1" (that is, the partition was now mounted to "some_directory1"). As I recall, from the terminal I deleted "some_directory" and renamed "some_directory1" to "some_directory" to fix the problem.

My guess is that when I plugged the HDD back in, the system renamed the original mountpoint to "some_directory1" and created a new empty directory as a mountpoint with the original name "some_directory".
In theory, theory and practice are the same. In practice, they ain't.

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 1:19 pm

@ slipstick yeah this sounds like a simila scenario!

actually i dont know really how i could reverse this process.

I might have had turned on the automount in the Disks program and unchecked that now..

but i m not aware of any other script i would be using here for mounting. my linux mint installation was pretty mint (in the sense of untouched ;) ;))

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: mountpoint chenged automatically, problem with files.....

Post by gm10 » Wed Aug 01, 2018 1:21 pm

Well, you can always umount it manually, mount it again to the correct location and hope it sticks I guess. Ideally you define a permanent mount in your /etc/fstab.

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 1:36 pm

this would be ideal. sorry to be a newby on this, how would i mount via commandline the disk to a mountpoint called /media/store here ?


I have a nother weird observation: when i start gparted , the already mounted drives change their name in thunar, like

/mnt/537a1ff2-d3b2-4151-beea-78812e5e13c2/

which was before a clear name. when i turn off gparted, they switch back to a clear name.. something seems to be wrong here...

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 1:59 pm

so as i found out now mounting always to the same mountpoints is crucial for me, how would i get that the best way? is there a way to conceive an updated fstab with uuid s of the disks so they mount always to the same points?

I have an internal ssd with the system and internal hdd with data that would be good to always mount to the same mountpoint, but also for usb drives this would be great..

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: mountpoint chenged automatically, problem with files.....

Post by gm10 » Wed Aug 01, 2018 2:26 pm

So now the mount point is /media/store here instead of /store here? That does point rather strongly to the normal auto-mounter. You need to be exact in what you tell us. ;)

Here's what you do:
  1. First make sure that your target folder exists and is empty:

    Code: Select all

    ls -la /media/store\ here
  2. If it does exist but isn't empty, stop here and figure out what's in there first and why it's there.
  3. If it doesn't exist, we create it:

    Code: Select all

    sudo mkdir -p /media/store\ here
  4. Open the Disks tool from the menu.
  5. Left click the partition that's currently mounted in the wrong spot and that you want to appear at /media/store here
  6. Click on the cogs icon below, select "Edit Mount Options" from the list.
  7. Now:
    • Uncheck "Use Session Defaults" at the top,
    • check "Mount at system startup",
    • uncheck everything else,
    • write /media/store here into the Mount Point field,
    • make sure the field above reads defaults and nothing else, and
    • in Identify As select the option that begins with UUID
  8. Click ok, authenticate and then reboot.

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 5:39 pm

thank you so much for your help!!

I followed your steps,

i had a /media/username/store\ here

folder (but i read somewhere else this wouldnt be a good thing to have anyways? )

but not a /media/store\ here

so i created it.
Uncheck "Use Session Defaults" at the top,
this was not in the disks menu, maybe the program has changed...


I did all the other steps and rebooted..


now the harddrive doesnt show up at all when i open up thunar and i cant mount it.

maybe i need to change as well something in the fstab?

it looks like this

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb2 during installation
UUID=31de3437-9243-48ce-861b-bf3b50d5a05d / ext4 errors=remount-ro 0 1
UUID=537a1ff2-d3b2-4151-beea-78812e5e13c2 /mnt/537a1ff2-d3b2-4151-beea-78812e5e13c2 auto defaults 0 0


and i have the same weird thing: running gparted changes all the drive entries in thunar.

then in gparted i see now that the drive seems to be mounted to /mnt/uuid-number. i can unmount it but can only asign it back to the same mountpoint...

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: mountpoint chenged automatically, problem with files.....

Post by gm10 » Wed Aug 01, 2018 5:50 pm

kalimerox wrote:
Wed Aug 01, 2018 5:39 pm
i had a /media/username/store\ here

folder (but i read somewhere else this wouldnt be a good thing to have anyways? )
/media/username/xxx would be the default auto-mount location. But I really can't tell you where to mount it, it's you in your first post who was saying that it's no longer in the location that you want it to be. So what's actually that location?
kalimerox wrote:
Wed Aug 01, 2018 5:39 pm
UUID=537a1ff2-d3b2-4151-beea-78812e5e13c2 /mnt/537a1ff2-d3b2-4151-beea-78812e5e13c2 auto defaults 0 0
Unless whatever version of the Disks tool you are using has a bug, I'd say you forgot to fill in the mount point (step 7, bulletpoint 4 above). So go to the mount options again and change that. But this time make sure it's in the location you actually want it to be. So far you've mentioned /store here, /media/store here and /media/username/store here. Gotta make up your mind. I don't know where your broken links are pointing to. ;) Write the name as I did here, btw, no backslash in it.

After you modified it again do run cat /etc/fstab once more to make sure it worked correctly this time. Otherwise we'll have to edit that file manually. I'd rather have you do it via the UI though, less error prone.

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 6:06 pm

thanks for your patience.


I rebooted again and now it seems to work!
But this time make sure it's in the location you actually want it to be. So far you've mentioned /store here, /media/store here and /media/username/store here. G
yes i want it to be in /media/ store here. It kind of automatically slipped to media/store here1 and all kinds of other places when rebooting...

now it reads this:

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb2 during installation
UUID=31de3437-9243-48ce-861b-bf3b50d5a05d / ext4 errors=remount-ro 0 1
#UUID=537a1ff2-d3b2-4151-beea-78812e5e13c2 /mnt/537a1ff2-d3b2-4151-beea-78812e5e13c2 auto defaults 0 0

UUID=537a1ff2-d3b2-4151-beea-78812e5e13c2 /media/store\040here auto nosuid,nodev,nofail 0 0

because one thing happened. I dialed in "defaults" instead of "nosuid,nodev,nofail" and the system would not boot anymore.. I booted into the other distro and changed back the fstab and it boots again.. just now scared to try again to set it to defaults ;) but of course i ll try if necessary..


Thanks again!! :)

kalimerox
Level 1
Level 1
Posts: 28
Joined: Wed Nov 16, 2011 2:00 am

Re: mountpoint chenged automatically, problem with files.....

Post by kalimerox » Wed Aug 01, 2018 6:18 pm

update: changed to "defaults " and this time it worked!! so if everything stays like this i think this is solved, thank you so much!! :D

gm10
Level 9
Level 9
Posts: 2628
Joined: Thu Jun 21, 2018 5:11 pm

Re: [solved] mountpoint chenged automatically, problem with files.....

Post by gm10 » Wed Aug 01, 2018 6:21 pm

No problem, sometimes I know what I'm talking about. ;)

And you're welcome, good to hear you're sorted!

Post Reply

Return to “Mounting Partitions”