dianlight / hassio-addons

Hassio.io
MIT License
139 stars 48 forks source link

SAMBA NAS crashes after a few hours #228

Closed ryana1 closed 4 months ago

ryana1 commented 7 months ago

Addon

SambaNAS

Description

Everything works well for a few hours up to a day but the NAS goes down and does not come back up. Could it be because vfat is not well supported?

Reproduction steps

Configure SAMBA NAS as with configuration to mount a disk by partition label and id. Disk formatted as vfat. HaOS.
Start SAMBA NAS check that the Network storage is available and working.
Write to the NAS. See everything work well.
After a few hours up to a day the add on will be down, check the docker logs. It does not come back up without a reload in Homeassistant UI.

Addon Logs

Start Log
--------
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: 12.2.0-nas1
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.2  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.0
-----------------------------------------------------------
 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
Log level is set to DEBUG
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
[13:59:14] INFO: Protection Mode is false
[13:59:14] INFO: MoreDisk or Automount option found!
modprobe: module ntfs3 not found in modules.dep
[13:59:14] WARNING: ntfs3 module not available!
modprobe: module exfat not found in modules.dep
[13:59:14] WARNING: exfat module not available!
modprobe: module xfs not found in modules.dep
[13:59:14] WARNING: xfs module not available!
---------------------------------------------------
Supported fs:   ext3    ext2    ext4    squashfs    vfat    msdos   iso9660 btrfs
---------------------------------------------------
[13:59:14] INFO: MediaLibrary option found!
---------------------------------------------------
[13:59:14] INFO: Available Disk Labels:
[13:59:14] INFO:    frigate[vfat]
---------------------------------------------------
[13:59:14] INFO: MoreDisks to mount:

    hassos-data-external
    aecd9ade-df2d-4b3a-af44-3329a721327c
[13:59:14] WARNING: Disk with label hassos-data-external not found.
[13:59:14] WARNING: Disk with label aecd9ade-df2d-4b3a-af44-3329a721327c not found.
[13:59:14] INFO: Automount is Enabled!
---------------------------------------------------
[13:59:14] INFO: Checking Mounting disks for reserved names:

    frigate
---------------------------------------------------
---------------------------------------------------
[13:59:14] INFO: Mounting disks:

    frigate
---------------------------------------------------
[13:59:15] WARNING: Your frigate is vfat. Permissions and ACL don't works and this is an EXPERIMENTAL support
[13:59:15] DEBUG: Mounting frigate of type vfat with -t
auto
-o
nosuid,relatime,noexec,umask=000
/dev/sdb1
[13:59:15] DEBUG: Exec command: mount -t
auto
-o
nosuid,relatime,noexec,umask=000
/dev/sdb1 "/mnt/frigate"
[13:59:15] INFO: Mount frigate[vfat] Success!
s6-rc: info: service init-automount successfully started
s6-rc: info: service init-smartd: starting
s6-rc: info: service init-samba: starting
s6-rc: info: service hd-idle: starting
s6-rc: info: service hd-idle successfully started
[13:59:15] INFO: Hostname: homeassistant
[13:59:15] DEBUG: Requested API resource: http://supervisor/network/info
[13:59:15] DEBUG: Request method: GET
[13:59:15] DEBUG: Request data: {}
[13:59:15] DEBUG: API HTTP Response code: 200
[13:59:15] DEBUG: API Response: {"result":"ok","data":{"interfaces":[{"interface":"enp3s0","type":"ethernet","enabled":false,"connected":false,"primary":false,"mac":"20:7C:14:A1:92:CA","ipv4":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"ipv6":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"wifi":null,"vlan":null},{"interface":"enp2s0","type":"ethernet","enabled":false,"connected":false,"primary":false,"mac":"20:7C:14:A1:92:C8","ipv4":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"ipv6":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"wifi":null,"vlan":null},{"interface":"enp1s0","type":"ethernet","enabled":true,"connected":true,"primary":true,"mac":"20:7C:14:A1:92:C9","ipv4":{"method":"static","address":["192.168.0.10/24"],"nameservers":["8.8.8.8"],"gateway":"192.168.0.1","ready":true},"ipv6":{"method":"disabled","address":["fe80::c74b:7fdc:7f87:86b0/64"],"nameservers":[],"gateway":null,"ready":true},"wifi":null,"vlan":null},{"interface":"enp4s0","type":"ethernet","enabled":false,"connected":false,"primary":false,"mac":"20:7C:14:A1:92:CB","ipv4":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"ipv6":{"method":"disabled","address":[],"nameservers":[],"gateway":null,"ready":false},"wifi":null,"vlan":null}],"docker":{"interface":"hassio","address":"172.30.32.0/23","gateway":"172.30.32.1","dns":"172.30.32.3"},"host_internet":true,"supervisor_internet":true}}

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

