#How to fix "Cannot mount backup_folder because it is not empty" on ha-os

1 messages · Page 1 of 1 (latest)

frank canopy
#

Home assistant keep writing to the local folder after the mount failed
This mean you can't mount it back
The /data/mount seams nowhere to be found

What you need:

  • Advanced SSH & Web Terminal with priviled

open the webui
docker ps -a
after inspecting all container i found that the mount we are searching for is on the hassio_supervisor container

➜  ~ docker inspect -f '{{ .Mounts }}' hassio_supervisor            
[{bind  /run/systemd-journal-gatewayd.sock /run/systemd-journal-gatewayd.sock  rw true rprivate} {bind  /run/dbus /run/dbus  ro false rprivate} {bind  /run/supervisor /run/os  rw true rprivate} {bind  /run/udev /run/udev  ro false rprivate} {bind  /etc/machine-id /etc/machine-id  ro false rprivate} **{bind  /mnt/data/supervisor /data  rw,slave true slave}** {bind  /run/docker.sock /run/docker.sock  rw true rprivate} {bind  /run/containerd/containerd.sock /run/containerd/containerd.sock  rw true rprivate}]

Open a shell

docker exec -it hassio_supervisor bash
#

go to the path of the backup

cd /data/mounts/
ls -al backup_folder
total 67331232
drwxr-xr-x    2 root     root         12288 Dec 19 21:36 .
drwxr-xr-x    4 root     root          4096 Dec 19 21:36 ..
-rw-r--r--    1 root     root      55316480 Oct 11 00:30 005d4e1c.tar
-rw-r--r--    1 root     root         20480 Sep  1 20:17 00d4ba8e.tar
-rw-r--r--    1 root     root       2119680 Sep 14 15:48 027b4e75.tar
-rw-r--r--    1 root     root      54763520 Sep 27 00:30 02f5e173.tar
-rw-r--r--    1 root     root      54763520 Sep 26 00:30 041fbbb7.tar
...

Your data are here, and the chmod don't stop ha from writing to it unmounted !
Move the backup to a tmp folder

mkdir tmp
mv backup_folder/* tmp/

Lock the mount-point

chmod 0000 backup_folder
ls -al
total 20
drwxr-xr-x    4 root     root          4096 Dec 19 21:36 .
drwxr-xr-x   16 root     root          4096 Dec 19 21:47 ..
d---------    2 root     root         12288 Dec 19 21:08 backup_folder
drwxr-xr-x    2 root     root         12288 Dec 19 21:36 tmp

And now, retry mounting it from the webui, it should work.

ls -al
total 20
drwxr-xr-x    4 root     root          4096 Dec 19 21:36 .
drwxr-xr-x   16 root     root          4096 Dec 19 21:47 ..
drwxr-xr-x    2 root     root             0 Dec 19 21:08 backup_folder
drwxr-xr-x    2 root     root         12288 Dec 19 21:36 tmp

You can the the permission are now OK and the size on disk is 0

Finally, move the backup back on the mount.
This will take more time because it will actually upload them to your NAS

mv tmp/* backup_folder/
#

Took me 45mn...
Gosh i like the ease of use of hassos when it work, but i hate it when it doesn't :( All i want is direct ssh access to the OS :(

weak ferry
frank canopy
#

Are you asking and answering your own question

yes, i asked, and didn't wait doing nothing. 45mn later i found my way to fixing it and writen a quick guide how to do it if someone have the same issue

I know discord isn't a forum ... but at least it's somewhere

#

As you wish but read the note:
noted, i'll look into it because this was way harder than i feel it should have been to fix

weak ferry
#

Your thread title only Hi :) so it can be easily overlooked and I figure it doesn't really sound interesting enough to click for most people.
https://i.imgur.com/QhgCRcT.png

frank canopy
#

Does it show i'm bad at discord :D let me see how i can change that title :D

#

How to fix "Cannot mount backup_folder because it is not empty" on ha-os

weak ferry
#

Someone called it (H)ead (A)che OS once and I tend to agree a lot of the time 🙂

frank canopy
#

:D
I won't lie, i really don't like docker, even if i know why and how it's useful.

But when it was time to migrate to something easier to maintain than core on debian ... with python release going quite fast ...
I'm happy to have HA-OS for my prod system (most of the time)

weak ferry
frank canopy
#

yea, that's what i mean, i hate it because docker, i like it because it's work most of the time without worring about upgrade, unlike core on debian