Physical Disk Partition Mounts Problematic in Home Folder.

Sasha-Jen

Member
Joined
Dec 27, 2018
Messages
46
Reaction score
19
Credits
30
Hello guys.

Recently I set up multiple partitions on a 2nd physical drive and mounted them within my home folder. I assumed it had just worked, but I've now noticed it has not. After a bit of poking around I have made progress (in a way) but am stumped, moreover I've tried searching for this problem but only another comes up (I'll explain it a bit down below).

This is the partitioning of my 2nd HDD:
5701


Just a quick (unneeded, so skippable paragraph) explanation for contextual understanding: timeshift is just that, a partition just for timeshift backups (originally in my home directory); MEGA is my cloud back up sync directory (mega.nz you see) so by having the sync folder on a 2nd disk in its own partition it also doubles as a local backup too (located within my home directory)!; Work is a directory within Documents; and Games is within my home directory where I will install all steam games into. At least, that was the original plan.

This is my home directory (on the 1st disk whose partitions haven't been shown), note the free space at the bottom:
5702


Now let's look into the Games directory that should be its own volume, thus different free space:
5703


Hmmm... There is nothing currently in there so it should be around 100GB of free space if working correctly. Instead it has the same amount of free space as the home partition's volume on the 1st disk; that is the space that it is using. Yet, as you can see on the left, it is recognised as being the separate partition. Weird.

One of the first things I did was change the timeshift mount volume from my home directory into root itself. Since timeshift needs root privileges to even be used, I see no reason why the timeshift directory should need to have any permissions/ownership but root. So until now it was sitting in my home directory locked unless accessed by root.

Here's the free space in my root directory:
5704


Now let's click into the timeshift folder:
5705


Success! It is using the space of the correct partition. It also highlighted the partition device to the left too, tho I cropped that out by mistake. Take my word on that.

Well, what's causing this? When I learnt how to create and mount Linux partitions anywhere in the file system the examples I learnt from were placing these volumes within home folders with no problem. I don't see what I did differently with the now correctly working timeshift volume other than it is now out of home and directly in root. What more, when searching for this problem the only thing that is coming up is a user not having permissions in the directory, which is not the issue.

I have attempted to recreate the directories where the partitions are mounted in the home folder both as root and as my own user "just in case" directory ownership was the problem (this is why the Game directory is locked in a screenshot above, created as root and screenshotted file manager as own user before permission switch). This makes no difference, the directories in home do not use the actual volume space despite recognising the devices on the left of the file manager. Even clicking on each device brings me to the correct directory, but they still use the home partition as actual space.

Thanks to all future replies.
 


this looks intriguing sasha, i'll take a closer look tomorrow

one-armed wizard
 
I've "played" around with partitions to troubleshoot this problem. I use "play" cautiously since I don't really want to be playing around with partitions that much. Here's a few findings of interest:

Mounting anything in a directory directly in root works fine (no problems with the timeshift partition at all).

When I mounted the MEGA partition in root to test this, the partition had all the correct files. This means the partitions were being used as they should be while in /home despite not displaying as such. While this sounds like good news, I don't want to just continue "as normal" when we're talking about partition problems. They're simply too important for me to feel comfortable going "it looks off but it works fine." I don't one day want to have bigger partition problems due to ignoring what I do see off now.

Most strange of all, is that when I mount back into my home directory it shows as it should, as if it all works... until I restart the system. fstab file is perfectly fine how it should be (I have attempted setting up partitions both through the "Disks" utility and manually editing the fstab file).

So, it seems like a display issue on the surface, but the system thinking there is no other partitions in /home despite there being more just sounds like something to me that is begging to grow into bigger problems if left unchecked. Again, partitions are so important that if this "visual" bug exists, then there might be worse partition problems "under the hood", as if this might just be one symptom.
 
Ok, I have made progress but not quite there yet... and the progress I have made was done by sort of poking around rather than with an approached that I knew exactly what I was testing, meaning I can't explain everything I did, only that I realised.

I set up the partitions with the "disks" utility that comes preinstalled in Linux Mint 19.3. It opens without asking for anything, but if you try to do any action it asks for su password.

This is relevant to what I think the issue is. When mounting a partition in the disks utility it comes up with "error: no such folder exists". So I manually created folders with the partition name where they are suppose to go. This works for root (ala the timeshift partition that works fine as /timeshift). The issue is within the /home/owner directory.

And it was /home/owner, as I tested out mounting in /home itself and it worked fine. Now here's the progress: when poking around I set the partitions not to auto-mount at start-up in the disks utility. I then restarted. At this point, I had deleted the manually created directories in /home/owner where the mount points where.

So, on restart the "devices" on the left-hand side in the file manager were not mounted but were listed. Strangely, their mount directories were existing, but locked due to root ownership & permissions. Here's the action that showed something: clicking once on any partition label under "devices" would mount them and bring me into them in /home/owner with full user access. The folders that were owned by root (with nothing inside them btw) were now owned by the user. Fully working, with files there and proper free space listed. Everything seems fine this way.

The only thing: I should be able to have these partitions auto-mount on startup and have it all working fine. I shouldn't have to manually mount every time. At one point when a partition auto-mounted and I had the file manager open as a regular user, I attempted to unmount one and I had to put in su password due to "another user mounted this device". Another user like... root in the disk utilities that asked for su password for every action?

So, how my current understanding is: I need the auto-mount to happen as the regular user at startup and it will work as I wish it to? I don't know how to do that, I wasn't aware mounting itself was a per-user basis like this. The disks utility has no options for "auto-mount as this user, not this one" so...
 

Members online


Latest posts

Top