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

Native Linux fs are the best. I use ext4 for all except a single disk for media that is ntfs ( It was a test but works).
Now in the addon logs there the supported fs for your platform.

Hello. I installed the latest version (10.0.0-nas7) on a PC (running proxmox + Home Asst OS). I am trying to share an ntfs partition. I get the msgs:

Supported fs: ext3 ext2 ext4 squashfs vfat msdos iso9660 fuseblk btrfs
modprobe: module ntfs3 not found in modules.dep

and then it fails to mount it.

Serving cifs is the last component I need and then I can ditch proxmox and run Home Assistant on bare metal, but so far no solution to serving cifs from a Home Assistant addon.

Any help?

Noice. That was it.

Now itā€™s working flawlessly. Thank you for the support.

Iā€™m not sure what Iā€™m supposed to do to make the addon find my external disk and its two partitions?

I can see them both in Configuration > System > Hardware > All Hardware. They shows up as dev/sdb1 and dev/sdb2. The two partitions are formatted as ext4 using an Ubuntu Live USB.

But the addon doesnā€™t find anything to mount.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Samba NAS
 Expose Home Assistant disc with SMB/CIFS
-----------------------------------------------------------
 Add-on version: 10.0.0-nas7
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.2.2
 Home Assistant Supervisor: 2023.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-automount: starting
[16:06:43] INFO: Protection Mode is false
[16:06:44] INFO: MoreDisk or Automount option found!
---------------------------------------------------
Supported fs: ext3 ext2 ext4 squashfs vfat msdos f2fs fuseblk ntfs3 exfat btrfs xfs
Supported fusefs: 
---------------------------------------------------
[16:06:44] INFO: MediaLibrary disabled in config. Disk are mounted only for this addon!
---------------------------------------------------
[16:06:44] INFO: No Disk with labels.
---------------------------------------------------
[16:06:44] INFO: No MoreDisks to mount
s6-rc: info: service init-automount successfully started
s6-rc: info: service init-samba: starting
[16:06:45] INFO: Hostname: homeassistant
[16:06:45] INFO: Interfaces: eth0 wlan0 
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/private/passdb.tdb file.
Added user infuse.
---------------------------------------------------
[16:06:47] INFO: Exposed Disks Summary:
[config]                path = /config
[addons]                path = /addons
[ssl]                   path = /ssl
[share]                 path = /share
[backup]                path = /backup
[media]                 path = /media
---------------------------------------------------
s6-rc: info: service init-samba successfully started
s6-rc: info: service init-mqtt: starting
s6-rc: info: service wsdd: starting
s6-rc: info: service smbd: starting
s6-rc: info: service nmbd: starting
s6-rc: info: service avahi: starting
s6-rc: info: service smbd successfully started
s6-rc: info: service nmbd successfully started
s6-rc: info: service wsdd successfully started
s6-rc: info: service avahi successfully started
[16:06:47] INFO: Starting the AVAHI for homeassistant...
Waiting for daemon ...
[16:06:47] INFO: Starting the wsdd daemon for WORKGROUP/homeassistant...
[16:06:47] INFO: Interfaces: -i eth0 -i wlan0 
[16:06:48] ERROR: Got unexpected response from the API: Service not enabled
2023-02-07 16:06:48,434:wsdd INFO(pid 278): using pre-defined UUID cb6a33a0-b841-531d-a34e-09ecec492eb1
2023-02-07 16:06:48,439:wsdd INFO(pid 278): joined multicast group ('239.255.255.250', 3702) on 192.168.1.202%eth0
2023-02-07 16:06:48,452:wsdd INFO(pid 278): scheduling Hello message via eth0 to ('239.255.255.250', 3702)
2023-02-07 16:06:48,502:wsdd INFO(pid 278): joined multicast group ('ff02::c', 3702, 22364, 2) on fe80::7779:e72f:6c21:56f7%eth0
2023-02-07 16:06:48,504:wsdd INFO(pid 278): scheduling Hello message via eth0 to ('ff02::c', 3702, 22364, 2)
[16:06:49] WARNING: No MQTT Server found. Homeassistant integration can't work!
s6-rc: info: service init-mqtt successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[16:06:49] WARNING: No MQTT config with mqtt_enable option!
nmbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
smbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
INFO: Profiling support unavailable in this build.
*****
Samba name server HOMEASSISTANT is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.202
*****

Edit: I re-partitioned the disk again using an Ubuntu USB but added lables and that solved the problem. When the partitions had lables they were found and mounted.

