"Move data disk" resulted in death of my HA install

last night I tried to move my HA Blue’s data partition to a USB drive so I could get more space in my /media folder by using the UI of Home Assistant to move the data disk to a USB drive. Common Tasks - Operating System - Home Assistant

It warned me it was going to take an estimated 40 minutes, so I let it just run overnight, the next morning home assistant was bugged way out, everything was showing as unavailble so I downloaded the log file, Logpasta - simple, secure log paste service, and saw some errors related to setting up hassio. Thought maybe it just didn’t reboot correctly after moving the data disk so I rebooted the hardware and now I’m getting nothing over the network. it’s totally unresponsive.

So I hook the HDMI output to a TV and I’m getting this (video) https://photos.app.goo.gl/tyq1ZyM3kBHf76YB7

eventually it moves on to this and it’s not moved from this yet at all

Are there any kinds of recovery options available at all from here?

1 Like

When I ran the same “Move Data Disk” on a Yellow to move from CM4 eMMC to a SSD, the original user partitions were still on the original eMMC disk:

Overall, unless you have *nix sysadmin skills :mage:t2:, and have already tried removing the external USB disk and rebooting (i.e. the user partitions might still be there and usable without the external USB), I’d factory reset the ODROID-N2+ and restore from a recent backup.

If you have *nix admin skills, try booting a live distro, and try fdisk and fsck on the external USB to see what made it across with the transfer. The partitions might be mountable for recovery, but getting a full set of consistent data will be the challenge.

If you don’t have a recent backup, painful as it is, learn the lesson, and try mounting the external USB on a PC to get the main YAML config files. Recovering the full database from tainted media can be done, but again needs *nix admin skills.

An external USB stick is unlikely to survive the database writes of HASS so try a small SSD in a USB enclosure next time if the on-board eMMC is a problem. Note that loading up /media used to be a good way of making HASS backups very slow and unreliable - which is why the new ability in 2023.6 to mount external NAS storage is a better option. The media is available, but not part of HASS backups.

If this helps, :heart: this post!

1 Like

Thanks! Yeah I don’t have the *nix sysadmin skills, and have tried removing the USB disk, so I guess it’s back to the drawing board for me… Any idea what cause it to die in the first place?

I don’t have a NAS right now, so home assistant is effectively acting as a NAS until I do get one :sweat_smile:That’s why I was trying to use the USB drive, to get more capacity available. Oh well, I don’t mind starting from scratch it’s just a big PITA to reflash that eMMC with how I have everything cable managed.

I’m going to guess at a disk error on the USB stick during transfer.

The process took a very long time for me from a RPi eMMC to a Samsung EVO SSD, and I suspect there’s not a lot HASS can do if there’s an error.

I had a HASS restore fail due to a few albums of music in /media making the file very large, but was able to unpack the backup (just a tar file gzipped), remove the music, and repack. That was a couple of years ago, but there are a few reports of backups going wrong with large media and database files (e.g. hitting 2Gb or 4Gb limits).

Some folks move from HASS OS to a VM on a small x86 box to be able to run HASS and NAS software of some sort on HDD or SSD. It’s a bit of a jump from the appliance-like convenience of a Blue or Yellow!

As I’m having a deeper look at the “move data disk” feature currently (over at Behind the scenes of the "move data disk" feature), I stumbled over this “failed migration topic”.

Can we summarize it likely failed due to target storage issues (an USB drive)?