Running out of space on SD

If you’re running HA supervised or HA OS then the answer is no, there is no easy way to mount another drive. this is why we don’t recommend running as an addon: Installation | Frigate

Honestly it’s hard for me to understand the different ways of installing. I spent a lot of time reading the manual and finally thought „my way“ of installation was the the recommended one.
I installed HassOS on an SD card, then Frigate as add on and finally followed the integration with HACS.
So the message would be to first install Ubuntu and from there install docker. Then run Homeassistant and Frigate as Docker Container?
Sorry for the noob questions but all this is pretty overwhelming for me./

100 GB in a few days sounds really really a lot!
I had my HA running for months with several integrations and several devices and still at about 200 MB.
In the last days I added a lot of presence sensors and I noticed my database is now growing linearly like crazy (500 MB per day). I suspect it Is linked to the new sensors and the state recorder.
Before wondering around reinstalling and adding a new SSD, i would suggest you to dig down what is using all that space because doesnt sound normal to me in a few days.
Are your cameras continuously recording and are you storing those recordings?

No, just event triggered. As I‘m at the beginning of setting up homeassistant I would most likely just start over again if there is a better way of setting up the system. My problem is that I don‘t have much experience with Linux or docker. I would need a basic guide how to set up the homeassistant on the best possible way on a Minisforum mini PC with internal SSD and external USB HDD. Coral integration should work too.

Could you give me a hint how to set up homeassistant and frigate with most flexible options to extend storage?
I do have those hardware options:

  • Minisforum J4125 with 256 GB internal SSD (not in use), right now HA OS installed on 128MB SD, Frigate as add-on and with integration via HACS. External 1,5 TB SATA HD (not in use).
  • Synology 1817+
  • Lenovo ThinkCenter M710q with one TB NVMe (planing to set up Proxmox later on)

Sadly, I have very limited experience with Linux, docker, etc., but I’m eager to learn!!

What would be the best approach from scratch?

Another Idea I had, was mounting an external HDD over USB according this solution. Unfortunately, this is above my pay grade…

Edit: I gave it a try but got stuck with “os datadisk move /dev/xxx” I get the message “Error: /dev/sdc is not a harddisk”. It’s a USB 3.0 SATA HDD, fdisk shows “Diskmodel: Esternal USB 3.0”. I changed from DOS to GPT, but no change.

Could anybody help?

Do you care about the internal disk’s contents ? If not, you could move your current installation over to that device and instantly double your disk size. I’m not familiar with the Minisforum J4125. However, since you’re booting from an external SD card already, I would suggest downloading the latest Ubuntu desktop (22.xx) onto a fresh SD card (8GB should be more than enough) and booting from it. Once you’ve booted, choose to “Try Ubuntu” which will load a live version of Ubuntu without touching your existing disks. DO NOT choose to “Install Ubuntu” as you may inadvertently wipe out your HA SD card.

In fact, I would highly recommend taking a full backup and also removing your HA SD card before booting Ubuntu. Once Ubuntu has booted, you should see a screen with a computer generated purple/pink jellyfish (assuming you’re using 22.xx desktop). Now, open a terminal app and in the terminal enter “fdisk -l” which will list all your disks. Ignore anything that looks like /dev/loopxx. Look for entries labeled “/dev/sdx”, where x will be some letter a, b, c, etc. Identify your internal SSD. Next plug in your HA SD and run fdisk -l again to find out which device it’s been assigned. Let’s assume for the sake of this example, that your internal SSD was identified as /dev/sdb and your original HA SD is identified as /dev/sde. Now, all you have to do is copy your external SD to your internal SSD and you should be ready to boot from the internal SSD.

For that, you run the following in the Ubuntu terminal

dd if=/dev/sde of=/dev/sdb bs=4M conv=fsync,notrunc status=progress ; sync

Once the disk copy is done, you can shutdown ubuntu. Remove the HA SD and the Ubuntu SD leaving just the internal SSD and boot. That should get you running from the internal SSD.

