RPI serving rclone-mounted music through NFS to another Pi (RuneAudio)

What is the problem you are having with rclone?

Hey! I'm trying to mount my music on my RPI running Ubuntu Mate and make it act as a NFS server to another RPI running RuneAudio. I could make it "play", but music keeps buffering and I'm not sure if I should mount my drive with extra flags or/and configure the NFS server otherwise, would a samba share work better than NFS? I like how NFS runs when I plug in my music drive into the RPI and serve it to the other PI on RuneAudio, but it's not working properly if I mount it with Rclone and serve it through NFS to the other Pi on RuneAudio, it plays but stutters constantly, even with mp3 files. I must say I'm not a tech-savvy person.

here the rclone mount:

rclone mount maxsuitecrypto: /media/max/maxsuite --allow-other --allow-non-empty

and here my /etc/exports for the rclone mount:

#Export media to all IP address under 192.168.1.X
/media/max/maxsuite/V/Music   192.168.0.0/24(fsid=1,rw,async,insecure,no_subtree_check,nohide)

What is your rclone version (output from rclone version)

rclone v1.50.2

  • os/arch: linux/arm
  • go version: go1.13.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu Mate on RPI3 that serves NFS music
RuneAudio on RPI3 that plays music

Which cloud storage system are you using? (eg Google Drive)

Google Drive (Encrypted)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount maxsuitecrypto: /media/max/maxsuite --allow-other --allow-non-empty

The rclone config contents with secrets removed.

[maxsuitecrypto]
type = crypt
remote = maxsuite:/backup
filename_encryption = standard
directory_name_encryption = true
password = ***
password2 = ***

A log from the command with the -vv flag

2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/: ReadDirAll: 
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/: >ReadDirAll: item=1, err=<nil>
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/: Attr: 
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.openRange at 0 length 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: >Open: fd=V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r), err=<nil>
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: >Open: fh=&{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}, err=<nil>
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 0 length 4096 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 4096 length 8192 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 12288 length 16384 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 28672 length 32768 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ReadFileHandle.seek from 0 to 65536 (fs.RangeSeeker)
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.RangeSeek from 61440 to 65536 length -1
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at -1 length 4096 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:41 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.openRange at 65536 length 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 69632 length 8192 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 77824 length 16384 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 94208 length 32768 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 126976 length 65536 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 192512 length 131072 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: >Read: read=65536, err=<nil>
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: Attr: 
2020/10/20 15:04:42 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: Read: len=131072, offset=0
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: >Attr: a=valid=1s ino=0 size=8534284 mode=-rw-rw-r--, err=<nil>
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.openRange at 0 length 134217728
2020/10/20 15:04:42 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: Release: 
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ReadFileHandle.Release closing
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 323584 length 262144 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 585728 length 524288 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 1110016 length 1048576 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:42 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 2158592 length 1048576 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:43 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 3207168 length 1048576 chunkOffset 65536 chunkSize 134217728
2020/10/20 15:04:43 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: >Release: err=<nil>
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 0 length 4096 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 4096 length 8192 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 12288 length 16384 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 28672 length 32768 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 61440 length 65536 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 126976 length 131072 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: >Read: read=131072, err=<nil>
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 258048 length 262144 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: Attr: 
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: >Attr: a=valid=1s ino=0 size=8534284 mode=-rw-rw-r--, err=<nil>
2020/10/20 15:04:45 DEBUG : /: Lookup: name="V"
2020/10/20 15:04:45 DEBUG : /: >Lookup: node=V/, err=<nil>
2020/10/20 15:04:45 DEBUG : V/: Attr: 
2020/10/20 15:04:45 DEBUG : V/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/10/20 15:04:45 DEBUG : /: Lookup: name="V"
2020/10/20 15:04:45 DEBUG : /: >Lookup: node=V/, err=<nil>
2020/10/20 15:04:45 DEBUG : V/: Attr: 
2020/10/20 15:04:45 DEBUG : V/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/10/20 15:04:45 DEBUG : V/: Lookup: name="Music"
2020/10/20 15:04:45 DEBUG : V/: >Lookup: node=V/Music/, err=<nil>
2020/10/20 15:04:45 DEBUG : V/Music/: Attr: 
2020/10/20 15:04:45 DEBUG : V/Music/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/10/20 15:04:45 DEBUG : : Statfs: 
2020/10/20 15:04:45 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:272272033505 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/10/20 15:04:45 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: Release: 
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ReadFileHandle.Release closing
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 520192 length 524288 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:45 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 1044480 length 1048576 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:46 DEBUG : V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3: ChunkedReader.Read at 2093056 length 1048576 chunkOffset 0 chunkSize 134217728
2020/10/20 15:04:46 DEBUG : &{V/Music/000-Soulseek/Completes/000/1969 Paco IbaƱez en el Olympia/02 Es amarga la verdad.mp3 (r)}: >Release: err=<nil>

hi,

that is an old version of rclone, you can update https://rclone.org/downloads/#script-download-and-install

--allow-non-empty is not recommened, best to remove it unless you are 100% sure that you need it.

on the pi running NFS, can you stream music locally via the NFS server?

as for stuttering with mp3, does not seem like a rclone problem, given the low bandwidth needed.
that sems to be some issue with you the the two pi units, your network or config of the NFS server,

have you done a speedtest between the two pi units; what is the result of it?

