Replace SD Card on UniFi Cloud Key
Written on February 12, 2023

The SD card in my UniFi Cloud Key failed, meaning my auto-backups were failing and I’d get a nasty message on the device’s admin interface.

We have detected that your SD card is missing. Please insert it and reboot your Cloud Key or disable automatic backup

Fortunately, it wasn’t too hard to replace, even if it was harder than it should’ve been. It should be quite straightforward: get a new SD card, install the SD card, reboot. Unfortunately, I was still getting this message.

A few quick steps were needed to remind the Cloud Key of this new card’s existence.

  1. SSH into the Cloud Key
  2. Run lsblk -f to familiarise yourself with the device’s name (in my case, mmcblk1). Make 100% sure you’ve got the right one here, don’t blame me if you nuke your device by formatting the wrong storage
  3. Format the SD card: mkfs -t ext4 /dev/mmcblk1. This will create a new partition. In my case, it was /dev/mmcblk1p1
  4. Create the mount point by running mkdir /data
  5. Add the partition to /etc/fstab by adding a line: /dev/mmcblk1p1 /data ext4
  6. Reboot

There will be a more efficient way to do this. After rebooting, the UniFi Cloud Key did a few things, change the fstab entry and more, but this approach worked for me.

Comments/questions

There's no commenting functionality here. If you'd like to comment, please either mention me (@chris@aus.social) on Mastodon or email me. I don't have any logging or analytics running on this website, so if you found something useful or interesting it would mean a lot to hear from you.