3

I'm trying to mount a unionfs file system in fstab (as one of the steps in this guide), with the following line:

unionfs /usr unionfs nodev,noatime,dirs=/.filesystems/usr/overlay=ro:/usr=rw 0 0

I've installed the package unionfs-fuse and added unionfs to /etc/modules, but when trying to mount -a I still get an error saying

mount: unknown file system type: unionfs

What am I doing wrong here?

Sergey
  • 44,353
Tomas Aschan
  • 2,952

2 Answers2

4

I've solved (or rather worked around) this, by not using unionfs and instead using aufs - another union file system.

Install the AUFS package and its kernel module from linux-image-extra-virtual:

sudo apt-get install aufs-tools linux-image-extra-virtual

The corresponding row in my fstab now looks like this:

usr    /usr    aufs    udba=reval,br:/.filesystems/usr/rw:/.filesystems/usr/ro    0   0

The squashfs is mounted at /.filesystems/usr/ro in the previous line, making this working as a substitute for the troubling steps in the guide I referred to in the OP.

Kaz Wolfe
  • 34,680
Tomas Aschan
  • 2,952
0

Create underlying squashfs on loop device through the terminal:

/.filesystems/usr/usr.sqfs /usr squashfs ro,loop,nodev 0 0 

Create aufs virtual filesystem that allows you to write on it:

aufs /usr aufs nodev,noatime,dirs=/.filesystems/usr/overlay=rw:/usr=ro 0 0 

Also consider adjusting /etc/sysctl.conf (!) if shutting down your PC takes longer than it should. Decrease the swap - swap turned off below

vm.swappiness = 0
m.dirty_background_ratio = 20
vm.dirty_expire_centisecs = 0
vm.dirty_ratio = 80
vm.dirty_writeback_centisecs = 0
efthialex
  • 3,941