Aufs2 for media files
I happen to keep my media files (music, films, photos, …) on two separate media: external USB hard drive and my laptop’s limited hard drive.
Thanks to this I can avoid cluttering my laptop with files I don’t really need know, while keeping a place for them. However, there are times I would like to both trees to merge. Enter aufs2.
#!/bin/sh mkdir -m 700 -p /tmp/media mkdir -p /home/tener/mmedia sudo mount -t aufs -o br:/tmp/media=rw:/home/tener/media=ro:/media/lotsOfData/media/=ro none /home/tener/mmedia
I decided it would be nice to have this merged tree writable, but on the other hand I don’t want any permanent changes without fine-grained control of what I’m changing. As a result, all permanent filesystems mounted under /home/tener/mmedia are ro, while the one under /tmp/media is rw.
Under Arch Linux aufs2 can be installed like this:
pacman -S aufs2-util