Where do I find my external hdd? Hassio knows it is there but


It is possible to access the drives, however it is not trivial.
Mind if I ask how you are planning to access it?
I can try to explain but I want to understand the protocol (FTP? Terminal access? Samba?)


I need to store a fairly large number of photographs for around 24 hours. I want to have a camera on the end of my harvesting robot arm to take pictures of each plant at 10 minute intervals. I have 300 head of lettuce on each wall but that will grow to around 600. I am going to use machine vision to inspect each plant for deficiencies in water/nutrients/light. Then the photographs will be assembled into a timelapse video of the plant’s growth.

I was going to use a Pi Zero with a Picam to take the photos and then route them via MQTT to the RPi3 running Hassio. The USB HDD is attached to the RPi3. I have tried using cp to just transfer the files directly, but kept running into file permission problems.

I can’t seem to get a SAMBA share to work either. Transferring them to a computer on my network is an option but I would prefer a self contained solution.

I don’t really have a preference for how it is done, just get it done reliably. The traffic volume is fairly low so speed is not really an issue. The MQTT broker is already handling the data from the temperature, humidity, and CO2 sensors.

1 Like

Ok, got it.
Why is the drive spinning up then?

Because it has power? Because the system is scanning for devices?

I don’t know. I don’t use hassio because of the many limitations it has.

1 Like

You may have something there, if the system does a port scan, then the HDD may just be doing a spin-up anticipating a data request.

Hi! I just realized that I did not post the reply last time :frowning: sorry…Here you go!

Hi! First of all wow, this is a very impressive project!
Judging from the description I would assume that you know the basics of Linux and Hass.IO as well and you would also be able to use simple git operations. Let me know if you need details in these topics and I will explain more.

So the drive is accessed by the Linux system running on your pi, that is why the drive spins up. Hass.IO add-ons can access the drives if they are explicitly asking for it. This is the good news part.
The bad news are that most add-ons will not do this because most people are probably not using external hard drives with their home assistant installs.

So the way you have to handle this is the following:

  1. fork the samba add-on into your GitHub account: https://github.com/home-assistant/hassio-addons/tree/master/samba
  2. change the config.json file of your fork and add your HDD to the devices section: “devices”: ["/dev/sda1:/dev/sda1:rwm"] (for an example look here:
  3. add the privileged section as well from the example above, the hass.io system will need this to access the drive
  4. create the /share/mnt directory and mount the filesystem for this we will use

Putting it all together I realized that this is quite complicated. Let me know if you understand what I’ve wrote.
I actually started to create the fork I’ve mentioned above but got quite busy :frowning:
I’ll try to work it out for you maybe in the near future however I can’t guarantee anytime soon. I’d suggest you to contact @frenck, who makes all these amazin community addons for hass.io, maybe he has something on his roadmap that supports accesing hard drives connected. Frenck, can you help us out here?



Hey there, IM looking for this solution but I’m not sure about step 4.
what exactly do I need to do, and where?

Best Wonkavator

You need to use the terminal or SSH add-on. Log into the computer running HassOS and there create the directory and mount the drive, see this for some hints: https://youtu.be/PWo1xkE0sds

Hm i see, so everytime HassIO is restarting I need to mount it manually?

You can set up the add-on to run the mount commands every time it starts

@bboti86 Thank you for the steps, i am stuck in identifying the correct partition of my external hard disk.

Shows up as sda: sda2 < sda5 >
My config.json has been mod to /dev/sda1:/dev/sda1:rwm

Please guide in setting this up :slight_smile:

Run lsblk
That is the best tool for finding the partition.

I am currently on running on hassos and the command is not supported :frowning:

I believe that you can just go to hass.io -> system -> hardware and you should see your drive there

Hi, first of all, thanks for your help and sorry for my English.
I try to mount my HDD following your instructions and when I’ve done the point 4 in SSH I’ve obtained this error “mount: mounting /dev/sda1 on /share/mnt failed: No such file or directory”
I see the drive in hass.io -> system -> hardware
I create the addon for SAMBA modifying the file config.jason with

  "devices": ["/dev/sda1:/dev/sda1:rwm"],
  "full_access": true,

I try to do this How to mount a USB Thumb Drive (External Storage) in HASSIO? and Add-Ons?
and put in “run.sh” the instruction “mount” .

But, the same result… Can you help me?
Thanks, again

Please make sure you check that the directory that you are trying to mount to exists. This error probably indicates that is not the case.

try to mount on /mnt not on /share/mnt

Hi. I’m see the disk in Hardware

In the file config.jason:

In the terminal ssh. I try to mount the drive and the result is the same (the directory exist). If I search the disk then I can’t find it.

I’m looking for your response

finally I had time to take a closer look on your screenshots.
The mount command tells you that the /dev/sda1 directory does not exist.
The udevd lines in you dmesg output hints that even the kernel was not able to access your drive, it did show up when linux was booting and that is why you see it in hass.io-s interface.
Could you give it a try with a different hard drive or flash drive?


Thanks for your help. I’ve tried with another HD and with a flash drive, and the result is the same. Probably I’ll be doing some wrong… but I don’t know what.
This the last test that I’ve done: