Home Assistant external data disk is possible as the Home Assistant Operating System allows you to store most of its data on an external fast storage such as SSD Drive or USB flash drive. That means for example with a Raspberry Pi – the boot and main operating system partitions can stay on a SD card as usual, but the Home Assistant Core, Supervisor, Logs & Аdd-ons can go on a fast SSD storage.

Is this Hybrid supported?

This hybrid scenario is fully supported by Home Assistant and some say it is even more reliable than booting the Home Assistant from USB entirely. Of course, it can be much faster than staying with SD card only. In other words you are getting the best of both worlds and everything is official and supported. 

On top, you can convert your already running Home Assistant installation without losing any data. The procedure that I’m about to show you is very easy and will move your existing data to an external data disk automatically.

Let’s begin.

What is needed for the Home Assistant External Data Disk?

The things that you will need are the following:

  • A device like Raspberry Pi 4 (Amazon Store link), running Home Assistant OS installed on a SD card, which is the most typical scenario. Other devices that are booting from SD card can also be used as long as they are supported by Home Assistant. 
Raspberry Pi 4 is a single board computer that is perfect for running Home Assistant.
Raspberry Pi 4 is a single board computer that is perfect for running Home Assistant.
  • You will also need a fast USB SSD drive that is bigger in size than the SD card, not physically, but in terms of Gigabytes. I’m using this ADATA SSD drive which is working perfectly. You can check the current price of it in Amazon here – LINK
ADATA SSD drive that I'm going to use for the Home Assistant External Data Disk
ADATA SSD drive that I’m going to use for the Home Assistant External Data Disk

Backup first!

Have in mind that the data inside this disk will be overwritten and the whole disk will be erased. If you have something valuable inside the USB disk – backup it first. Same is valid for the Home Assistant. 

It is highly recommend to create a full Backup and to actually download this backup somewhere safe, before you continue further.

Home Assistant create and download backups
Create a backup & download it first, before continue with the Home Assistant External Data Disk move procedure.

Using UI to move the Home Assistant external data disk

When you are ready with the backups, boot your Home Assistant OS form the SD card as usual and connect the SSD drive to any of the blue USB ports (USB 3.0) on your device, as they are faster. 

Blue USB ports are USB3 ports which are faster
Blue USB ports are USB3 ports which are faster

Open your Home Assistant web interface and go to:

Settings > System > Storage > Three Dots Menu (upper right corner) > then select Move datadisk.

Home Assistant move datadisk
Home Assistant move datadisk

You should see a warning/dialog saying the following:

  • You are currently using /dev/mmcblkXXXX (this is the representation of the SD card in Linux) as data disk.
  • Moving data disk will reboot your device and it is estimated to take 10 minutes.
  • Your Home Assistant installation will not be accessible during this period.
  • Do not disconnect the power during the move.

To continue, select your SSD drive from the dropdown list and click on the move button.

select USB drive and move the data disk
select USB drive and move the data disk

Look how easy the whole process is! The complexity of this procedure is hidden under the hood, so you can enjoy your time freely and do something useful while you are waiting.

The system will prepare the Home Assistant external data disk and will reboot the whole procedure will take 10, 15 or even more minutes. The speed of your new data disk will affect that time, but in any case please be patient and do not shut down or reboot the device until it is all finished.

When your Home Assistant boot up again, you should have your boot and main operating system partitions on your SD card as usual, but the Home Assistant Core, Supervisor, Logs & Add-ons will be on the fast SSD storage. Making your system faster and more reliable.

Using CLI to move the Home Assistant external data disk

Alternatively, you can use the Command Line Interface (CLI) to create your Home Assistant external data disk. This is only needed if for some reason you don’t want to use the UI method that we just saw. Use this Command Line Interface method only if the previous graphical method is not working for you or you don’t like it for some reason.

To access the Command Line Interface you either have to attach a monitor and a keyboard to your device or you can install Terminal & SSH add-on from the Home Assistant Add-on store.

To install this add-on, go to your Home Assistant username and make sure that Advanced mode is enabled.

Home Assistant External Data disk: How to move your data to a faster storage? 1

Then go to:

  • Configuration > Add-ons, Backups & Supervisor > Add-on store.
  • Find and install the Terminal & SSH add-on. Alternatively, click on the My Home Assistant button below.
