Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Which RPi to use, Argon One case, M.2 SSD

I’m totally new to the world of Pi but want to set up an in-house emoncms server, to use with my new IotaWatt energy measurement system. So I plan to purchase the emonSD to make it easy to set up the Linux OS etc.

I do have some experience with Linux and with Unix in general, though it goes back quite a few years.

I’m planning to order a Raspberry-branded Pi 4B, along with the Argon One M.2 case and Argon power supply. I figure for long-term data storage with database-level access, a “real” SSD (SATA M.2 form factor) would make sense.

Will this work?
I realize I’ll need to migrate the OS and other files from the emonSD to the SSD. And that there are steps involved to get the Linux OS to boot from the USB-connected SSD.
Will the OS on the emonSD card work with the Argon One case?
Will the emonSD card be compatible with the Raspberry-branded Pi 4B (I have to assume the answer to this is yes, but feel I should ask!).

Hello @ICPete

Yes the emonSD image works on the Pi 4B, cant see any issues with the Argon case… I haven’t tried migrating the OS and other files to a separate SSD but I know others on here have done that.

It’s worth noting that the emonSD image has 3 partitions:

  • boot partition
  • root OS partition (ext4)
  • emoncms data partition (ext2)

You could replicate the root and data partition structure on the SSD or perhaps just have the OS and data in a single ext4 partition, that will also be fine I imagine. The ext2 partition on the SD card has a smaller block size to reduce write load, but that may not matter so much on the SSD…

An alternative to starting with the image could be to prepare your OS and SSD first and then install the emoncms stack using the EmonScripts github.com/openenergymonitor/EmonScripts/

I’d do that - just leave out the init part so the disk doesn’t get partitioned.

Move the OS first.

1 Like

Ok thanks guys.
I’ve ordered the emonSD; for the minor cost of it, I’ll be able to get it up and running quickly, and then learn about how it all works. Then I can put in a fresh SD card, as you suggest, and install OS and get the boot up working with the SSD, then use the EmonScripts.

I’m not sure if this is the right thread, but I’m trying to shift over from SD card to an mSata SSD. I have a Pi 4B with all the latest updates which support booting from USB (my SSD is attached to USB3 port).

The latest advice I can find is that cloning the running SDcard to the SSD , shutting down, removing the SDcard then booting should just work. My SDcard was originally imaged from the latest emonCMS image Aug 20.

The SSD fails after getting 2/3 of the way, It looks as though the boot sequence has a hardwired path to /dev/mmcblk0p1 and /dev/ mmcblk0p3 there are timeouts reported trying to access them, it’s also trying to run fsck on those volumes eventually dropping into “emergency mode”.

Does that sound plausible ?

It’s getting late now, I’ll try digging a bit deeper during the week.

Thanks

Ok done a bit more digging and the booting from SSD vs SD card turned out to be a simple edit of the fstab in the SSD /etc directory. here are the changes I made. (I’m not sure if there is a way to format this).

*#/dev/mmcblk0p1  /boot           vfat    defaults          0       2*
*#/dev/mmcblk0p2  /               ext4    defaults,noatime,nodiratime  0  1*
*#/dev/mmcblk0p3  /var/opt/emoncms   ext2    defaults,noatime,nodiratime  0  2*
*#*
*/dev/sda1  /boot           vfat    defaults          0       2*
*/dev/sda2  /               ext4    defaults,noatime,nodiratime  0  1*
*/dev/sda3  /var/opt/emoncms   ext2    defaults,noatime,nodiratime  0  2*

My method was as follows:

  1. Image a new SDcard with the latest emoncms image from the site using ethcher.
  2. Boot the new SDcard create a login and do a full update on the admin page and reboot.
  3. Check that emoncms is running as you expect then shutdown.
  4. Connect your preferred SSD, mine is a Geekworm X857 card with a 128GB mSata card which attaches to one of the USB3.0 ports.
  5. Boot the pi from the latest raspian desktop version.
  6. Insert the emoncms SDcard you prepared earlier in the a USB card reader and attach to the pi.
  7. Using SD Copy utility to copy the emoncms SDcard to the SSD, being careful your system now has 3 disks attached. my SSD was /dev/sda and the emon SD card was /dev/sdb. So I copied sdb to sda. SD Copy does a bitwise copy probably using ‘dd’.
  8. Once finished shutdown the pi and remove the usb card reader with your emon SD card, then reboot.
  9. You should find that once booted the SSD filesystems should have mounted and be visible on your desktop. One will be /boot, two will be /root and the third the emoncms (ext2) partition.
  10. I then looked for /etc/fstab in the /root filesystem, make the edits above, then shutdown.

Now remove the SD card and reboot, if if you have the latest boot code the boot sequence looks for an SD card if one isn’t present it goes on to try to boot from a USB device.

Mine booted normally. My pi is a 4B, 4GB. I hope this help anyone trying to boot from an SSD. If there are questions I’ll try to help if I can.

Next is to move my working system data to this new setup :crossed_fingers:

The EmonSD is optimised for use on an SD card adding in things like Log2Ram and creating different types of partitions that, on an SSD are really not needed. Resizing the partitions may be a challenge.

It will be better to install RaspberryOS, transfer it to the SSD then install Emoncms using the EmonScripts before importing your data from the old SD card.

YMMV

Hi Brian , thanks for the advice I’ll have to experiment. I assume from what you are say the EmonScripts don’t add the Log2Ram and ext2 partitions?

As the instructions say, you need to modify the config file to suit.