WARNING!! Be very careful about the command above. Make doubly sure that the argument to of is your internal SSD (/dev/sdb in our example). If you accidentally give your original HA SD as the argument to “of”, you will wipe out your HA SD

Thanks Teerex!

I already tried “fdisk” from cli. The sdc is there.

Maybe that’s different from booting to Ubuntu?! I followed this guide . First problem was, I do not have “Datactl” command on my system. Workaround was here. Unfortunately, resulting in

I would not care about using the internal SSD, but as the USB HD is much bigger, that would be my first choice.

BTW: backup on homeassistant is not working (maybe due to limited space?!). Resulting in a system freezing.

Recommended is based on skill level and time really

HAOS or supervised

  • RaspberryPi and low linux skill
  • x86 or other hardware and just want simplicity and not a lot of messing with things
  • not a lot if time for managing server or managing services

Docker or VM

  • want customized
  • know or willing to learn
  • dont mind seperate updates and other things required to maintain server and several services

Nothing wrong with your install method but it has limits

Use rsync and just make copy

The HAOS install is easiest, until you want to do anything that is slightly advanced, like in your situation where you want to use two different drives for storage. Its really setup to use only one drive and use the machine it is installed on basically as an appliance running Home Assistant only, and adding the second drive becomes much more difficult as you’ve seen in the linked posts of others that try to do it. Any customizations to HAOS turn into a complex set of workarounds, that end up being more difficult in the end then just using one of the other install methods on an OS you manage yourself.

I don’t run the HAOS install, since it is too locked down for customizations like this. I went with the container install initially exactly because I’m running an NVR on the same machine Home Assistant is installed on, and the videos are stored on a large external hard drive, while the main SSD runs the OS and the system. I use Shinobi vs Frigate, which is older, but it uses very little processing power to record videos from my cameras (I don’t have a separate coral device either). I run Home Assistant container on Ubuntu, and have programs either installed directly into Ubuntu or running in Docker.

If you want to run the home assistant container install, you just need to learn how to use docker, and from there you can manage the containers yourself, and setup the Frigate container easily to store to the external HDD. You can then setup a mariadb to store the recorder/home assistant database to the external HDD as well, freeing more space on the SD card. In fact, using the recorder on an SSD card will eventually destroy the card with constant read/writes, and its not a matter of it will fail, but when. I would not store NVR videos to an SSD card either.

If you go the docker/container route, I would recommend using Portainer, since it gives you a nice UI and you don’t really need the command line. This is a pretty good guide to set everything up.

Your backup is likely failing because its trying to backup the videos made with Frigate, and failing to do so because they’re so large. As mentioned above, you’ll likely need to copy the config files over manually to restore your previous config if you move to Home Assistant container.

Another install option is to run HAOS in a VM, and then install Frigate separately in its own docker container. This way, you would get all the other Home assistant addons (as a Home Assistant Container install has NO addons), but be able to configure Frigate however you want to be able to save the videos on the other drive.

@tmjpugh and @mwav3
Thank you both for taking time to comment! I initially thought it would be much easier to configure the system.
I think I will try to start another backup (after deleting the recordings to save time). When that is finished I give this a try. In case it‘s not working I will set up a new installation and restore the backup.
As I really don‘t have much experience with docker and VM, and don‘t know if the Coral would be detected in that environment, I think my only change will be to install HAOS on the external HD and boot from that.
Maybe, later on (next project should be Proxmox) I come back to the VM installation with running frigate in docker. Right know I think this would be another nightmare for me.

Thanks again!!

If you install frigate in docker, as long as you properly map the usb coral in your compose/run command, frigate will have access to it. The install instructions to follow are here.

https://docs.frigate.video/installation

Well, I upgraded my HAOS a couple of days ago from 5.13 to the latest which is 9.3.3. Now, in my new HA installation, I see there’s a supported way to move the data partition to another disk. I personally haven’t tried it though so can’t comment on how well it works (if at all). You can access it from Settings → System → Storage. On the storage screen, click the 3 vertical dots on the top right of the screen which will show a “Move datadisk” dropdown. In my case, when I click on it, I get a popup that notifies me there’s “No suitable storage found”, which is expected because I don’t have another disk attached. The popup states that the storage capacity of the external disk must be greater than that of the existing disk. As you do have a 1.4TB disk available, you can try this out (assuming you’re at a version that supports this move).

