I have a HA Green to which I am able to SSH (to the host) as root. When I am on the host, I can access the homeassistant container’s shell and there I can manually mount the USB drive which is connected to the HA Green (via a hub).
So: ssh root@ipaddress:22222, then
docker exec -it homeassistant /bin/bash
and now I can run
mount /dev/sda1 /media/frigate_ssd
which succeeds, and under Media → My Media I then see the connected SSD. Great, now I want to permanently mount it via /etc/fstab
I add this line to the file:
UUID=af25f8a3-1374-754f-b1f9-0b231d90a581 /media/frigate_ssd ext4 rw,user,nofail 0 0
the guid is obtained with blkid, which returns
/dev/sda1: LABEL=“HA-USB” UUID=“af25f8a3-1374-754f-b1f9-0b231d90a581” TYPE=“ext4”
Now if I unmount the manual mount (umount /media/frigate_ssd), verify that it’s not present in the output of “df -h”, and run
mount -av
(which seems to ignore “v” for some reason)
now I see it in df -h output:
/dev/sda1 915.8G 32.0K 869.2G 0% /media/frigate_ssd
Everything is dandy, however: should I now reboot the host, the device isn’t mounted any more. What do I press now?
I suppose, when I access the container from host’s shell, where I am the king of all roots, my access is enough to mount the drive, but when the container is booting and the same /etc/fstab is processed, it lacks the permissions or some other magic? I feel so close, how do I solve this?