Probably you donā€™t set a labels on the partitions so [16:06:44] INFO: No Disk with labels.
You can mount partitions by id ( you find also in Configuration > System > Hardware > All Hardware near sdb1 and sdb2) setting parameter moredisks and using the format id:.......
Anoter option is to set partition label on disks ( Restart with Ubuntu Live USB and use e2label or other programs ).

L.

What a great tool, it works great for me. Now step 2 will be the added media files showing in home assistant media section. Any walkthroughs for this part?

Thanks in advance!

should it be like this? I can not get it to work with my 16 TB HDD

moredisks:
  - /dev/disk/by-id/usb-Seagate_Expansion_HDD_00000000NAC6DSQB-0:0-part1

is there an option to stop the hdd spinning after a while?

The newest version(10.0.0-nas7) has fixed it. You can leave it as default automount: true and the addon should start up with no issues.

I know that the documentation is not from real men but a peek wouldnā€™t hurt.

Use id:ā€¦ if you referring a disk by id not the device block path.

The spin down option will release in the next coming version but is needed only for half buggy usb adapters that ignores usb2 sleep commands ( default on when no disk activity is use ) but only if supports ATA spin down register.

L.

This addon is a life saver. Thanks for you hard work on this.
Forgive my dumb question as Iā€™m new to modern smb, but anyone got any tips to speed up samba on mac or windows. I can iperf 1 gigabit speeds but I canā€™t crack 120 megabits when I transfer via smb.

There are many factors that can influence the cifs protocol. For starting you can check this points:

  • 1gbit vs 120mbit. Are you sure? Iperf report Mbps but often file transfer are MBps that are mega bytes not bits.
  • you test iperf between client and host or client and sambanas? On some architecture ( arm often ) docker is not well optimized in the network so the difference can be the internal touting from host to docker vm. Also the internal NAT can slow the transfer.
  • you use iperf or iperf3. Result can be very different.
  • your client is a Windows PC or another system. If you use Linux or MacOS check that you mount with smb3 protocol or smb2.
  • if you set compatibility_mode on sambanas the protocol is the old NT implementation. If you donā€™t need remove.
  • have you check your disk speed? Is usb2 or usb3?

L

Yeah, iperf can be a bit of a mess if you donā€™t understand it.

  • Iā€™m using the iperf3 server addon for hassos so it should have the same network overhead as its also in docker. Iperf3 shows near gigabit transfer (as its over a Cat5e cable), and i calculated the sambanas speed by taking the 15MB/s speed Iā€™m getting (multiplied it by 8, so 120mbps).
  • The speed was to an nvme drive inside my x86 Hassos machine, so I donā€™t think the storage or system is the bottleneck. Though I do have a usb3 drive plugged in and sharing, but the copies werenā€™t using that drive, and when they are their a little slower.
  • Iā€™ve tried a couple clients windows, windows vm, mac and a linux machine (all x86 and M1).
  • Iā€™m not using compatibility_mode.
  • Iā€™ve checked via smbutil and its running at smb3, (also Iā€™ve disabled signing on my mac client machines to help speed things up).

The speed isnā€™t a dealbreaker, I was just expecting more. I thought there might be some smb.conf changes that could speed things up I could change in your interface.

Just out of curiosity what kind of speeds are people able to get?

Welp. Donā€™t think it was samba, looks like something made my cat5e cable go bad, and iperf3 (wasnā€™t showing the packet loss in the tests I was running). Switched the cable and now the packet loss is down to 0 and speeds are back to max. Thanks for letting me waste your time.

Ok. Iā€™ve finally reformatted my drive using the Linux live CD with the Gparted program. It wasnā€™t quite as simple since where my mini pc is placed does not have anything connected to except power and ethernet cable. I needed a monitor and keyboard at the minimum to reformat the drive.

Any hoot, itā€™s working. Can see my drive now. One thing to keep in mind is to type in the interfaces under the configuration. It is set to none by default. Which will work but it is slower to navigate to different root folders if you donā€™t specify one. At least for my case. Didnā€™t understand why it was so for a few days until Iā€™ve added the below.

This is mine. Yours will be different.

interfaces:
  - enp3s0

Is ok to delete the lost+found folder?

How can I share different folders? And how can I set the user premission.
This dosnā€™t work:

- share: backup
  disabled: false
  users:
    - backupuser
    - admin
- share: backup/test
  disabled: false
  users:
    - admin

Is it possible to share the folder ā€œbackup/testā€ under the name ā€œbackup_homeassistantā€
so i can use it linke: 192.168.0.20/backup_homeassistant

The short answer to your question is ā€œYou canā€™tā€.
Thatā€™s not what the addon was meant for.

