Storage

Migrating Pi 5 from microSD to USB3 Samsung 870 EVO SSD, and Pitfalls

Since I use Raspberry Pi 5 as a virtual machine (VM) host for Home Assistant OS (HAOS) in KVM, I want a system that is simple, stable, and reliable.
After repeated microSD drawbacks, I selected the Samsung 870 EVO SSD 500GB via USB3 over my previous Raspberry Pi 128GB microSD U2 for system storage.

Ubuntu – data stored in RAM filesystem – TMPFS

In my Cubieboard2 I use Lubuntu. Since I have connected barometer and arduino to my cubieboard, I read data from that devices and store it to cubieboard2 filesystem. Since NAND memory is not quite suitable for such frequent changes because of wear-out of the memory cells over time, I’ve created temp space in RAM memory. Cubieboard2 has 1GB DDR memory so there is some space for it.


I will use TMPFS and not older RAM disks – ramfs. Tmpfs is supported by the Linux kernel from version 2.4 and up. On reboot, everything in tmpfs will be lost. The memory used by tmpfs grows and shrinks to accommodate the files it contains and can be swapped out to swap space.
To get more comprehensive info regarding those filesystems read this post or this post.