Forum › Forums › New users › New Users and General Questions › Solved: problem mounting directories to /sda5
- This topic has 23 replies, 5 voices, and was last updated Sep 1-4:51 pm by Brian Masinick.
-
AuthorPosts
-
August 31, 2025 at 8:42 am #184784
Brian MasinickModeratorIf it’s a different directory, specify that instead.
and if it’s only one file in a particular directory, the directory AND the file must be specified with the mount path.
--
Brian Masinick
Alternate "Search B":
This search pageAugust 31, 2025 at 3:09 pm #184792stevesr0
MemberHi Brian,
The point I was trying to make was that, I believe that when for example
sudo mount /sda5 /home/stevesr0/MusicIs performed, you cannot also do
sudo mount /sda5 /home/stevesr0/Videosand expect that the two directories will exist with different contents.
APPARENTLY, there ARE ways of doing this using “bind”, “hidden files” or other techniques, but I am of course noobie-ignorant of these.
Symlinks which were suggested are another approach, which actually sounds like the easiest way of proceeding (unless there are problems with editing the music files), but I thought the mounting approach was the most “basic”.
More importantly to me, is the notion that once you have created the “primary” directory, you can create subdirectories within them, which could be used for different types of tasks or entities. (Like /home on /, and /stevesr0 on /home). So, assuming the directory I created following Robin’s instruction is stable thru reboots, I could create subdirectories for different things related to music just by using the file manager (in this case, zzzfm). Which would also be mounted on /sda5 and automatically launched, without adding anything to fstab.
This would fit my “use case” for listening to music.
Again, thanks for your always useful comments.
I
August 31, 2025 at 4:09 pm #184794Robin
Memberyou cannot also do
Hi @Stevesr0, you can do this.
$ sudo mount /sda5 /home/stevesr0/Music $ sudo mount /sda5 /home/stevesr0/VideoThis mounts the device /dev/sda5 to two places in your root file system: /home/stevesr0/Music and /home/stevesr0/Video parallel. You can parallel mount to as many places you like.
The content of the filesystem on the partition will appear in both (all) folders you have mounted to, and if you remove a file from one of the folders now, it will vanish in the other the same time. This behaviour can be a bit confusing, since from other („default”) folders you are not used to this, there a file appears merely in a single place. Be aware: If deleting a file from one of these folders, it will be no longer present in the other folders as well to which you have mounted, since they all represent the same partition in your file system. So be careful what you are deleting, if you mount a device to more than a single place: You might believe you have another copy in the other folder, while it is actually the very same file you are up to delete.And then, you will actually not see nor be able to access any content you had stored to the mointpoint folder before mounting as long a device is mounted to it. Only after u(n)mounting, the original content of the folder will reappear and you can access it again. Because of this, it is advisable not to mount a device to a folder where something is stored into before already. For mounting, always use an empty mountpoint folder.
In your case, to have your music folder mapped to a subfolder in your home, either make sure to move any content the intended folder contains before mounting somewhere else (maybe temporarily, you can move it to the mounted device in ~/Music afterwards, then all stuff will be stored to /dev/sda5 actually now when writing it to ~/Music, so everything is in one place and accessible), or create another new empty folder as mountpoint instead, e.g. /home/stevesr0/Music2 to which you can mount. Alternatively you could create the mountpoint folder even inside /home/stevesr0/Music, e.g. /home/stevesr0/Music/More_Music.
Please always observe the proper unmounting order for these nested mounts: First umount the nested mount, only then umount the base mount. So in your case: Before umounting your home (maybe /dev/sda4 or whatever), you’ll have to umount /dev/sda5 from /home/stevesr0/Music. (For pluggable storage devices like USB, SD etc, unplugdrive will take care of nested mounts and will not let you unmount the base device before the nested mount has been unmounted by whoever had mounted it. For internal devices you have to care for observing this on your own.
I could create subdirectories for different things related to music just by using the file manager (in this case, zzzfm). Which would also be mounted on /sda5 and automatically launched, without adding anything to fstab.
Sure, since you actually write everything to /dev/sda5 while it is mounted to /home/stevesr0/Music. You can use this Music folder as all the other ordinary folders in your file system, do everything in it what you can do in all the other folders also: create and remove subfolders in it, add or remove files to them etc. All this happens then actually in your /dev/sda5 partition instead of in the partition from where your home was mounted (e.g. /dev/sda4 or whatever), so all content will vanish from your home when umounting /dev/sda5, and be back immediately as soon you mount it again. As long unmounted, the mountpoint folder will be either empty (if nothing was in it before mounting) or give you access again to whatever you had stored before mounting /dev/sda5 to it.
Please do yourself a favour and to some tests with dummy mountpoint folders, a dummy partition (on which nothing of worth was stored, you can use e.g. an empty USB storage device for this), dummy folders and dummy files until you are familiar with the proceedings and feel confident, before applying it to your precious music collection. My advice: Don’t use „productive” stuff for trying for the first time (even though I sometimes ignore this rule myself when I’m perfectly confident that I’ve understood how things work and what I am expected to do.)
Windows is like a submarine. Open a window and serious problems will start.
August 31, 2025 at 4:29 pm #184795stevesr0
MemberBelated response to Xunzi_23,
Yes, changing the permissions from root to stevesr0 worked also, until I rebooted. Plus, I had to keep changing permissions up the chain.
But, as I subsequently realized, I was doing things wrong, both in (apparently) not using facl to revise permissions and in not setting up an entry in fstab.
Sorry for failing to respond earlier.
- This reply was modified 1 year ago by stevesr0.
September 1, 2025 at 2:23 pm #184832
Brian MasinickModeratorWhile I don’t do it the way you and @Robin have discussed, that is a legal way to do it. Robin explained the specifics (and constraints) of using this method.
Neither this way or the way I do it – allocating an entire partition to each of my multiple distributions – is the ONLY way to handle things.
https://linuxvox.com/blog/mount-linux-file-system/
https://www.geeksforgeeks.org/linux-unix/mount-command-in-linux-with-examples/are a couple of sites you can look at to look at filesystems.
an “educational discussion” is listed here:
https://www.linux.org/threads/why-cant-we-mount-multiple-filesystem-in-same-mountpoint.46919/
Hope these add just a few distinctive comments to aide in the discussion.
--
Brian Masinick
Alternate "Search B":
This search pageSeptember 1, 2025 at 2:33 pm #184833
Brian MasinickModeratorI don’t often separate directories within the same directory hierarchy, but that’s because I’m running a personal system.
When I last worked in an operating system organization, we did indeed separate directories.Instead of /home/
, we used to use /usr/users/ , and /usr/users was actually a high level link to a series of directories, such as [users1,users2, users3, users4] (I don’t know if they ever numbered higher than that, but by doing it this way ALL users could fit under /usr/users logically, yet physically they were located on many different physical volumes, so such organizations are indeed possible; we had our servers set up that way, and we also had a number of different servers all loosely connected together, yet also physically separated into several different “subnets” to effectively service our extremely busy, active network, full of developers, managers, marketing professionals, and testers.
--
Brian Masinick
Alternate "Search B":
This search pageSeptember 1, 2025 at 2:35 pm #184834
Brian MasinickModeratorWhat I’m attempting to share (and it need not all be fully understood) is that there are quite a few ways a file system and networks can be set up; each has their costs and benefits; the one I described above was quite complex but it solved both physical data traffic and over the network traffic, which is why it was organized in that particular way.
--
Brian Masinick
Alternate "Search B":
This search pageSeptember 1, 2025 at 3:15 pm #184837stevesr0
MemberHi Brian,
The points you are making seem perfectly valid and useful to me.
I chose to revise the title the way I did to clarify the opening post.
This of course ignored the useful comments provided by you, Robin and Xunzi.
I assume the title serves the purpose of alerting potential readers that there may (or may not) be something worthwhile or illuminating that they could benefit from.
If you would like to revise the title, please do so with my blessings, as your comments (and Robin’s instructions) are probably more valuable than the posts that I made <g>.
- This reply was modified 1 year ago by stevesr0.
- This reply was modified 1 year ago by stevesr0.
- This reply was modified 1 year ago by stevesr0.
September 1, 2025 at 4:51 pm #184841
Brian MasinickModeratorI don’t feel the need to make any adjustments at all. Your specific desires and interests are
definitely valid; nothing wrong whatsoever with your approach.Similarly the excellent recommendations made by @Robin are equally good.
This may not be a high interest item to a large number of people;
then again, our user base is incredible; they can surprise all of us
at any time.I’ve been happy to participate in this discussion; who knows, maybe someone
else will share some other ways to accomplish the same things. Now THAT’S
what I’ve always appreciated about both UNIX and Linux systems; Linux, for
the past 30 years (1995-2025) that I’ve been actually using it, and UNIX,
dating back to 1982 when I got into it in a very early, cutting edge,
exploratory use of what has long been called Client – Server computing.--
Brian Masinick
Alternate "Search B":
This search page -
AuthorPosts
- You must be logged in to reply to this topic.