The addon is meant to expose the ā€œstandardā€ homeassistant folders and additionally other external drives. In your case it is a subfolder of a standard ā€œbackupā€ folder. Also the ACLs for SAMBA/CIFS are not on the folders but on the shares. Therefore you cannot have a folder of a Share with different permissions than a Share itself. Finally you cannot have shares with / in the name.

What you can do with the addon is give admin permissions to backup or just crack it and then attach a new disk and call it backup_homeassistant

1 Like

Hi! Iā€™m trying to add my external SSD through Samba NAS addon but Iā€™m not able, the ssd is in EXT4 format but de list does not detected it.

I want to became the rpi4 to an plex media server with transmission server torrent.

hello, i am running ha in proxmox and I added a new disk.

how can I install ā€œmodprobe: module ntfs3 not found in modules.depā€

this is an ntfs partioned disk

I want to mount it in order to be in the media folder but I get the following error:

`modprobe: module ntfs3 not found in modules.dep`
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Samba NAS
 Expose Home Assistant disc with SMB/CIFS
-----------------------------------------------------------
 Add-on version: 10.0.0-nas8
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / qemux86-64)
 Home Assistant Core: 2023.3.6
 Home Assistant Supervisor: 2023.03.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-automount: starting
[20:01:01] INFO: Protection Mode is false
[20:01:01] INFO: MoreDisk or Automount option found!
modprobe: module ntfs3 not found in modules.dep
[20:01:01] WARNING: ntfs3 module not available!
modprobe: module exfat not found in modules.dep
[20:01:01] WARNING: exfat module not available!
modprobe: module xfs not found in modules.dep
[20:01:01] WARNING: xfs module not available!
---------------------------------------------------
Supported fs: ext3 ext2 ext4 squashfs vfat msdos iso9660 fuseblk btrfs
Supported fusefs: 
---------------------------------------------------
[20:01:01] INFO: MediaLibrary disabled in config. Disk are mounted only for this addon!
---------------------------------------------------
[20:01:01] INFO: No Disk with labels.
---------------------------------------------------
[20:01:01] INFO: MoreDisks to mount:
	/dev/sdb
	/mnt/sdb1/share1
	/mnt/share1
	/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
[20:01:01] WARNING: Disk with label /dev/sdb not found.
[20:01:01] WARNING: Disk with label /mnt/sdb1/share1 not found.
[20:01:01] WARNING: Disk with label /mnt/share1 not found.
[20:01:01] WARNING: Disk with label /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1 not found.
s6-rc: info: service init-automount successfully started
s6-rc: info: service init-smartd: starting
s6-rc: info: service init-samba: starting

in ha hardware I can see the disk

sdb
/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
Subsystem:
block
Device path:
/dev/sdb
ID:
/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
Attributes:
DEVLINKS: >-
  /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
  /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1
DEVNAME: /dev/sdb
DEVPATH: /devices/pci0000:00/0000:00:05.0/virtio1/host0/target0:0:0/0:0:0:1/block/sdb
DEVTYPE: disk
DISKSEQ: '13'
ID_BUS: scsi
ID_MODEL: QEMU_HARDDISK
ID_MODEL_ENC: QEMU\x20HARDDISK\x20\x20\x20
ID_PATH: pci-0000:00:05.0-scsi-0:0:0:1
ID_PATH_TAG: pci-0000_00_05_0-scsi-0_0_0_1
ID_REVISION: 2.5+
ID_SCSI: '1'
ID_SERIAL: 0QEMU_QEMU_HARDDISK_drive-scsi1
ID_SERIAL_SHORT: drive-scsi1
ID_TYPE: disk
ID_VENDOR: QEMU
ID_VENDOR_ENC: QEMU\x20\x20\x20\x20
MAJOR: '8'
MINOR: '16'
SUBSYSTEM: block
TAGS: ':systemd:'
USEC_INITIALIZED: '2884232'

Unable to add timeMachine: true to configuration

Hi

I am trying to add timemachine: true to the configuration but there is no option under the UI and if I click 3 dots to edit in yaml it wont let me do anything. How else can I add it?

Can anyone help me with this errors:

modprobe: module ntfs3 not found in modules.dep
[11:55:02] WARNING: ntfs3 module not available!
modprobe: module exfat not found in modules.dep
[11:55:02] WARNING: exfat module not available!
modprobe: module xfs not found in modules.dep
[11:55:02] WARNING: xfs module not available!

I have xfs and ext4 hard drives? In documentation I found that boath fs are supported?

Do I need add disk to moredisks: []? If yes how?