Linking two folders to be seen as one

I had a drive getting close to full so I needed to create a partition on one of my other drives and move some of the content from the main drive to the new partition. What I would like to do in the Places panel in Dolphin is have one entry that when clicked will show me all the content in both the original drive and the new partition like it was all in one drive. I know I can do this easily enough under Windows but my search for doing so in Linux is not turning up anything useful. Any suggestions and or help would be great. Thanks

1 Like

Have you you looked into LVM?

3 Likes

Thanks that looks like it might be promising. I found the below on LinuxQuestions but it’s from 2005. If that would work I have a couple of questions on how to do it cause the OP of the thread was never given an answer there. So my questions are Do I create a folder where I have my mounts, give myself access to it, and then run that from Konsole within that folder to show everything from the drive and partition I want to see in one folder?

This turns 2 directories into 1:

mount --bind /home/username/gallery /home/username/pictures
1 Like

$sudo mount --bind olddir newdir

allows you to do that. But, if olddir is a mountpoint and already mounted, by doing --bind, olddir may be umounted. You can still use newdir though. Umount newdir will re-mount olddir. Read mount man page.

2 Likes

After some though I think I’m just going to link all the folders in the secondary partition in the first partition. For my purposes I’ll have the same access to them via the links as if I was going into the folders on the secondary drive. Not sure why I didn’t simply think of this in the first place. Thank for the help and suggestions.

1 Like

I just got here to say welcome to the club and I hope you enjoy your stay :grin: but also its the first time I came across “mount --bind two folders” which I haven’t used before but it gave me some ideas and I’ll surely use it now.

1 Like