WTH Can't I mount a Remote Share (NAS, SMB, NFS, etc) in HAOS?

This is, how it works for me, using OMV NAS.

Yeah, but that’s SMB. I don’t want SMB on my network.

Nice to see this is still going on.

I tried to do this years ago on HassOS/haos with NFS but there was no kernel support, I tired messing round with udev but it loads too fast so I ended up using CIFS.

Not sure why some people can’t get it going it’s a easy process.

I’ve been doing this for a year or so… It’s pretty much the same as the same as sean’s method but I do use a manual process each time HAOS(not HA) reboots.

I have multiple isolated networks running HA for dev, testing and prod.

For my production HA environment at home I only update it on the last update of every month which means a HAOS restart. I don’t care doing this process once a month manually.

Process is ensure frigate, terminal addon(not 22222 addon) are set to manual start. When HAOS boots up after a cold start:

  • Login to to container at port 22222
  • run bash script in /mnt/data/
    • type: bash /mnt/data/cifs_mount.sh

Here’s the script:

#!/bin/bash                                                                                                  
                                                                                                             
                                                                                                               
#for x in $(docker ps --format "table {{.ID}}\t {{.Names}}" | grep -E "ssh|frigate" | awk '{ print $1 }'); do  
                                                                                                               
mount -t cifs -o username=user,domain=dom,password=pass //1.1.1.1/NVR_Storage /mnt/data/supervisor/media         
                          
if [[ $? -eq 0 ]]; then   
                                                                                        
        df -h | grep media                                                              
                                                                                        
        #CIFSCONTAINERS="hassio_cli addon_ccab4aaf_frigate addon_core_ssh homeassistant"
        CIFSCONTAINERS="homeassistant"
                                     
        for x in $CIFSCONTAINERS ; do
                docker restart $x
        done
                                       
else                                   
                                       
        echo "Error mounting NVR mount"
  
fi

You can uncomment the $CIFSCONTAINERS to include the container you want to autostart with the script or use the commented for loop to get container IDs.

Otherwise go back to HA UI and manually start the addons that you’ve configured to use /media

Does that help?

1 Like

I have tried multiple methods to mount a CIFS share and none have worked. When will devs realise the importance of this for so many uses and users?

1 Like

They KNOW there’s plenty of us wanting it.
They just seem to NOT want it. Or something. Who knows?

I don’t think it’s anything malicious, or even intentional. If you’ve set up a development environment for HA, you don’t need this feature. You’ve probably got a dozen other ways to do this. It’s simply not a priority.

It’s hard to motivate someone to volunteer their time to work on something for which they simply don’t see the need. Again, nothing against any HA devs. It’s just the way open source works. We users just hope someone comes along who takes pride in developing a system that works for everyone, even those who don’t live and breathe this stuff daily.

Que? How, please?

I honestly don’t recall. Every time I read someone explaining how easy it was for them, I give up about three words in. My HA environment just isn’t that complex.

I chose HA because it was billed as a product which runs on a standalone, simple hardware platform like the RPi. Apparently that’s not how most of the “power users” run it. I spent a career maintaining server farms. I don’t need to do that in my retirement. If it’s not part of the HA OS and HA Core package, I’m not going there. I want to have a life outside of supporting HA.

This is being worked on, they hinted at it in the forum post for the HA OS 10.0 blog

1 Like

That would be great! I thought I saw something which hinted at this, but I didn’t dare hope. :crossed_fingers:

You can mount smb or nfs.

If you cant get udev to work via USB. put it in manually. If you say you don’t want to, you’re probably afraid of CLI terminals.

It’s seriously not that hard, you’re just afraid of linux and want to push a button.

It is, but its not in the gui. A life outside of supporting HA… literally set it up and forget about it. Not sure what you’re going on about supporting. You set it up and you’re done. Take the 5 minutes to go plug a monitor and keyboard into yiur ha instance or use the ssh 22222 add-on configurator from Adam Outlier, and put the mount rule in place and never look at it again.

Not the first when using a VM and tried the second which did not work.

There’s a preview here Common Tasks - Operating System - Home Assistant

1 Like

using a VM… attatch the storage to the machine with your hypervisor. then its standard linux mounting

using docker, map it with your docker compose. then its standard linux mounting

using ha os plug in your usb or sata, then its standard linux mounting

for cifs & nfs, its standard linux mounting for all those options

if you want to mount anything, go to terminal.

the limitation is you have to mount to a directory under one of the paths that ha core maps in its container. ie /config /share or /media

Wow, that sounds fantastic! Is that in HAOS 10.2? Can’t wait to see it.

Thank you, but this FR was for a remote share for HAOS, not a local USB or SATA drive or other OS. It was nice to summarize all those options in one post, and I appreciate it, but I don’t want anyone to misunderstand and think those are solutions to the original FR.

as I said. its standard linux mount commands whether its usb, sata, cifs, smb, nfs

mount -t nfs3 192.168.1.5:/MOVIES /media/MOVIES

by options I meant VM, docker, or HAOS… same as I listed for direct attatched hardware

Good news everyone!

2 Likes

Shh don’t spoil it

2 Likes

Ooooo, Nice!! I’m gonna be all over that version. I might even install the (gasp!) .0 release this month.

This is a real, solid improvement. Ditto for the database improvements we’ve been seeing. It’s always good to see someone is still working on core functionality, not just tweaking the UI or adding shiny new features. You’ve restored my faith in humanity. Or, at least, the ones who code open-source projects.

I wont’ tell :wink: