Using bind-mounts instead of symlinks
Robert Heller
heller at deepsoft.com
Mon Mar 9 21:05:02 UTC 2020
At Mon, 09 Mar 2020 21:23:34 +0100 Volker Wysk <post at volker-wysk.de> wrote:
>
> Am Montag, den 09.03.2020, 15:41 -0400 schrieb Robert Heller:
> > At Mon, 09 Mar 2020 20:04:21 +0100 "Ubuntu user technical
> > support, not for general discussions" <ubuntu-users at lists.ubuntu.com
> > > wrote:
> >
> > > 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.
> >
> > I can't speak about Nautilus (or any graphical file manager), since I
> > don't
> > use a graphical file manager.
>
> It _is_ practical, sometimes. :-)
Never has been for me. Mostly, just a lot wasted time.
>
> > From the shell symlinks are mostly transparent.
> > I use them all of the time and never have any issues.
> >
> > > 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.
> >
> > You are not thinking about this properly. You backup each file
> > system
> > separately. The fact that there are symlinks on one file system (the
> > SSD)
> > targeting the other (rotating rust), is not really an issue, either
> > during the
> > backup or the restore. In any case, you don't actually backup the
> > home
> > directory tree, nor do you restore it either, at least not in the way
> > you are
> > appearently thinking about it. You backup the SSD and you backup the
> > HDD
> > (rotating rust). And then you may restore the SSD (which might
> > include some
> > symlinks) or you restore the HDD.
>
> I don't backup each file system separately. I backup the whole (root)
> directory tree, with exclusions. The backup includes /mnt/fp, where
> I've mounted my HDD. Of course the symlinks aren't followed when
> backing up, that's clear. I don't think of it as an issue.
That is not really a sane way to do backups. Different disks have different
failure times.
>
> >
> > > 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.
> >
> > Using bind mounts this way is probably going to bite you sooner or
> > later,
> > typically. You idea seriously abuses the point of bind mounts.
>
> But it looks like it would work (except for that icon issue)... Is it
> abuse when you use a feature according to it's specification? I'm
> unsure...
>
> Bye
> Volker
>
>
--
Robert Heller -- 978-544-6933 Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list