Using bind-mounts instead of symlinks

Volker Wysk post at volker-wysk.de
Mon Mar 9 19:04:21 UTC 2020


Hi!

I've got a big, new SSD (1 TB) and a bigger hard disk. I want to place
some of my data on the SSD, and some on the hard disk. 

This could be done with symbolic links. The home directory would reside
on the SSD, with large parts of it being placed on the hard disk.
Symlinks would point from within the home directory to places on the
HDD.

This has disadvantages. For one thing, you won't get a real directory
tree under the home directory. Nautilus, for instance, won't find the
parts on the HDD, because symbolic links aren't followed (correct my
when I'm wrong). You can use find with the "-follow" argument, however.

Backup becomes somewhat difficult, too. You need to backup the home
directory tree and the externalized parts on the HDD as well. When
restoring from the backup, you must be careful to specify the right
place of the files, which possibly aren't in the home directory tree,
but externalised on the HDD.

So I conceived the idea of using bind mounts. The parts which are on
the HDD would be bind-mounted at places in the home directory. You get
a clean directory tree, and everything is fine.

Only root can do that, but that's okay for me. What's too annoying to
stick to this arrangement, is that for each bind-mounted directory, I
get a hard disk icon on the desktop. 

I'm wondering if it is a good idea to do it with bind mounts. And if
the icon problem can be worked around.

Regards,
Volker





More information about the ubuntu-users mailing list