Rpi3 with SSD

all about Meteohub on the new Raspberry PI platform

Moderator: Mattk

Post Reply
lentas
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: Mon Feb 08, 2010 8:03 am

Rpi3 with SSD

Post by lentas » Sun Feb 18, 2018 9:26 am

hi boris & all,

it would be much safer for existing data to operate meteohub on a rpi3 with a ssd card. recently i had a a faulty sd-card operating on a rpi with flightradar24. all data were gone.
so i tried to boot with ssd, howto´s are available, rpi is now running with a 128gb ssd on raspian jessie (had it as a spare part).

would it be possible "burn" the meteohub image for rpi on a ssd and operate from this device? has anyone experience with this solution?
any hints would be appreciated.

greetings,
michl

lentas
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: Mon Feb 08, 2010 8:03 am

Re: Rpi3 with SSD

Post by lentas » Wed Feb 28, 2018 8:41 am

10 days, no reply. no or yes would have been a little help, but nothing is even an answer. it´s a pity.
greetings

wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re: Rpi3 with SSD

Post by wfpost » Thu Mar 15, 2018 11:39 pm

Why don´t you setup a backup?

I backup the weather data with rsync (included with the meteohub image) on a NAS shared USB stick attached to my AVM Fritzbox.
Easy, cheap and secure.

BigAlT
Senior Boarder
Senior Boarder
Posts: 54
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: Rpi3 with SSD

Post by BigAlT » Wed Jan 09, 2019 4:13 am

I believe you could boot from an SSD ( using an x850 expansion board which you can configure as a boot device ). However, it doesn’t appear that any additional data storage space beyond that configured in the original image can be used as I attempted to expand the original image I copied onto a 16GB Micro SD card to take advantage of the over 12GB of “ unallocated “ space. I used GParted to move the swap file to the end of the disk and expanded the system partition to include all of the unallocated space. Unfortunately, the modified SD card will not boot so I’m left with 12GB of unused space. However, you can configure a USB Thumb Drive or an mSATA SSD mounted in an expansion board to store your data rather than the system area of the SDCard ( I’ve done both ) . Just perform the modifications as detailed in the following article I found on the web ( translated from the German )
“ Meteohub on Raspberry Pi - Data on USB stick

I use the Meteohub ( Link ) software for my Davis Vantage weather station to store the measurement data and visualize it on my website. Some time ago, I switched from hardware NSLU2 to Raspberry 2.
At fairly regular intervals of 2-3 weeks, I discovered incorrect entries in the meteohub log (eg weather \ 201408 \ raw).
raw_error
It could even happen that the Raspberry after a restart from the SD card no longer wanted to start. I quickly secured all the files in the directory "public" and I had to reboot the map every few weeks.
I decided to move the data from Meteohub from the SD card to a USB stick. Below I describe how I proceeded.
I expressly point out that I can not accept any liability if this process should not work.
Background:
Raspberry Pi (model B or 2) with SD card
Meteohub installed and fully operational (for me version 5.0j)
Backup created (maintenance - back up application data)
All files in the directory "public" (network share) externally secured (except directory "upload")
Data Collection Stopped (Maintenance - Stop Data Acquisition Process)
Weather station depending on the Raspberry Pi
procedure:
USB stick in the Raspberry Pi plug (I use a 32GB stick of HP (FDU32GBHPV165W-EF))
Use the terminal program putty to access Meteohub (Username: root, password: meteohub)
Check whether the USB flash drive has been detected: fdisk -l
fdisk
This is where the USB stick (example with 4GB capacity) with / dev / sda1 appears under / dev / sda. The current Meteohub data partition is shown in / dev / mmcblk0p4.
Now the USB stick is prepared for use with Meteohub:
- fdisk / dev / sda
- d (Delete Partition)
- n (create new primary partition, confirm all default settings)
- w (save partition data and leave fdisk)
Format the USB stick with the file system EXT4: mkfs.ext4 / dev / sda1
The file / etc / fstab must now be adapted so that the data can be saved on the USB stick again:
- nano / etc / fstab
- Insert a # at the beginning of the line / dev / mmcblk0p4
- Insert new line directly afterwards:
/ Dev / sda1 / data ext4 defaults, noatime 0 0
(Blank area with Tab key, at the end of line 2 zeros)
- CTRL + x (leaving nano)
- y (Save file)
The file fstab looks as follows:
fstab
Raspberry Pi reboot : reboot
Reconnect to Meteohub via putty
Check if the USB stick has been loaded correctly: mount
mount
The USB stick is loaded:
/ Dev / sda1 on / datatype ext4 (rw, noatime, data = ordered)
Now copy all files including the backup over the network to the directory "public"
In the Meteohub web interface, select Restore Data (Maintenance - Load Application Data)
Switch off the Raspberry Pi (Maintenance - Switch off the Meteohub system)
Connect the weather station again “
Here is the link to the original article which includes screenshots of the various steps


