USB storage plugged into the HA host to be available for add ons and HA as /usb/<name>

I would like the ability to have inserted USB storage devices available throughout HA infrastructure.

e.g.:
/addons
/media
/share
/ssl
/usb

Under /usb the found volumes will then be mounted.
Using e.g. the name of the volume or some other method - i am not that tech in linux-

so you would get 2 usb sticks.
stick 1: named “Photos”
stick 2: named “Games”
/addons
/media
/share
/ssl
/usb/Photos
/usb/Games

I hope my explanation is clear.

Kind regards, MrMonkE

You can already do this with /media no?

Those you already listed are shared already.

They are all on the same device. The DATA disk. The point is to extend storage, not move all the DATA. That’s what that does right?

the point of the example was to show the existing ones in relation to the new one i wish for, the bold ones.

The reason i suggested it under the /usb instead of under /media is also that then add-ons can decide if they want to be exposed to /usb/Photos. If you would mount USB under /media you don’t have that choice.

It’s about hot pluggable USB sticks. e.g. a movie on it or photo’s or other data.

But i guess /media/usb/ would work too. Perhaps even better.

Music and videos are on my external hard drive, the Media dir already mounts external devices

these are the shared folders between the host system and Home assistant.
map:

  • config:rw
  • ssl:rw
  • addons:rw
  • share:rw
  • backup:rw
  • media:rw

O_O

Well… don’t i look foolish :confused:
I understand better now what you were saying earlier.

Gonna try this now. (I wonder if i just had wrong filesystem previously and thought there was no supprt for it… assumptions)

Thank you

happens to the best of us. I manage to make myself look foolish most days :rofl:

Mount Usb in HA.
That’s a good place to look if doesn’t work out of the box. I thought they updated it, but I am not really sure as I used that thread ages ago.

Well… i tried FAT and FAT32.

It doesn’t mount anywhere and they don’t show up.
It could be i broke something in the past when I tried mounting /dev/sda to /media/usb onetime.
might need reinstall OS.

This was the command i did back then.
mount /dev/sda /mnt/data/supervisor/media/usb2 rw,fmask=0022,dmaski=0022,codepage=437,iocharset=utf8,shortnae=mixed,errors=remount-ro 0 0

But that will not be there after a reboot right? That will have been gone after the 1st full reboot of the hardware.

unf… trying this now.

Example configuration.yaml entry

usb:

Still nothing.
I now have aa test tsick with 3 partitions, FAT, FAT32 and one NTFS. None of them bite so i don’t think that is it.

Log from supervisor sees it though:
22-08-06 15:09:49 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/bus/usb/001/012 - None
22-08-06 15:09:50 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/sg0 - None
22-08-06 15:09:50 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/bsg/3:0:0:0 - None
22-08-06 15:09:51 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/sda - /dev/disk/by-id/usb-_Freecom_Databar_07A91C0795C725E4-0:0
22-08-06 15:09:51 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/sda1 - /dev/disk/by-id/usb-_Freecom_Databar_07A91C0795C725E4-0:0-part1
22-08-06 15:09:51 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/sda2 - /dev/disk/by-id/usb-_Freecom_Databar_07A91C0795C725E4-0:0-part2
22-08-06 15:09:51 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/sda3 - /dev/disk/by-id/usb-_Freecom_Databar_07A91C0795C725E4-0:0-part3

Have a read through the other thread. The post I linked to has a link to up to date info. I did mine ages ago by changing the udev rules

yeah i read that also a long time ago but i felt it was a little too complex for me.
Maybe i should just bite the bullet.
But from what said earlier they should just show up.
But i will look trough it again. tx

I read it. Yeah… i don’t understand what it does.
So i rather not touch it. Sounds like something that can go horribly wrong :slight_smile:

Edit: Okay i bit the bullet and did the udev thing. The one i picked worked it seems.
Gonna do one more shutdown and then an upgrade see if the behaviout persist.