dianlight / hassio-addons

Hassio.io
MIT License
139 stars 48 forks source link

Samba NAS Share Add-on Reports Incorrect Disk Space Usage for Multiple Disks #242

Closed Lucho99se closed 2 months ago

Lucho99se commented 4 months ago

Addon

SambaNAS

Description

Hello,

I am experiencing an issue with the Samba NAS Share add-on in Home Assistant OS where the available disk space is incorrectly reported when multiple disks are mounted. I have two 1TB disks mounted, but the add-on appears to combine their capacities incorrectly. Here are the details:

First Disk: /media/DISCO1 (Size: 1.8T, Used: 349.3G, Available: 1.5T, Use%: 19%) Second Disk: /media/DISCO2 (Size: 915.8G, Used: 743.3G, Available: 172.5G, Use%: 81%) When attempting to copy a large file (e.g., 350GB) to either disk, the system incorrectly reports insufficient space, indicating that it is combining the usage of both disks instead of treating them independently.

Reproduction steps

Mount two disks on the Samba NAS Share add-on.
Attempt to copy a file to either disk that would fit based on individual disk usage but not combined usage.
Observe the error message indicating insufficient space.
Expected Behavior:

Each disk should report its capacity and available space independently, allowing files to be copied if there is sufficient space on the target disk.

Actual Behavior:

The add-on combines the capacities of the disks, leading to incorrect reporting of available space and preventing file copies that should otherwise be possible.

Addon Logs

[MEDIA]                 path = /media # TM:false  FS:native  #
[ADDON_CONFIGS]         path = /addon_configs # TM:false  FS:native  #
[DISCO1]                path = /mnt/Disco1 # TM:true USAGE:media  FS:ext4  #
[DISCO2]                path = /mnt/disco2 # TM:true USAGE:media  FS:ext4  #
---------------------------------------------------
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 wsdd successfully started
s6-rc: info: service smbd successfully started
s6-rc: info: service avahi successfully started
s6-rc: info: service nmbd successfully started
s6-rc: info: service cifs-supervisor-mount: starting
[12:03:02] INFO: Automount Shares...
smbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
INFO: Profiling support unavailable in this build.
[12:03:02] INFO: MQTT support not enabled in config
s6-rc: info: service init-mqtt successfully started
nmbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
[12:03:02] INFO: Starting the AVAHI for homeassistant...
SMART Automatic Offline Testing Enabled every four hours.
Waiting for daemon ...
[12:03:02] INFO: Starting the wsdd daemon for WORKGROUP/homeassistant...
[12:03:02] INFO: Wait Samba Server to going up..(max 30s)
[12:03:02] INFO: Interfaces: -i enp0s31f6 

No locked files
Samba version 4.18.9
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing              
----------------------------------------------------------------------------------------------------------------------------------------

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------

[12:03:02] INFO: Enabling S.M.A.R.T for /dev/sdb
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

2024-06-28 12:03:02,746:wsdd INFO(pid 408): using pre-defined UUID cb6a33a0-b841-531d-a34e-09ecec492eb1
2024-06-28 12:03:02,747:wsdd INFO(pid 408): joined multicast group 239.255.255.250 on 192.168.0.150%enp0s31f6
2024-06-28 12:03:02,749:wsdd INFO(pid 408): scheduling Hello message via enp0s31f6 to 239.255.255.250%enp0s31f6
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Timers not supported

SMART Automatic Offline Testing Enabled every four hours.

[12:03:02] INFO: Enabling S.M.A.R.T for /dev/sdc
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

2024-06-28 12:03:02,804:wsdd INFO(pid 408): joined multicast group [ff02::c] on fe80::85bf:de92:2325:2bdf%enp0s31f6
2024-06-28 12:03:02,805:wsdd INFO(pid 408): scheduling Hello message via enp0s31f6 to ff02::c%enp0s31f6
2024-06-28 12:03:02,850:wsdd INFO(pid 408): 192.168.0.73 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,852:wsdd INFO(pid 408): 192.168.0.73 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,852:wsdd INFO(pid 408): 192.168.0.25 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,853:wsdd INFO(pid 408): 192.168.0.25 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,861:wsdd INFO(pid 408): fe80::c91c:bc7c:ed95:e146 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,863:wsdd INFO(pid 408): fe80::c91c:bc7c:ed95:e146 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
s6-rc: info: service cifs-supervisor-mount successfully started
s6-rc: info: service mqtt-disk-handler: starting
s6-rc: info: service mqtt-disk-handler successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
2024-06-28 12:03:02,949:wsdd INFO(pid 408): fe80::e83f:f347:3372:e8d2 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-06-28 12:03:02,951:wsdd INFO(pid 408): fe80::e83f:f347:3372:e8d2 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
SMART Enabled.
SMART Attribute Autosave Enabled.
2024-06-28 12:03:03,259:wsdd INFO(pid 408): deleted address fe80::e47d:3ff:fe6d:7f89%veth5bcefc4
SMART Automatic Offline Testing Enabled every four hours.

s6-rc: info: service init-smartd successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.150 for name WORKGROUP<1d>.
This response was from IP 192.168.0.150, reporting an IP address of 192.168.0.150.
*****

Samba name server HOMEASSISTANT is now a local master browser for workgroup WORKGROUP on subnet 172.30.32.1

*****
2024-06-28 12:03:53,543:wsdd INFO(pid 408): deleted address fe80::58ad:4bff:fe16:df75%veth9dd24fc
2024-06-28 12:04:43,747:wsdd INFO(pid 408): deleted address fe80::70a3:adff:fea7:8e45%vethde054d4
2024-06-28 12:05:33,719:wsdd INFO(pid 408): deleted address fe80::8ce1:9aff:fe0d:809e%veth09a8910
2024-06-28 12:06:23,720:wsdd INFO(pid 408): deleted address fe80::ec87:bdff:fe54:61c7%veth2cad055
2024-06-28 12:07:13,826:wsdd INFO(pid 408): deleted address fe80::6040:43ff:fed8:215d%vethf669e19
2024-06-28 12:08:03,939:wsdd INFO(pid 408): deleted address fe80::40f4:d0ff:fe5a:a665%veth4bc13e4
*****

Samba name server HOMEASSISTANT is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.150

*****

Addon Config

workgroup: WORKGROUP
username: lucho99se
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 169.254.0.0/16
  - fe80::/10
  - fc00::/7
automount: true
moredisks:
  - id:/dev/disk/by-id/ata-TOSHIBA_HDWL110_493ACK5UT
  - Disco1
mountoptions:
  - nosuid
  - relatime
  - noexec
available_disks_log: true
medialibrary:
  enable: true
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false
recyle_bin_enabled: false
wsdd2: false
mqtt_nexgen_entities: false
autodiscovery: {}
other_users: []
acl: []
interfaces: []
password: ***

Architecture

amd64

OS

HaOS

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.