Balena Sound / Spotify Connect Issues

Hi guys,

Pretty new to this game, but Spotify has been cutting out unexpectedly when I’m streaming to my Rasberry Pi 4. I just ran a diagnostic test and these two issues came up.

Check_localdisk = failed

Some localdisk issues detected: 
test_diskspace Low disk space: (df reports 0% free)

Check_service_restarts = failed

Some services are restarting unexpectedly: (service: /spotify_2*****0_1*****9 restart count: 10)

Having diagnosed these issues, I’m not sure where to even start addressing them. I’d really appreciate any help anyone can afford.

Thanks in advance :slight_smile:

Hey Alexander, you’re getting that service restart issue because that’s often one of the side affects of having no more disk space. What size storage do you have ?

You can begin to troubleshoot this more by figuring out what is taking up so much space. SSH to the device and run df to see which partition to start looking. It will most likely be in /mnt/data as this is where all the docker images, layers and volumes are. You can then drill into it more and use du to see folder sizes. A command to use that I just whipped up: du -h /mnt/data/* | sortn -nr | head -n 10 which will show the top 10 folders in your /mnt/data partition.

Even if you find where the space is being taken up it’s not much help when it’s in some cryptic docker folder so run balena system df which will give you much more information on what about your docker engine is taking up space.

You can also try to reclaim of space if you’re not sure how by running balena system prune -a

Thanks dude, will give it a red hot crack sometime this weekend. Again, sorry in advance for my tech illiteracy, but I’m not really sure how to SSH to the device, and I’ve never really run commands before… do you have any recommended articles I can scour?

Crazy that it’s full already. It’s a 32GB card that was completely empty three months ago. The only thing I’ve been using it for has been to stream Spotify, so I’m at a complete loss as to how it’s managed to rack up 30GB of data in that time…

Alexander, you can actually SSH to your device directly from your balenaCloud dashboard. If you go to and login, click on your Application name, then your Device name, you will see the terminal at the bottom-right of the screen. Check here for a quick screenshot of what it looks like and how to use it:

Let us know the output from those commands Miguel posted, thanks!

Thanks guys! So for df:

root@67b7e58:~# du -h /mnt/data/* | sortn -nr | head -n 10
bash: sortn: command not found
root@67b7e58:~# df 
Filesystem                     1K-blocks     Used Available Use% Mounted on
devtmpfs                         1833032        0   1833032   0% /dev
tmpfs                            1969352        0   1969352   0% /tmp
/dev/mmcblk0p3                    306201   299208         0 100% /mnt/sysroot/active
/dev/disk/by-state/resin-state     18803      240     17130   2% /mnt/state
overlay                           306201   299208         0 100% /
tmpfs                            1969352        0   1969352   0% /dev/shm
tmpfs                            1969352    38024   1931328   2% /run
tmpfs                            1969352        0   1969352   0% /sys/fs/cgroup
/dev/mmcblk0p1                     40314     7547     32767  19% /mnt/boot
tmpfs                            1969352       20   1969332   1% /var/volatile
/dev/mmcblk0p6                  14603928 14593229         0 100% /mnt/data
/dev/mmcblk0p2                    306201   285417       714 100% /mnt/sysroot/inactive

For: du -h /mnt/data/* | sortn -nr | head -n 10

bash: sortn: command not found

For: balena system df

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              9                   8                   950.5MB             239.3MB (25%)
Containers          8                   8                   300.5kB             0B (0%)
Local Volumes       3                   3                   13.96GB             0B (0%)
Build Cache         0                   0                   0B                  0B

Now I’m gonna run: balena system prune -a

WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Deleted Networks:

Deleted Images:
untagged: balena-healthcheck-image:latest
deleted: sha256:a29f45ccde2ac0bde957b1277b1501f471960c8ca49f1588c6c885941640ae60
deleted: sha256:167d9097a0a0c9ad3c82d85cdd3d078db0410523d29251194ef08288cb785a2a

Total reclaimed space: 9.136kB

9.136kB doesn’t seem like a lot… but I’ll give it a red hot crack… Thanks for all your help guys. Looking forward to sorting this out!

Alright, new set of problems now boys. Can’t stream music, and I’m getting constant ‘ding dong’ noises as the rasberry pi 4 keeps reconnecting…

I rebooted after running the initial commands, and now we’re having troubles. Should I just start from scratch and format the card?


The sortn is a typo - it should be sort.

I think at this point, since you’ve deleted some containers, that it might be best to reflash the SD card with balenaSound and have a fresh go.

Let us know if you are still having issues - we’ll get you sorted.


Ah sorry about that typo @farquad.495676. Can you run du -h /mnt/data/* | sort -nr | head -n 10 and share the results before starting over. I’d like to confirm what is taking up the space before losing it.