Switch on the Raspberry Pi
In the web interface check if everything is running correctly
The starting point of these adjustments was this contribution at www.forum-
Here is the link to the original article in German which I translated with Google Translate.
https://www.beathis.ch/cgi/Wordpress/?p=1790

Mattk
Platinum Boarder
Platinum Boarder
Posts: 752
Joined: Mon Sep 22, 2014 3:24 am

Re: Rpi3 with SSD

Post by Mattk » Wed Jan 09, 2019 6:02 am

When one sees 12GB, 16Gb, 32Gb cards mentioned then these are obviously not SLC technology and for the purpose being used one should expect a short or terminal life

BigAlT
Senior Boarder
Senior Boarder
Posts: 54
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: Rpi3 with SSD

Post by BigAlT » Thu Jan 10, 2019 8:23 am

In his instructions for copying the Meteohub RPi image that you download from the website Boris recommends an 8GB or 16GB micro SD Card. I agree that SLC cards have a much longer life than MLC Cards but they are also much more expensive.

Mattk
Platinum Boarder
Platinum Boarder
Posts: 752
Joined: Mon Sep 22, 2014 3:24 am

Re: Rpi3 with SSD

Post by Mattk » Thu Jan 10, 2019 9:58 am

Just for a download and transfer then any card will do that, SLC is more important with continuously operating systems and 8gb is probably the largest SLC I have seen around?

BigAlT
Senior Boarder
Senior Boarder
Posts: 54
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: Rpi3 with SSD

Post by BigAlT » Thu Jan 10, 2019 7:38 pm

It appears that the primary cause of SD Card wear or failure is how many times the card is written to. I believe that the Meteohub program, while it is running, only continuously writes the weather data to the SD card. Since the program is always recording the weather data this would account for the failure problems using standard micro SD Cards.
The solution offered by using an external device ( USB or SSD ) as the recipient of the data rather than the micro SD card itself appears to solve the issues of micro SD card failure when using a program such as Meteohub that is continuously writing data.
This allows the Meteohub-RPi user to use the easily obtainable and much more affordable MLC micro SD Cards to boot and load the Meteohub program into the RPi while the wear from the continuous writing of the data is confined to the external USB or SSD Drive which is much more easy and affordable to replace without the necessity of reloading the original downloaded Meteohub RPi image file to a new micro SD card and having to do a license transfer from the old card to the new one. If you’ve alteady updated the original version from v4s to the current version it also avoids having to go through the updating process again with the new SD Card.

tastewar
Junior Boarder
Junior Boarder
Posts: 28
Joined: Mon Dec 29, 2014 5:00 pm

Re: Rpi3 with SSD

Post by tastewar » Tue Sep 24, 2019 3:12 am

Phew! I have done this. It appears to be working. I somehow glossed over the part about backing up the original data, and things were not working when I rebooted and had the new /data mount point. In some ways, I didn't care about the lost data, but it seemed unhappy because it was missing the basic file structure. I was able to mount the old partition to a new (temporary) mount point, and copy the data over, then delete that mount point, then restart the logging, and it seems to be working.

I don't honestly know if I ever experienced a problem with my older SD card or not. But I am happier with this arrangement. Fingers crossed for many more years of trouble-free usage!

Post Reply