if you transfer a file from pi to pi, what the average transfer speed?

thanks for your reply! I use --allow-non-empty because I need to have some folders inside the mounting point for plex use and permissions (don't remember exactly). NFS speed to the RuneAudio Pi is fine as long as I serve files on some external drive. I've tried serving my music from an ext drive connected to the Pi and it transfers fine through NFS to the RuneAudio Pi.
Reflecting upon this I've thought, why not installing rclone on the Pi running RuneAudio and mount it directly there? this way I'd only need that pi for music and not involve two. Is it possible to install rclone on a pi running RuneAudio? it's a music player OS based on archlinux. If so, what commands should I execute to install it? I only have some basic knowledge on Ubuntu and I guess it's not the usual apt-get install rclone.

Arch has a well maintained rclone install so sudo pacman -S rclone should do the job.

I get this output

root@runeaudio:~# sudo pacman -S rclone
error: failed retrieving file 'filesystem-2018.1-2-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'glibc-2.27-3-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'rclone-1.42-1-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
resolving dependencies...
looking for conflicting packages...

Packages (6) filesystem-2018.1-2  glibc-2.27-3  iana-etc-20180221-1
             linux-api-headers-4.16.1-1  tzdata-2018e-1  rclone-1.42-1

Total Download Size:   14.35 MiB
Total Installed Size:  65.37 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
error: failed retrieving file 'linux-api-headers-4.16.1-1-any.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'tzdata-2018e-1-any.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'iana-etc-20180221-1-any.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'filesystem-2018.1-2-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'glibc-2.27-3-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'rclone-1.42-1-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

that is ancient.
perhaps try https://rclone.org/downloads/#script-download-and-install
or just download the correct version.

running the curl install gives me this:

root@runeaudio:~# curl https://rclone.org/install.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4436  100  4436    0     0  16072      0 --:--:-- --:--:-- --:--:-- 16130

None of the supported tools for extracting zip archives (unzip 7z busybox) were found. Please install one of them and try again.

I guess RuneAudio comes stripped-off so I have to install an extracting tool. how?
I tried the command sudo pacman -S unzip, 7z and busybox but the 3 of them give me the same error as with rclone

download rclone and copy it the correct folder.

I don't know how, which architecture and system: Linux .deb .rpm FreeBSD NetBSD OpenBSD Plan9 Solaris? and then once I download the file should I put it into a usb stick and plug that usb into the pi, then how do I install it from terminal? I'm sorry but as I've said I've only used ubuntu before

first we need to determine the cpu
run and post the output of uname -a

Linux runeaudio 4.14.58v7-aufs #1 SMP Sat Jul 28 20:40:59 CEST 2018 armv7l GNU/Linux

btw, I'm accessing that pi with putty

https://downloads.rclone.org/v1.53.1/rclone-v1.53.1-linux-arm-v7.zip

  • given that the pi cannot unzip, download on that win pc.
  • unzip it to a folder on win pc
  • copy folder to pi.
  • change to that folder on pi.
  • run this chmod +x rclone this will enable rclone to run
  • as a test, rclone version
1 Like

after a long time looking for a way to copy it to runeaudio I discovered I could activate samba on it so I copied the folder to /etc. this is the ls in rclone folder:

/etc/rclone# ls
git-log.txt  rclone  rclone.1  README.html  README.txt

I ran chmod +x rclone on that folder, but then when I tried rclone versions command not found :frowning:

try /etc/rclone/rclone version

for each command, from putty
copy and paste the command you run and the console output to this post.
please do not just summarize the error, ok?

1 Like

that worked!!! I could mount it. Now I don't know how to config Runeaudio to add the mounted folder to the library, in sources I can only select network folders or usb connected devices, but not a specific folder. But I should ask that somewhere else.
I could've never done it without your help, thanks a lot. just as an bonustrack, how can I add the mounting command to the startup? so it automounts each time I run Runeaudio?
this is my command: /etc/rclone/rclone mount maxsuitecrypto:V/Music /media/maxsuite/Music --allow-other

I could add the mounted folder to the library, if you don't mind I'd post this in here in case anyone else is looking for the same setup. you have to mount it in /mnt/MPD/LocalStorage/ and then "rebuild library" this way Runeaudio treats it as a local folder.
my final command /etc/rclone/rclone mount maxsuitecrypto:V/Music /mnt/MPD/LocalStorage/Music --allow-other
btw, is there any recommended flag to add to it to play optimally hi-res audio files?

did you play the audio yet and if so, was there a problem?
if not, nothing to do...

you might want to read this
https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full

I'm building the library and it's very slow building it, so I could only test some mp3 that work great, then some flac 16bit that works great, but it takes around 2s to start a song (I don't really mind as long as the playback is smooth) but since the libary is not built yet I couldn't yet try with the challenging files. but so far so good. I'll take a look at those commands, thanks a lot for your help!
As for the startup would you happen to know in a archlinux system? otherwise I must use a pc to putty that command.
I'll report back when I test the 192/24 flacs. I'm really happy :smiley:

not sure what is involved in building a library?
does it just scan filenames and meta data or does it read the contents of the audio of each file?

you would need to use systemd, which is very complex, to run a script at start up.
https://github.com/rclone/rclone/wiki/Systemd-rclone-mount

you could use cron, which is very simple.
https://wiki.archlinux.org/index.php/Cron