MergerFS Multidisk Mount Batocera
-
Make required directories
mkdir -p /userdata/custom/bin && cd /userdata/custom/bin/ -
Download newest static mergerfs build, current built now can be found HERE
-
extract
tar -xvzf FLIE_NAME.tgz -
Move the
mergerfsbin to/userdata/custom/binand delete the other stuff -
Batocera will mount some disks and not others, not sure of how they do, but just check to make sure all of the disks you want are mounted and if not add the mountpoints to the script below
-
mount -orw,remount /bootto mount/bootread/write -
Create script to mount
nano /boot/postshare.sh
#!/bin/bash
mkdir /media/HDD2 /media/roms_metadata
mount /dev/mapper/hdd2_vg-roms_lv /media/HDD2
mount /dev/mapper/nvme_vg-roms_metadata_lv /media/roms_metadata
/userdata/custom/bin/mergerfs -o cache.files=off,dropcacheonclose=false,category.create=mfs /media/HDD1:/media/HDD2:/media/roms_metadata /userdata/roms
My data data is stored between 2 HDDs and 1 SSD. Roms on one HDD1 and HDD2 in the root /media/HDD1/segacd for example and the metadata is stored on SSD at /media/roms_metadata for example /media/roms_metadata/segacd/images