Open your Home Assistant instance and Open the ingress URL of a Supervisor add-on.
  • When the installation of the add-on is completed click on the Start button.
  • Wait for few seconds for the add-on to start and then click on the OPEN WEB UI button.
  • In the opened terminal type:
ha os info
  • From one of the lines in the result, you can see that the current data disk is /dev/mmcblkXYZ. That means currently our data disk is located on the SD card.
  • Connect your USB drive and type:
ha os datadisk list
  • As a result you should see something like /dev/sdX (in my case it was /dev/sda). This is the USB drive that I want to use as Home Assistant external data disk.
  • The next and the final command that I have to type is:
ha os datadisk move /dev/sda
  • Replace the /dev/sda with your device if it is different and hit enter.
  • the same procedure will follow: restart with 10 to 20 minutes of moving the data disk from the SD card to the USB drive.
Home Assistant external data disk move using CLI commands
Home Assistant external data disk move using CLI commands

Not enough power?

If you have issues with the USB attached SSD drive one possible reason can be not enough power for the device and the ssd drive. The quick fix for that is to use a powered USB hub like this one – LINK. You have to connect the powered hub to your device and plug the SSD drive in the powered hub.

Powered USB hub with Individual Power Switches and 5V/3A Power Adapter.
Powered USB hub with Individual Power Switches and 5V/3A Power Adapter.

That way the power supply of the hub will power the SSD drive just nicely.

Alternatively, you can omit the hub and try with more powerful power supply if you happen to have one.

Outro

Don’t forget to subscribe for my newsletter if you haven’t done that already that way you’ll be notified when i release a new article.

I’m Kiril and i’m done writing. Bye!


12 Comments

Ignacio Salazar · 08/02/2022 at 8:50 pm

Is this method valid for home Assistant Supervised in Docker?

    Darko · 25/02/2022 at 3:38 pm

    Thanks for the great instruction.
    I tried the method of transferring data to SSD. Unfortunately, the procedure did not end (even after 2 hours), so I interrupted it.
    Could the problem be if RPi 4 is set to boot from SSD?

      Praveen · 08/08/2022 at 11:16 pm

      Did you ever get a response for this?

ricardoftgomes · 09/04/2022 at 12:07 am

Great toturial! thank you very much and keep on making toturials and videos like this 😉

small correction: you should remove the [SPACE] between “data” and “disk”
“ha os data disk list” -> “ha os datadisk list”
“ha os data disk move /dev/sda” -> “ha os datadisk move /dev/sda”

    KIril Peyanski · 09/04/2022 at 12:21 am

    Thanks Ricardo for the comment and for the correction. I will fix it right away, I guess it is a autocorrector issue 🙂

Jeppedy · 04/05/2022 at 5:42 pm

How do I move back from an external disk to the SD card again?

jack · 29/07/2022 at 8:02 am

ha os datadisk move /dev/mmcblk0
Error: ‘DataDisk.migrate_disk’ blocked from execution, no Home Assistant OS avai lable

FJ · 03/08/2022 at 2:23 pm

I have an x86 based Home Assistant system currently loaded on an ,M2 128GB SSD. My computer also has a 1TB SATA SSD drive that is currently empty. As the .M2 is faster than the SATA, I would like to keep the home assistant bootstrap there. But I really would like to locate just the Media directory on the 1TB SATA drive. (The new Music Assistant integration looks to be great for local media files and I have more than the 128GB will hold). Is there a way to do that? Moving the data disk would work, but it would slow down the system.

fj

    Alessio · 18/08/2022 at 12:20 am

    hi, interesting guide.
    But I do not find information.
    I have a question that worries me, in case of ssd problems you can go back to the SD card with datadisk.

      KIril Peyanski · 18/08/2022 at 8:24 am

      In theory if SSD fails the HA will still be able to boot as the booting part of the remain on the SD card. So, just make regular backups and you should be fine.

James · 16/08/2022 at 4:18 pm

It looks like in the web interface this have now moved to under Settings > System > Storage then the three dots has the Move Datadisk option

    KIril Peyanski · 16/08/2022 at 4:19 pm

    Yes, thanks I have to update the path in the article!

Leave a Reply

Avatar placeholder

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.