Storing ROMs and other data on a remote drive
-
Hello,
I've read through the docs on Running ROMs from a Network Share and I have some concerns about the code there for option 1 "Add to autostart" / "if you have a shared folder that allows guest access":
sudo mount -t cifs -o guest,uid=pi,nounix,noserverino //hostname/retropie /home/pi/RetroPie
It seems odd because
/home/pi/RetroPie
already has the roms and other files in it. Am I really meant to mount on top of it like that? Or should I move everything away first?I'm imagining I'd do this on a RetroPie I already have set up. So if there are some more detailed instructions for what to copy to what location I haven't found it. I'm mainly looking to copy over my ROMs, configs, save files, anything else I'm not thinking about, to a remote drive and then always run from there. My idea is to be able to mount this drive from other RetroPie installations so all my ROMs etc are always the same but my "client" can be a RasbperryPi, a PC with Ubuntu, etc. Any resources or suggestions?
PS. For the curious, this is what I'm working on: https://github.com/seriema/retro-cloud DS.
-
@seriema said in Storing ROMs and other data on a remote drive:
It seems odd because /home/pi/RetroPie already has the roms and other files in it. Am I really meant to mount on top of it like that? Or should I move everything away first?
This is explained in the docs - if you mount the entire
$HOME/RetroPie
folder from the network, you need to copy its contents first to the network share.So if there are some more detailed instructions for what to copy to what location I haven't found it. I'm mainly looking to copy over my ROMs, configs, save files, anything else I'm not thinking about, to a remote drive and then always run from there.
I think the doc page is quite detailed. Take the time to read it and experiment with the configuration explained there.
Configurations are not stored in a shareable location and they should stay that way, since they're system dependent. Saves and save states are - by default - in the same folder with the ROMs, so if your
roms
folder(s) are shared, those will be shared too.If you're not sure which configuration to choose, start by sharing the
roms
folder only. -
Thanks @mitu . I'm currently doing this:
- Mount the drive at
/mnt/retro-cloud
- Copy
$HOME/RetroPie/roms
to/mnt/retro-cloud/roms
- Move
$HOME/RetroPie/roms
to$HOME/RetroPie/roms.bak
- Symlink
/mnt/retro-cloud/roms
to$HOME/RetroPie/roms
I'm not sure what difference the symlink will have compared to mounting in the RetroPie location, but I suspect some file lookups could be affected? I've found that EmulationStation takes a long time to start, and not just the first time but almost every time. Would you say that there's a difference between symlink or mounting directly? Am I having unnecessary steps? I'm scripting all of the steps so I'm avoiding steps like using the samba share through my PC to copy stuff.
- Mount the drive at
-
Why symlink instead of directly mounting the
roms
folder ? It has no real advantage as far as ROM loading goes.I've found that EmulationStation takes a long time to start, and not just the first time but almost every time.
Depending on how many ROMs you have, reading the list over the network has an impact. If you don't add new ROMs often, consider using the Parse Metadata Only option in EmulationStation so that the remote folders are not scanned on every start.
-
I would also recommend to store any scraped images or videos locally so that they load as quickly as possible when you're browsing your games in Emulation Station. Most scrapers have an option for the artwork location. You may want to see to it that this options is not set to the roms folder.
-
Why symlink instead of directly mounting the roms folder ?
It holds more than the ROMs. It has the gamelists and images for EmulationStation as well. Perhaps this diagram clarifies:
https://raw.githubusercontent.com/seriema/retro-cloud/develop/diagrams/filestructure.svgI'm hoping to store more things further on.
I did create two mounts for a while, so they could be mounted directly on
$HOME/RetroPie
and$HOME/.emulationstation
, but startup often got delayed and one or both of the mounts would fail. I don't know why but I decided that the fewer points of failure, the better.Depending on how many ROMs you have, reading the list over the network has an impact. If you don't add new ROMs often, consider using the Parse Metadata Only option in EmulationStation so that the remote folders are not scanned on every start.
Oh that would help! I saw your post in another thread where you posted a screenshot of EmulationStation. Is that it? Is it possible to set from the console or change a config file?
-
I would also recommend to store any scraped images or videos locally so that they load as quickly as possible when you're browsing your games in Emulation Station.
@Clyde Yes it's a slight issue right now that there's a slight lag when navigating the ROM's in EmulationStation. I'm storing all the media in the remote drive because of the space they take, and the time it takes to re-scrape everything whenever I want to set up my library on a new RetroPie installation. It's a trade-off I'm living with for now that I would like to improve it with time. A fallback could be copying from the remote drive if there's enough space locally, but I'm hoping to discover something smarter.
-
@seriema said in Storing ROMs and other data on a remote drive:
Is that it? Is it possible to set from the console or change a config file?
I think that's what @mitu meant. You can set it in the file
/home/pi/.emulationstation/es_settings.cfg
via the line<bool name="ParseGamelistOnly" value="true" />
. Mind that.emulationstation
is a hidden directory, as are all directories in Linux whose name begin with a dot. -
@mitu said in Storing ROMs and other data on a remote drive:
It has no real advantage as far as ROM loading goes.
Do you see any downsides? For example I noticed that Skyscraper follows symlinks, so I have a script to rewrite the gamelists again to point to
$HOME/RetroPie/roms
. That's the only downside I've encountered so far. -
@Clyde said in Storing ROMs and other data on a remote drive:
You can set it in the file /home/pi/.emulationstation/es_settings.cfg via the line <bool name="ParseGamelistOnly" value="true" />.
Thanks! I haven't been able to find any docs on
es_settings.cfg
. I've searched the github wikis and the only mention on retropie.org.uk outside of the forum is https://retropie.org.uk/docs/Child-friendly-EmulationStation/ Do you know where I can read more about what's supported and not? Or is it just trial and error, and forum? -
-
@Clyde said in Storing ROMs and other data on a remote drive:
and/or mentioned in the Docs
There's no mention of that file:
I was just looking for something to browse, to see if there's anything else that might interest me. Hard to say if there's anything specific in it I'm looking for.
If it was possible, I'd like to just mount my drive on
/mnt/retro-cloud
and then change configs to look there instead of on the RPi. It'd be preferable over moving and mounting/symlinking on top of places where the files usually are. -
Alas, I don't know of a full documentation of that file. Maybe others here do.
As for mounting directly or changing the config files, both have their benefits and disadvantages. I prefer mounting to symlinks for the following reasons:
- It seems more clean to me that way (the weakest reason ๐ ).
- Secondly, I can switch romsets or artwork collections just by re-mounting, which is much easier than to change many paths in multiple config files, more or less depending on what's to change.
- Finally, I usually avoid to mess with config files that may change with a future update of RetroPie.
That said, I'm using a slightly different way to deal with multiple directories on an external drive. The drive itself is mounted unter
/media/usb0
, while its directories are mounted separately onto their RetroPie conterparts using thebind
option of Linux mounts (i.e. mounting dirs into dirs). -
@Clyde said in Storing ROMs and other data on a remote drive:
The drive itself is mounted unter /media/usb0, while its directories are mounted separately onto their RetroPie conterparts using the bind option of Linux mounts (i.e. mounting dirs into dirs).
Oh that's really interesting! I wasn't aware of that. Do you do this setup manually or do you have them in some scripts? Anything you can link to? This is what I'm working on at the moment:
https://github.com/seriema/retro-cloud/blob/copy-roms/raspberry-pi/local/switch-to-file-share.shI'm not used to Linux and network drives etc. I'd be really happy for any feedback on my project. ๐
-
@seriema said in Storing ROMs and other data on a remote drive:
Do you see any downsides? For example I noticed that Skyscraper follows symlinks, so I have a script to rewrite the gamelists again to point to $HOME/RetroPie/roms. That's the only downside I've encountered so far.
Skyscraper has parameters for the location of the produced media and where the gamelist generation location.
Thanks! I haven't been able to find any docs on es_settings.cfg.
There's not a lot of settings and most of them are just a mirror of what's available in the interface. Look at the source to get the available options (https://github.com/RetroPie/EmulationStation/blob/master/es-core/src/Settings.cpp).
@Clyde has a good idea - you can use bind mounts instead of symlinks - so if the remote system is not available, the local data can be used instead.
As for a general setup recommendation to speed things up, don't store the media/artwork scraped in the ROMs folder. If you don't use Parse
MetadataGamelists Only option, then EmulationStation will have fewer files to scan. You can arrange thegamelist.xml
to reference the metadata from an additional folder ($mountpoint/media/system/{video,marquee,image}
) and leave the ROMs folder just for ROMs and saves. -
I did it manually. If you know what to do, it's really simple. There are two ways to do a bind mount: manually and automatically at system start via
/etc/fstab
. Taking my setup as example:sudo mount --bind /media/usb0/roms /home/pi/RetroPie/roms
But this will vanish after a reboot, so I've added this line to my
/etc/fstab
:/media/usb0/roms /home/pi/RetroPie/roms none bind,bg 0 0
The option
bg
lets the system try again in the background if the initial mount fails. I don't remember if this is a relic from my first setup attempts, or if it's still necessary for my local drive. But it can be useful especially for network mounts.@mitu said in Storing ROMs and other data on a remote drive:
@Clyde has a good idea - you can use bind mounts instead of symlinks - so if the remote system is not available, the local data can be used instead.
Ahh I forgot about that advantage.
If you don't use Parse Metadata Only option, then EmulationStation will have fewer files to scan.
I think you mean Parse Gamelists Only. ๐
-
@mitu said in Storing ROMs and other data on a remote drive:
Skyscraper has parameters for the location of the produced media and where the gamelist generation location.
Yes I think that's what I'm using (see my .skyscraper/config.ini). But since it follows symlinks it ends up with
mountpoint/...
. I'll trybind
instead.@Clyde has a good idea - you can use bind mounts instead of symlinks - so if the remote system is not available, the local data can be used instead.
So that means one is meant to mount on top of the existing
$HOME/RetroPie/roms
directory? No need to move anything away to say$HOME/RetroPie/roms.bak
?As for a general setup recommendation to speed things up, don't store the media/artwork scraped in the ROMs folder.
Good to know. I'm storing these three separate at the moment:
gamelists="$RETROCLOUD_RPI_MOUNT_POINT/.emulationstation/gamelists" downloadedMedia="$RETROCLOUD_RPI_MOUNT_POINT/.emulationstation/downloaded_media" roms="$RETROCLOUD_RPI_MOUNT_POINT/RetroPie/roms"
I was symlinking them to their regular places on the RPi but will definitely change that to
bind
instead.Seems like I'm on the right track then? My next to add are the save files (which I'll configure to not be in
/roms
), and then the controller configs. For the controller configs I'm currently looking at:/opt/retropie/configs/all/retroarch
/opt/retropie/configs/all/emulationstation/es_input.cfg
/opt/retropie/configs/all/emulationstation/es_temporaryinput.cfg
@Clyde said in Storing ROMs and other data on a remote drive:
There are two ways to do a bind mount: manually and automatically at system start via /etc/fstab.
Thank you for the tips! Can you confirm that you haven't moved away the
/home/pi/RetroPie/roms
or its contents, like I did in my script?Instead of
/etc/fstab
I'm usingautostart.sh
, which seems preferred in RetroPie 4+ according to the docs. -
@seriema said in Storing ROMs and other data on a remote drive:
So that means one is meant to mount on top of the existing
$HOME/RetroPie/roms
directory? No need to move anything away to say$HOME/RetroPie/roms.bak
?That's correct. The mount (bind or normal) "covers" the original contents of the mount point, so that they become inaccessible until you unmount it again. It is even possible to put several mounts on top of each other. Each would "hide" the one before it. This normally doesn't make sense (edit: other than e.g. for fallback mounts in case the main mount fails), but it is possible nonetheless.
Thank you for the tips! Can you confirm that you haven't moved away the
/home/pi/RetroPie/roms
or its contents, like I did in my script?Yes, because it isn't necessary for the above reasons.
Instead of
/etc/fstab
I'm usingautostart.sh
, which seems preferred in RetroPie 4+ according to the docs.I do not know why that is, and I'm using the fstab method for many 4.x versions without any problems, because it is the common way to do auto-mounts in most Linux distributions. Maybe @mitu can shine some light on that remark in the Wiki?
-
@Clyde Sorry I could have sworn I at least had upvoted your reply last weekend. I only work on these things on the weekends, so I'll be trying this tomorrow or later on. Either way, you've been a great help. Thank you!
-
@Clyde said in Storing ROMs and other data on a remote drive:
I do not know why that is, and I'm using the fstab method for many 4.x versions without any problems, because it is the common way to do auto-mounts in most Linux distributions. Maybe @mitu can shine some light on that remark in the Wiki?
I don't know why it's phrased that way or if it's indeed a preferred method vs. the just using
fstab
. The only advantage I see if that - with this method - the remote disc is mounted before EmulationStation starts, so there's a smaller chance for EmulationStation to start with an emptyroms
folder.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.