HOW-TO add as many new harddrives as you want, without modifying the library
#1
When your movie collection grows, so do your storage needs. I decided to build a solution where I could add as many harddrives as I'd like, without having to add them separately to the library, or having to search all my movie directories for files.

The trick is to use aufs. aufs is the successor of unionfs and lets you mount multiple partitions under the same location. In this example I have two partitions containing movies, /dev/sda1 and /dev/sdb1. I mount these in fstab, using the regular commands:
Code:
/dev/sda1   /mnt/movies2  ext4     defaults,user,noatime   0 0
/dev/sdb1   /mnt/movies1  ext3     defaults,user,noatime   0 0

I have 2 directories containing my movies, /mnt/movies1/Films and /mnt/movies2/Films. I want to see all my movies under /mnt/films, instead of having to search /mnt/movies1 and /mnt/movies2. To do this I add the following line to /etc/fstab:

Code:
none         /mnt/films aufs     user,br=/mnt/movies1/Films=ro:/mnt/movies2/Films=ro 0 0

This mounts both /mnt/movies1/Films and /mnt/movies2/Films to /mnt/films. I use the option "=ro" to mount them both readonly. That way it's also harder to screw something up. I can still write to these filesystems, using /mnt/movies1 or /mnt/movies2. When I add /mnt/films to xbmc it's seen as a readonly filesystem, which is what I prefer, but you might want to change that.

You can add as many partitions as you want; all you need to do is add them to fstab and you can have a virtual partition with many terabytes of movies.
Reply
#2
Good tip, thanks.
Reply
#3
Nice, thanks for the tip.
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO add as many new harddrives as you want, without modifying the library0