Emoncms on pi, power down external drive

i’m going to help a friend get some electrical panels going, he is (or used to be) a chartered engineer so no worries on safety. I have undergone training as an electrician as well

but the Q is… using an external drive to store data on, is it worth it spinning down the disk and only write every half hour and use either memory or the sd card as temp storage?

another thought… are there an option to spec how much storage can be used to store data and when full just overwrite the oldest data with new data?

Perhaps from an energy saving point of view.

Otherwise, there’s a chance of not being able to spin it up afterwards. (called stiction) I’ve seen it happen to more than one drive, so whle it might not be a common occurrence, it’s still something to think about.

yeah, its noise/energy/wear vs. the risk of not being able to spin up again

so yes food for thought it is :smiley:

I’ve found it an ideal use for the SSD’s I’ve got that are now too small for other purposes. Put them in a USB enclosure and you add zero noise and only a small amount of power consumption to your install. Also no problems of stiction (ok, so there is “wear” problems instead…). You can buy 120GB SSD’s for as low as $40 AUD these days.

Heading off topic but on the subject of stiction, I fondly remember the days of having to restart some of the mips servers running the rod rolling systems at the steelworks I worked at. Stiction was a regular issue on those 100MB (yes, MB) drives and I quickly got the knack of opening up the server case to tap the HDD in exactly the right place with the handle of a screwdriver to break the stiction so they’d boot up :slight_smile:

Ahh the “simple” days of computers…

1 Like

that might be it

my thought since yesterday is to setup a pi but have the data stored on an external drive

same pi needs to run a speedtest every hour and save to spreadsheet plus a few other scripts

but once its all running my plan was to set the whole sd card in read only mode except the external drive where data is stored

this might sound daft/noob’ish

but i found this old thread: Where does emoncms store its data? | Archived Forum

not sure if the location where data is saved are still the same, but how would it tell the system to save data another place? example would be that i mount my external ssd at /mnt/ext

If this chap’s “test” is any indication of SSD life expectancy, an SSD is definitely the way to go.

If by chance you have a Pi3 or 3+ you can boot directly from an external HDD.

Additional info here:

sadly it’s an pi 2, so no wifi etc, but then again its going to be on a wired connection anyways

i think my gameplan has changed a bit, i will start out with the emonsd image and just put in in write mode and add the few things i want

then move the whole thing to run off the external drive

it seems that this post is my best bet for moving things to hdd

or are there better methods?

The second post in that thread looks like it has the info you need.

yep… that is also my thought :smiley:

I used this as my reference to move everything onto a USB drive for all of my RPis:

I still have the SD card in, but only to boot off - its essentially never written to.

You may have to play around with mount points if you’re moving an emonpi SD card image but there’s no reason you can’t move everything onto the one mount point if you know a little about linux and /etc/fstab

btw… do any of you know what would stop working if i installed emoncms on a hosted server that do not have redis?