extroot.sh.zip (1.5 KB)
For those who are running out of storage space on their vera and have an old SSD laying around, you can extroot the vera by moving the entire openwrt file system onto an the external drive.
I found in my case, that it was an essential step to stabilize the vera. Though I strongly recommend to do this with an SSD (which has built in RAM for cache and ECC), one could do this on a USB stick as well.
I do not like using the USB stick because they are slow (yes in spite of the USB2.0 interface limitation, most USB flash stick are even slower) and are failure prone. Indeed, they do not have wear leveling, Garbage collection and are made of lower grade NAND flash. So you are warned. Also I want to give a disclaimer that though this has worked wonders for me, I am not responsible for any loss of data or bricking. My script is quite safe as it should default back to loading from the onboard SLC NAND storage if the USB fails but you never know.
The process involves therefore a USB-SATA2 or SATA3 cable and an SSD.
- Plug it to the USB port of the vera and
- go into the vera settings/log section and enable logging to USB. The vera will initiate, partition and format the SSD and reboot. Your logs will be stored in the first partition which will be 512MB. There will be a second unformatted partition on the rest of the drive.
- Once rebooted, ssh into the vera and run
You should see how much space you have on your drive (the overlay partition)
4. You can upload the script attached here with SCP and run it under SSH into the vera or SSH into it and run the commands from the script one by one.
5. The system should reboot at the end of the script so once it is rebooted (it may double reboot actually) SSH back into the vera and run
This should verify that you succesfully booted from the external SSD. For me it looks like this:
Notice the 55G available for the rootfs partition and 0% utilization. I ran this on a 64GB Crucial C300 drive.
Filesystem Size Used Available Use% Mounted on
rootfs 58.1G 102.2M 55.0G 0% /
/dev/root 10.0M 10.0M 0 100% /rom
tmpfs 124.8M 1.2M 123.6M 1% /tmp
/dev/sda2 58.1G 102.2M 55.0G 0% /
tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda1 487.8M 30.4M 427.9M 7% /tmp/log/cmh
/dev/mtdblock10 50.0M 1.5M 48.5M 3% /storage
/dev/mtdblock10 50.0M 1.5M 48.5M 3% /etc/cmh-firmware
/dev/mtdblock10 50.0M 1.5M 48.5M 3% /etc/cmh-backup
/dev/mtdblock9 9.8M 9.8M 0 100% /mios
End note. You can get creative and do all kinds of things with this. For example add a swap file so the vera can have more available RAM etc…
Edit: I have attached the latest version of the script. I will update it here as it evolves.
Update: Added upgrade file to execute to upgrade to 7.0.29 on the vera plus as well as a backup script back into the embedded memory.
Edit: Fast Forward to this post for an updated script and upgrade to 7.30 script Vera extroot
extroot-utils.zip (1.5 KB)
Edit: Version for units already updated to 7.31. The plus version works also on for the secure.