From 6b3e55ae64b710c52ba3e06b3ecd89128e0e5ea2 Mon Sep 17 00:00:00 2001 From: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Date: Mon, 22 Apr 2024 17:07:58 +0200 Subject: [PATCH] Add steps on migrating external data disk (#32343) * Add steps on migrating external data disk * Implement review comment. Mention correct related version * Remove version requirement * Apply suggestions from code review Co-authored-by: Stefan Agner * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Stefan Agner --------- Co-authored-by: Stefan Agner --- source/_includes/common-tasks/data_disk.md | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/source/_includes/common-tasks/data_disk.md b/source/_includes/common-tasks/data_disk.md index 92712bf5143..b4b09f05590 100644 --- a/source/_includes/common-tasks/data_disk.md +++ b/source/_includes/common-tasks/data_disk.md @@ -64,3 +64,41 @@ The system will prepare the data disk and immediately reboot. The reboot will ta Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a more powerful power supply if you experience issues. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. In this setup the power supply of the Hub will power the attached device(s). + +### Migrating an external data disk to another system + +This section shows how to move an external data disk from one system to another. +This can be an option if the following elements apply to your use case: + +- You already have a functioning Home Assistant instance (system 1) that is using an external data disk. +- You have another, new, Home Assistant instance (system 2). +- You want now want to use the data disk of system 1 on system 2 instead. + +The aim is to migrate the data from system 1 to system 2. One way to do this is by [restoring a backup](/common-tasks/os/#restoring-a-backup). The other way is to move the data disk. This can be an interesting option if you have a large amount of data on your external disk or if your external disk has more storage capacity than your new system. + +#### Prerequisites + +- A Home Assistant instance using an external data disk (system 1) +- A Home Assistant instance to which you want to move the external data disk (system 2) + +#### To migrate an external data disk to another system + +To migrate an external data disk from one system to another, follow these steps: + +1. [Create a backup](/common-tasks/os/#backups) of both systems and store these backups on another system (not strictly necessary, but recommended just in case, at least for the important data). +2. Shut down system 1 and remove the data disk. +3. Make sure system 2 has Home Assistant OS installed, and Home Assistant is up and running. Home Assistant is using the data disk (partition) on the boot drive (e.g. SD card) at this point. +4. Make sure system 2 has completed the basic [onboarding](/getting-started/onboarding/) steps, including the last steps where devices are discovered automatically. +5. Plug the external disk into system 2 and go to the **Settings** > **System**. Select the three dots menu, and **Restart Home Assistant** > **Reboot system**. + **Result**: A repair issue is displayed **Multiple data disks detected**. + - The repair issue comes up because system 2 now sees two file systems with an identical name. During a reboot, there is a name conflict with the existing data disk as it is undefined which file system should be used. This can lead to a random selection of the system you end up with. Hence you must make a decision. +6. Open the repair issue and choose one of the options: + - Select **Use the detected data disk instead of the current system**. + - This will override the current file system of system 2 and use your external data disk instead. + - You won't have access anymore to the current Home Assistant data. It will be marked as inactive data disk. + - If you changed your mind about using the external data disk: + - Unplug the external data disk. + - If you cannot unplug the external data disk for some reason, select **Mark as inactive data disk (rename file system)**. + - This makes sure that there is no name conflict after rebooting. + - It also means you cannot use the file system that is stored on your external disk. + - You keep using the current file system of system 1.