[SOLVED] Mount USB drive in Hassio to be used on the Media Folder with udev customization

Correction for #3: “Import from USB” has been removed from the UI ( I think since Version 2023). You will need to use the cli for it now. Plug in the USB “CONFIG” drive, open a ssh (or use “Terminal” in HA) and run the following command:
**ha os import** (without quotes).
Continue with #4.

I’m on 2023.8.2 and the option in the UI is still there

I’ve successfully made this work - but now I’m confused as to how I might allow various addons to have access. Calibre and qBittorrent are the first two I’ve tried but I don’t understand how the root file system relates to whats available in the docker containers.


Its under /media/{name of drive} for addons


New question - under my previous pi/ha core setup I edited my fstab file to ensure that the media drive was always see at sdb - does it make sense to do that while using udev

Hello,
Sorry but i’ve not skill :slight_smile:
it’s possible do this procedure with formatted fat32 usbkey?

-I have labled Config the usbkey,
-i put inside a folder with a file named 80-mount-usb-to-media-by-label.rules
-In Ha i,ve import usb data
-unplug usb
-connect hdd usb in the same port and reboot.
It’s all correct?
In media I find nothing :frowning:

why don you use the “Samba NAS” AddOn https://github.com/dianlight/hassio-addons/tree/master/sambanas

it work great and simple to configure.

Just put the exact name like “data” or “Data” (case sensitive) of your HDD label, and it will be auto mount in /media/

1 Like

I just did this, however the mount seems to break if Frigate loads before Samba NAS, because Samba sees that the folder already exists and thus throws an error?

i have the same message because the folder already exist, but the mount work, its more a warning than an error for me.

i followed this tutorial/guide but can’t get it working. i have a EXT4 drive i want to connect. i am importing the udev rules file fine, i get the confirmation in logs. however in SSH i do not have a /etc/udev folder or file.
also, in my HAOS dedicated machine (not virtual!) i do not have anything in the /mnt folder. in the root of the system there is the empty /mnt folder, and also the media folder. I don’t know if this means anything. maybe no one here is running HAOS directly?

I do have the drive listed in hardware though…
image

EDIT: after quite some hours i got it working, turned out to be a spelling mistake in the tutorial i followed.

Thank you very much for the detailed help!
I tried following @promithius instructions, but I got stuck at the last step. I could load the configuration from the USB stick (confirmed in the log), I unplugged the USB stick and plugged in my NTFS formatted SSD. The problem is that I don’t see the SSD in the Media section. I tried rebooting both HA and the Raspberry, neither helped.
I noticed in the Supervisor log that it is somehow seeing the SSD:


But the media section stays as before:

Could anyone please help me figure this out?

I tried formatting the drive to EXT4, repeating all the steps and still no folder showing up in my “Media” section.

For me same thing, i tried to mount it via ssh just to test it. It always said Fileformat unkown on NTFS and EXFAT

Thanks for the tip. I labelled the drive as “data” and it shows up when I remote into the drive. However the recordings are still being stored in media/frigate. It does not get auto mounted into media. Do I have to do anything else?

Just use the Samba NAS Addon from this repository: GitHub - dianlight/hassio-addons: Hassio.io
Configure it with

  • username
  • password
  • automount ON
  • medialibrary enable: true

Format your USB drive EXT4 and name it frigate, plug it in and start the Samba addon.
For me it mounts the drive as /media/FRIGATE ( no clue why all capitals) but I fixed that with a /media/frigate symlink to /media/FRIGATE

Start frigate and it will fill the USB drive.
Also no problems when restarting.

1 Like

Thx!!!
Finally i got it working with you´re description! My flaw was that i didn`t had EXT4 and you´re solution is by far the simpelst way to get it done!

I have the same issue where it is creating the folder as media/FRIGATE. How do you go about creating a “symlink” ? so that it is lower case

Sorry noob here

Thanks

Use SSH to login HA cli (or use Terminal & SSH addon)
type:
ln -s /media/FRIGATE /media/frigate

to check type:
cd /media
and then
ls
you should see two folders now FRIGATE and frigate

The lowercase folder is just a symbolic or soft link to the uppercase

1 Like

Worked like a charm. Thank you

How do we delete these udev rules?

Its a dirty solution but it works for me.

this worked for me for the samba-share add-on with my ext4 drive, but frigate shows 233gb(or so) in use when starting to use this drive, even though it was freshly formatted.
anyone else had this?