[New Addon] Samba NAS. (Mount external disk and share it )

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face:

It is with great pleasure that I announce the availability of version 9.5.1-nas1 of this add-on.

The most exciting new feature is :partying_face:THE POSSIBILITY TO MOUNT DISKS DIRECTLY FROM THE HOST:partying_face: so that they are visible also to other addons and to the Media Browser.

The price for the functionality is to have a HassOS installation (it doesn’t work with other installation types) and to have configured SSH access on port 22222 of the host.

WARNING: It’s an experimental feature, even if I’ve tested it for more than a month without having problems it could cause corruption in the data and in the installation.

WARNING: It is necessary to pass the private key ssh in the configuration of the add-on so eye to security.

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face:

2 Likes

lol ! excellent work!

its exactly what i was expected in my post above…lol… continue your good work, thanks!

It havent try yet because as i said it already works with the ssh 22222 addon and your addon…

I have ordered a NUC I5 so i will migrate soon and perhaps try your new release!

thanks

Hello,

i have try your addon but i get this error :

[01:31:28] INFO: Protection Mode is false
[01:31:29] INFO: MoreDisk option found!
[01:31:29] INFO: MediaLibrary option found!
Warning: Permanently added '[192.168.1.XX]:22222' (ECDSA) to the list of known hosts.

[email protected]: Permission denied (publickey).

[cont-init.d] automount.sh: exited 255.
[cont-finish.d] executing container finish scripts..

the host 192.168.1.XX:22222 is not add to know_hosts file and nothing is mount because of the permission denied.

any idea please?

If the ip is the right ip of your hassos installation this mean the private key is wrong.

You must use your id_rsa not the id_rsa.pub. Check if the key start with -----BEGIN RSA PRIVATE KEY-----

Second option you use the wrong id. If your pc is Linux or MacOS try the key:

$ ssh -v -i ~/.ssh/id_rsa \
[email protected]

1 Like

So I used a rpi3 to format a 3.7tb hard drive. Then removed the external har drive and plugged into my pi 4 running this add on. The add on runs fine, but I don’t see the external. I figure I need to add to the configuration but what exactly? Thank you

youre right, in the hassos addon 22222 i used the wrong key.

i try again from the begin and now your addon work great thanks!

@Lucio_Tarantino Thank you for your addon! I just started looking into the new medialibrary option and realized that you only support RSA keys (as the filename id_rsa is hardcoded in automount.sh. Would you consider making the filename/key type configurable (so as to allow id_ed25519 keys, for example)? Or would you be open to accepting a PR for that?

The ‘medialibrary’ option is in its first version and definitely needs improvement.
Feel free to propose a PR for it. I will be happy to accept it.

Hello,

I read through the previous messages but I am running into some issues. I installed the add-on on Debian 11 and it runs fins but I am seeing data in all shares.

config maps ok to /usr/share/hassio/homeassistant
backup maps ok to /usr/share/hassio/backup
media maps ok to /usr/share/hassio/media

but the addons folder is empty and I seem to be unable to add other folders.

I tried to add my /home path in the moredisk section but mapping does not seem to work. Any idea on how I could troubleshoot ?

thanks,

Charlie

The addon is for hassos if you are on Debian 11 you don’t need it. Simply configure samba to share the disks you will.

L.

thank you Lucio, I added Samba at the OS level.

Charlie

Hi,

I am having issues getting the “medialibrary” function to work. SSH on port 22222 is up and running and I can connect via Putty on my windows pc.

I get the following error. Any ideas?

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] automount.sh: executing... 
[18:36:54] INFO: Protection Mode is false
[18:36:54] INFO: MoreDisk option found!
[18:36:55] INFO: MediaLibrary option found!
Warning: Permanently added '[192.168.18.100]:22222' (ECDSA) to the list of known hosts.
Load key "/root/.ssh/id_rsa": invalid format
[email protected]: Permission denied (publickey).
[cont-init.d] automount.sh: exited 255.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] mqtt.sh: executing... 
[18:37:09] INFO: MQTT cleanup.
s6-maximumtime: warning: unable to wait for child process: Operation timed out
[cont-finish.d] mqtt.sh: exited 99.
[cont-finish.d] umount.sh: executing... 
[18:37:14] INFO: Done.
[cont-finish.d] umount.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Load key “/root/.ssh/id_rsa”: invalid format

You have provided a wrong private key in the config.

You must use your id_rsa not the id_rsa.pub.
Check if the key start with -----BEGIN RSA PRIVATE KEY-----

L.

Hello,
Just installed the addon and it woks great.
Only one thing is weird, I have 2 drives connected to usb ports, and in the log I see both get Mounted with success.
But When I browse to it through SMB, I only see one.
And even weirder I see the name of the first drive but in fact the content is from the second drive

[15:46:53] INFO: Protection Mode is false
[15:46:53] INFO: MoreDisk option found!
[15:46:53] INFO: MediaLibrary disabled in config. Disk are mounted only for this addon!
[15:46:53] INFO: More Disks mounting… My-Book
Drive-2
[15:46:53] INFO: Mount My-Book
FUSE exfat 1.3.0
[15:46:54] INFO: Success!
[15:46:54] INFO: Mount Drive-2
[15:46:55] INFO: Success!

Thanks

Fixed in 9.5.1-nas3. Please upgrade.

L.

Damn!
That was fast… :ok_hand:
Tested and working.

Thanks!

Having an odd issue with mounting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] automount.sh: executing... 
[14:15:55] INFO: Protection Mode is false
[14:15:56] INFO: MoreDisk option found!
[14:15:56] INFO: MediaLibrary option found!
Warning: Permanently added '[192.168.100.2]:22222' (ECDSA) to the list of known hosts.
Tue Nov  2 14:15:57 CET 2021
[14:15:57] INFO: SSH connection to 192.168.100.2:22222 OK
[14:15:57] INFO: Available Disk Labels:
 External
[14:15:57] INFO: More Disks mounting.. External
[14:15:57] INFO: Mount External
mount: mounting /dev/disk/by-label/External on /mnt/data/supervisor/media/External failed: No such file or directory
[14:15:57] WARNING: Host Mount Fail!
[14:16:33] INFO: Success!
[cont-init.d] automount.sh: exited 0.

If I manually make missing directory the error changes to “Permission denied”, regardless of permissions on the directory.
Using an ext4 disc via USB in a pi4, and accessing from Linux.
Any ideas?

Not enough information. I need to know your addon config ( mask sensible information like password, key etc ) and your environment ( hw, hassos version etc etc ).
I also ask to open a issue on Issues · dianlight/hassio-addons · GitHub is a better place to trace it.

L.

1 Like

Ok, will move it there.
Thanks!

Hello,

I see that the addon creates entities for the mounted drives (Available, Used, %used…) but they all remain as unknown.
What am I doing wrong?

Thanks