So you can only do that when connecting to the host system?
Is there an easier way? Because to connect to the host system, one has to plug-in another USB-Stick formatted and with that authorized_keys file, ai?
Would love to see a step-by-step guide to move data partition to USB stick. ha login does not exist for me either.
→ ~ ha login
Error: unknown command "login" for "ha"
Run 'ha --help' for usage.
FATA[0000] Error while executing rootCmd: unknown command "login" for "ha"
No joy with direct boot from USB drive. But I am now able to access the datactl command and today plan to move my data partition to a USB SSD. It will still require I keep the MicroSD card in my RPi4, but this is a step closer!
I am planning on doing the same thing this evening. I have a USB3 to sata cable and SSD arriving in the post and will try and use datactl to move the data partition across to the external drive.
Let us know how you get on @blueman2 and I’ll hopefully post an update later.
Sorry, I got side tracked on a small roofing project for a shed in back. Hopefully I will have the couple of hours to devote to this today or tomorrow and will report back as well. @benmarshall, one of the things I was going to do was to run tests on 2 different USB3 to SATA adapters I have to make sure which works best. From what I have read there is a lot of variation in what works and what speeds you get based on the adapter.
There is a great guide to testing and adjusting USB-STAT adapters here:
Well I can confirm that the datactl method has worked perfectly for me on a Raspberry Pi 4B.
My set up now consists of the Pi 4B connected to a Kingston A400 SSD using a Startech USB3 to SATA cable (USB3S2SAT3CB). The Pi is still booting from the sdcard but the data partition is on the SSD. I am running the full Home Assistant (standard install). Home Assistant reports the disk space metrics correctly and I have confirmed the partition has been moved across correctly.
All I had to do was:
Backup (Just in case!)
Connect the SSD to Pi using the cable
Login into Home Assistant CLI over SSH (needs to be via develop port 22222).
Get to a host shell using the ‘login’ command.
Check the new disk is seen using ‘fdisk -l’, it showed up as an un-formatted disk /dev/sda.
Use the datactl command to move the data partition - ‘datactl move /dev/sda’.
Reboot as advised by the datactl command output - ‘ha host reboot’.
Wait a while - mine took maybe 15-20 mins for a 120GB drive - Home Assistant will eventually boot up.
Profit?
At some point it would be interesting to further investigate a USB boot solution, but I’m happy enough with this for now!
I just noticed that my system is asking me to revert to the old OS, 3.13. Did they pull the updated 4.0 OS? That would impact my attempts to get native boot since that requires the 5.4.42 kernel.
Doh! It was my old Rpi3 that I was looking it. It was at 4.x and went back to 3.13. There was an issue so the developers pulled the kernel update for RPi3.
I also managed to do the datactl command as explained by @benmarshall ; just had to remove all existing partitions first using fdisk because I put Hassio image on the disk with Etcher in a previous attempt to run from SSD and this created 8 partitions. Once my SSD was free of partitions, the datactl command worked fine
To check if the SSD is being used, you can use the ‘df’ command over the developer SSH
Maybe a super stupid question. But how can I access the developer :22222 Port. By default :22 is for ssh. I know of course that you could use a parameter but if I do so it fails because the ssh add-on is only listening on :22. Advance Mode in HA is set but can’t find any option to enable a build-in ssh server. also documention doesn’t find anything if I search for 22222.