[SOLVED] Pointing a directory in ~/ to another HDD

Hello,

what I’m trying to do (and what in general works) is pointing my ~/Downloads folder to a folder on my sdc hdd(dev/sdc1 or /mnt/data).
I used to use a symlink - this time i tried mounting it in my fstab.
To get an idea, here’s what the part in my fstab looks like:
/mnt/data/downloads /home/staeffn/Downloads none bind 0 0

As I said, it works, the same way it worked using a symlink. When i go to my downloads folder in home, i end up on my 4TB data hdd in the right folder. So in general I have what i wanted, but I also have my games on /mnt/data and need to access it from time to time. When i try to do that with my file manager i run into trouble though(using the lazy way). On the left hand under devices I have quick access to: Filesystem ( / ) and it shows my 4TB hdd. When i click the latter i end up in /mnt/data/downloads though. While writing this I just noticed that my also mounted windows partition doesn’t show there(don’t ask me why I’ve never really noticed, guess I haven’t used it at all for quite some time now).
My initial question was: what am I missing here with symlinking/mounting and how do i end up on my hdd instead of the folder?
Maybe the right question is: how do i edit those entries/what makes anything appear in there?

Any hints what I’m not getting here are much appreciated.

That’s the part that troubles me. Geräte means devices, Dateisystem is Filesystem and Datenträger would probably translate into smth like media.

Edit: I hope that’s the right place for a question like this. If not, please tell me. :slight_smile:

Bump for our member, I can t help him out on my end.

Maybe some in the know haven t seen your post yet.

Can you navigate to /mnt/data in a terminal and see/access both the /mnt/data/downloads as well as your games? Are your games in a separate folder?

I had a similar issue trying to create some nfs shares; I don’t remember the details, but there were some permissions related issues as well as how linux views mounted drive space.

The simple solution may be to create a /mnt/data/games folder and move your games into it, then link or mount that to somewhere in your home directory.

Accessing it via terminal is no problem and it shows everything correctly.
ls in ~/Downloads shows everything in /mnt/data/downloads/ as it is intended and I can access /mnt/data and all directories on it.
It’s really just the part on the left side of my Filemanager that’s a bit annoying.
It shows:
Filesystem (I end up in / as intended)
USB (if connected and mounted)
4TB Drive

but when i click the latter I end up not on my mounted 4TB drive but in the downloads folder on it.
So I have to navigate via Filesystem -> mnt -> data.
Most of the time I use the terminal anyways, so it’s not a big deal. It just annoys me and probably the most annoying part is that I cannot figure it out. :smiley:

Edit: My games are mostly just on /mnt/data (/mnt/data/EVE for instance), Steam games are on /mnt/data/Steam and that’s it. So no directory for all my games.

I’m confused, please forgive me but can you clearly state what you want to happen and with which application?

Is it just the side panel shortcuts that you want changed?

Ok so when you click the side panel that would normally put you at the root (/) of the drive instead you are being put into a subdirectory within it?

Can you please post

cat /etc/fstab

Is there a specific reason why you aren’t using a symbolic link?

Yes, i want to end up on my harddrive when i click on it’s button on the left side of my filemanager.

There is no reason, no, I just had the same issue with a symbolic link and thought I give it a try via fstab.

# /dev/sda5
UUID=e9c6d44d-bac9-4bfe-82db-cffea9cbbd83	/         	ext4      	rw,relatime	0 1

# /dev/sda2
UUID=6005-0562      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/sdc1
UUID=6CB2D7644C7705DF	/mnt/data 	ntfs      	rw,nosuid,nodev,user_id=1000,group_id=985,allow_other,blksize=4096	0 0

# /dev/sda4
UUID=329E0A579E0A13CF	/mnt/windows	ntfs      	rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096	0 0
/mnt/data/downloads		/home/staeffn/Downloads		none		bind		0 0

Edit: Sorry about the confusion, I’ll try to be more specific and keep it shorter. :slight_smile:

Do you still have the issue if you remove this line from the fstab and reboot?

I use a similar setup and here is my fstab

# /dev/sda2
UUID=c715608b-fffb-403a-8d25-7b1ecfd7457a       /               ext4            rw,noatime,discard    0 1

# /dev/sda1
UUID=15C4-BC0D          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro      0 2

# /dev/sdb1 LABEL=wdblue
UUID=17ebd42a-9beb-4e21-82e7-9e704cc97a31       /media/wdblue   ext4            rw,noatime      0 2

