Preloading /data volume with large files


#1

Soundscapes is a resin.io application that plays audio recordings of a variety of ecosystems via several raspberry pi + speakers located throughout our workspace.

The current library of recordings is about 1.2 GB in size and stored in our orgs google drive.

I would like to be able to preload the SD cards with the file library so that it ends up in the /data volume. Is this possible? (perhaps I load them into a temporary folder on the SD card after writing the base resinOS image. Later the OS does the move?)

Yesterday I wrote an experimental node application that used the googleapis package to interact with our google drive and attempt to download the audio library. Currently it’s not working because I haven’t added logic to deal with overflowing the stream buffers. (when using fs.writeStream).

In any case, Instead of syncing over the network, It would be nice to be able to add most of the content directly to the SD card, then use network requests to add/remove to it.

Thanks for your suggestions!


#2

It would be nice at least if resin-cli or resin-device-toolbox made it easy to scp or rsync big files or directories to local devices.


#3

Good point! We have an ongoing work to preload application containers but that does not yet address the /data directory indeed, and resin sync can’t work with /data yet. :package:

Opened an internal issue for this, and will keep you posted !