I'd like to create the following situation:A separate partition for my user's home directory,A second separate partition for ~/Documents, andA third separate partition for ~/Videos and ~/Music.Achieving the first point doesn't seem to be hard, and that's already covered in questions like: How can I move the home directory to a separate partition?Achieving the other two goals should follow the same pattern, but I'm not sure if I have to take care of the order of mounting somewhere/-how (i.e., first /home/user, then /home/user/whatever) . AFAIK the order in /etc/fstab doesn't matter at all.While it might be easier to set up, I don't want to make the XDG directories symbolic links, unless other solutions were overly complex.
How do I permanently mount a separate partition as folder in a separate home partition?
ubuntu;partition
TL,DR: I recommend symlinks.If you mount a partition to a mount point that isn't in the root partition, you must take care to mount the host partition first and unmount the host partition first. For example, if you have separate partitions for /, /home and /home/htorque/Documents, then you must mount /home before /home/htorque/Documents. If you list the partitions in /etc/fstab, then it's enough to list /home before /home/htorque/Documents, since the entries are mounted in order at boot time. Thus nested mount points are not a problem in normal operation.Nested mount points can be a problem in unusual circumstances. Suppose the disk containing one of the partition crashes, or you're doing maintenance such as unmounting a filesystem to move it to a different disk. You cannot unmount /home unless you've unmounted the partitions whose mount point is on it. If /home is not mounted at boot time because its filesystem is damaged, then /home/htorque/Documents will not be mounted either. Should you decide to rename /home/torque/Documents, you'll need to unmount the partition first. Furthermore, if at any point /home/htorque/Documents is not mounted and you accidentally drop a file in that directory, then the file will mysteriously vanish when you then mount /home/htorque/Documents.One case where you will not be able to (conveniently) use mount points under your home directory is if it is encrypted and mounted when you log in, for example the way Ubuntu uses ecryptfs if you ask for your home directory to be encrypted. You would have to mount the other partitions manually (or from a login script) afterwards, and to be careful to unmount them before logging out.A limitation which may or may not be relevant is that if you want your home directory not to be publicly readable but you do want e.g. your music to be publicly readable, then the path to your music directory must not go through your home directory. This is another argument against mount points under your home directory in a specific cirsumstance.Bind mounts won't buy you much here. They're useful when a symbolic link won't do, for example when you need files to be available in a chroot. But they combine the heavy maintenance of mount points with some of the downsides of symbolic links (the files also exist elsewhere) plus downsides of their own (multiple canonical paths to a file require special care when doing backups, among other things).So I recommend to create partitions mounted directly on the root partition (not necessarily directly underneath the root directory), and to create symbolic links. Or you can configure different path for those directories in ~/.config/user-dirs.dirs.