Thanks teerex. I found this already but my external HD is not shown there (sda is the internal SSD).
Screenshot 2022-11-26 221204

I meanwhile tried this solution, but no additional folder in Media is shown.
I guess the best option for me right now is to use etcher an create a HAOS on the USB HDD, boot from the device and then restore the backup I created (on samba share)?!

Maybe this would be an option for me. Honestly, I’m so confused about the different ways of installation that I’m not quite sure what to do. Could I install HAOS as KVM image on Proxmox and then Frigate as a docker container in Proxmox? Sorry about all the questions, I’m really overwhelmed with this, but trying my best to understand.

Found this on the Installation docs from frigate:

Frigate runs best with docker installed on bare metal debian-based distributions. For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended.<

I think the “supervisor” and “add-ons” would really be important for me, so running HA in a docker container would be not a good option?! But how about the warning about VM on top of Proxmox.

In any way, HAOS as VM or HA docker, could I just restore the backup from the HAOS installation I’m running now?

The benefit of so many install options is Home Assistant is extremely flexible and can be run many different ways. Unfortunately, this can lead to confusion when getting started.

I would avoid proxmox with frigate. The frigate developers, as you found in the documentation, specifically advise against Proxmox.

A backup from HAOS on any system should be able to be restored to HAOS on another system or a VM. HA docker doesn’t have the supervisor, so restoring a backup to HA container is more involved. You need to manually copy the config directory or extract the files ftom your backup, then properly map it as a volume in to the container in your docker run command/compose.

The ideal setup as far as performance probably would be docker and home assistant container. However, it’s much more difficult. I started this way and it was a very steep learning curve (although worth it in the end).

The next best way would be to run Home Assistant OS in a VM, then frigate seperatly in docker. Frigate would not be run as an addon. You should not run Frigate in docker running inside another VM (too many layers, and with trying to access the coral, you’ll have issues). This would give you access to all Home Assistant addons to learn, then if you become more comfortable with docker, you can move them over later (almost all addons have equivalent stand alone docker versions).

To solve your immediate space issue though and get things running right away, you can just install HAOS on the larger drive and run frigate as an addon. Just be advised it’s not ideal, and backups/restores can easily fail with the large video files involved.

1 Like

Dear Tim,
thank you so much for spending that much time with my issues. Right now, I have installed Ubuntu on the ext. HD, followed the guides and installed HA as docker container. I will give it some time and just play around with this installation. I feel kind of uncomfortable without having the apps. But maybe I can get use to that.
The other option would be, as you mentioned, Installing HAOS in VM. Right now, I do not have any idea how to do that on Ubuntu. Proxmox, as you said, is not advised.
I’ll try to get things running for me in the docker environment under Ubuntu. If I’m terribly unhappy with that, I’ll think about HAOS as VM.
Thanks again, I really appreciate this!
Best regards
Holger

You’ll have a lot more options to install any program you want that can run in docker or ubuntu now versus just the stock addons this way.

If there’s an addon you wanted to use that’s not available now, if you get stuck, you can post here and hopefully I can link a guide or let you know what I used instead.

1 Like

Go the Proxmox route if this is an option for you. A lot more flexible than any other route mentioned. Why? Because you can run Frigate in a KVM or run it as LXC plus HAOS in a KVM with ability to expand storage in less than a min. Then you have the ability to run HAOS with add-ons or install add-on outside HAOS as LXCs/KVMs. The speed of a KVM/LXC today is virtually on a par with BM.

One more thing. If your Proxmox host is not underpowered running Frigate in Proxmox is not an issue.

You can also experiment with Shinobi which is a more polished NVR with options for AI/ML solutions.

Using Proxmox you can run Frigate and Shinobi side-by-side to experiment until you decide which one to drop.

1 Like