I have a larger HDD (/media/wdblue) that I keep most things on with symlinked folders Music, Downloads, etc. I’ve never had an issue like this, given it has been a while since I’ve used a GUI filemanager so possibly a new bug, have there been any updates recently to the FM, ntfs etc? Have you had the issue the entire time using this install?.

Very strange bug indeed, can you post the filemanager version, is it just the default with AL (thunar)?

Very good question - don’t know why I’ve never tried that.
When I don’t mount/bind it, only my filesystem is shown.
Here comes the strange part: I just mounted it again. Now it shows:
Filesystem
4TB media (still ending up on /mnt/data/downloads)
Downloads (same as above)

So I guess it’s not only a localization problem.

Here’s what I found in the archlinux wiki (please keep in mind, I’m guessing here, I might have gotten it all wrong):

### Showing partitions defined in fstab

By default Thunar will not show in devices any partitions defined in `/etc/fstab` besides the root partition.

We can change that by adding the option **x-gvfs-show** to fstab for the partition we wish to show.

(https://wiki.archlinux.org/index.php/thunar)

I guess I got this part right.
Here’s what my fstab looks like right now:

# /dev/sda5
UUID=e9c6d44d-bac9-4bfe-82db-cffea9cbbd83	/         	ext4      	rw,relatime	0 1

# /dev/sda2
UUID=6005-0562      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/sdc1
UUID=6CB2D7644C7705DF	/mnt/data 	ntfs      	rw,nosuid,nodev,user_id=1000,group_id=985,allow_other,blksize=4096,x-gvfs-show	0 0

# /dev/sda4
UUID=329E0A579E0A13CF	/mnt/windows	ntfs      	rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096,x-gvfs-show	0 0

#Binding Downloads
#/mnt/data/downloads		/home/staeffn/Downloads		none		bind		0 0

Resulting in this:

94gigs is my windows partition, I will remove it, it’s just there for testing.
For the 4 TB part I end up on /mnt/data now.
But as you see I don’t have a link for my downloads directory right now.

I just uncommented the bind part.

 # /dev/sda5
 UUID=e9c6d44d-bac9-4bfe-82db-cffea9cbbd83	/         	ext4      	rw,relatime	0 1
 
 # /dev/sda2
 UUID=6005-0562      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2
 
 # /dev/sdc1
 UUID=6CB2D7644C7705DF	/mnt/data 	ntfs      	rw,nosuid,nodev,user_id=1000,group_id=985,allow_other,blksize=4096,x-gvfs-show	0 0
 
 # /dev/sda4
 UUID=329E0A579E0A13CF	/mnt/windows	ntfs      	rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096	0 0
 
 #Binding Downloads
 /mnt/data/downloads		/home/staeffn/Downloads		none		bind,x-gvfs-show 		0 0

I tried it with and without the x-gvfs-show for the last part, the result is the same in both cases.
What works:
I have 3 entries now:

Filesystem ( shows / )
4TB drive (shows /mnt/data/downloads (?!?))
data (shows /mnt/data)

My guess: it handles the
#Binding Downloads
/mnt/data/downloads /home/staeffn/Downloads none bind,x-gvfs-show 0 0
part like an USB drive (I’m lacking the right word for those types of media right now), and shows it with the name of it’s device.

Ah, and I’ve not answered your questions yet, sorry:
I’ve had this issue for the entire time using arch linux (maybe 1-2 years using KDE and dolphin) and I have the same issue now using archlabs (openbox and thunar).

thunar --version
Thunar 1.8.2 (Xfce 4.12)

So when you don’t bind mount it, you are sent to the root directory of the drive?

My best suggestion would be to either avoid the bind and instead just symlink them

ln - sf /mnt/data/downloads $HOME/Downloads 

or change the default used by xdg, see here for more info
https://wiki.archlinux.org/index.php/XDG_user_directories

1 Like

Sorry, was very busy for the last days and didn’t check in.
With the drive showing (even if the naming is a bit odd) I’m kinda happy already. Getting it exactly the way I want it will be the next step, for that the link looks promising. Guess that’s what I was looking for without knowing. :slight_smile:

Thanks a lot for that and ofc for all your input along the way.

1 Like

Good to hear, please mark this thread as solved by editing the title of your OP, or mark/post the solution that worked for you.

Cheers