[13:59:15] INFO: Interfaces: enp3s0 enp2s0 enp1s0 enp4s0 
[13:59:15] INFO: Docker Interface: hassio 172.30.32.0/23
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.

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

Error??
-------
vfs_ChDir to /mnt/frigate
smbd_do_qfsinfo: level = 1007
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x0 flags2=0x800 mode=0664, access_mask = 0x80, open_access_mask = 0x80
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x0 flags2=0x800 mode=0664, access_mask = 0x80, open_access_mask = 0x80
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x0 flags2=0x800 mode=0664, access_mask = 0x80, open_access_mask = 0x80
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_create.c:340
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[5] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_server.c:3331
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[9] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_server.c:3331
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x2 flags2=0xA40 mode=0664, access_mask = 0x120196, open_access_mask = 0x120196
root opened file recordings/2024-04-19/20/frontdoor/57.21.mp4 read=No write=Yes (numopen=2)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x0 flags2=0x800 mode=0664, access_mask = 0x80, open_access_mask = 0x80
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_create.c:340
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[5] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_server.c:3331
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(1736418852) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[9] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../../source3/smbd/smb2_server.c:3331

Error??
-------
smbd_smb2_notify_send: notify change called on frigate/exports, filter = FILE_NAME|ATTRIBUTES|LAST_WRITE, recursive = 0
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(592741352) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /media
smb2: fnum 1444646109, file exports/samsh1.txt, length=50 offset=300937798 wrote=50
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
calling open_file with flags=0x0 flags2=0x800 mode=0664, access_mask = 0x8, open_access_mask = 0x8
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[5] status[NT_STATUS_NO_EAS_ON_FILE] || at ../../source3/smbd/smb2_getinfo.c:159
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
fcntl_getlock: fd 26 is returned info 2 pid 0
smb2: fnum 1444646109, file exports/samsh1.txt, length=47 offset=300937848 wrote=47
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
fcntl_getlock: fd 26 is returned info 2 pid 0
smb2: fnum 1444646109, file exports/samsh1.txt, length=43 offset=300937895 wrote=43
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(459965910) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
vfs_ChDir to /mnt/frigate
fcntl_getlock: fd 26 is returned info 2 pi

Addon Config

workgroup: WORKGROUP1
username: bear
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 192.168.0.0/16
  - 169.254.0.0/16
  - fe80::/10
  - fc00::/7
automount: true
moredisks:
  - hassos-data-external
  - aecd9ade-df2d-4b3a-af44-3329a721327c
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:
  - share: frigate
    disabled: false
    users:
      - bear
interfaces: []
password: xxxxxx!
log_level: debug

Architecture

amd64

OS

HaOS

dianlight commented 7 months ago

In 95% of cases, errors of this type are caused by power problems or overheating. If the disk is external, does it have an external power supply or does it take it from USB? Is the disk cooled sufficiently? In 4% of cases there is a hardware problem. If it is external, attach it to a PC and test, otherwise boot with a live distribution that allows you to check. In the last 1% of cases it is a bug in the kernel vfat driver. There is no solution other than changing the filesystem (ext4 is better)

L

ryana1 commented 7 months ago

Thank you for looking into it and for making the add on available. I'll try EXT4 next.

github-actions[bot] commented 5 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.