SSH (Secure Shell) is a protocol used to establish an encrypted connection with a remote machine using a client-server model: the ssh server runs on the machine we want to access remotely, while a client is used on the machines from which we want to connect. Thanks to sshfs, we can use an existing SSH connection to mount a remote directory in a secure way, without using additional services like NFS or Samba.
The OverlayFS pseudo-filesystem was first included in the Linux kernel 3.18 release: it allows us to combine two directory trees or filesystems (an “upper” and a “lower one”) in a way that is completely transparent to the user, which is able to access files and directories on the “merged” layer just like he would do on a standard filesystem.
In a previous tutorial we discussed about the /etc/fstab file, and how it is used to declare the filesystems which should be mounted on boot. In the pre-Systemd era, filesystem where mounted in the order specified in the /etc/fstab file; on modern Linux distributions, instead, for a faster boot, filesystem are mounted in parallel. Systemd manages the mounting of filesystems via specifically designed units automatically generated from /etc/fstab entries. For these reasons a different strategy must be adopted to establish the dependency between two filesystems, and therefore to set their correct mount order.
Samba is a free and open source interoperability suite of programs which allows us to share files and printers between machines running Linux or Windows. A Samba share is pretty easy to configure and can easily be accessed on clients, since the vast majority of Linux file explorers has built-in support samba. In certain situations, however, we may want to mount a Samba share at boot, just like a normal filesystem on a specified mountpoint.