Compare commits

...

3 Commits

Author SHA1 Message Date
Alexandre
f4fa0ee4f6 Update config.yaml 2026-02-13 23:29:21 +01:00
Alexandre
879017935f Update 00-smb_mounts.sh
https://github.com/alexbelgium/hassio-addons/discussions/2475
2026-02-13 23:27:57 +01:00
github-actions
6dce2c6f25 GitHub bot : README updated 2026-02-13 17:17:21 +00:00
3 changed files with 24 additions and 21 deletions

View File

@@ -98,20 +98,23 @@ mount_drive() {
fi
}
# Retry ladder: SMB3 -> SMB2 when mount returns EINVAL (22)
retry_cifs_with_vers_ladder_on_einval() {
# Retry ladder: SMB3 -> SMB2 when mount fails due to dialect/negotiation issues
retry_cifs_with_vers_ladder_on_dialect_failure() {
[[ "${FSTYPE:-}" == "cifs" ]] || return 0
[[ "${MOUNTED:-false}" == "false" ]] || return 0
local err
err="$(cat "$ERRORCODE_FILE" 2>/dev/null || true)"
# Only step down dialects on EINVAL
if ! echo "$err" | grep -q "mount error(22)"; then
# Trigger ladder on common dialect/negotiation failures:
# - EINVAL (22) invalid argument
# - Host is down (112) often returned by mount.cifs on negotiation disconnects
# - protocol negotiation / abrupt close / NT_STATUS_CONNECTION_DISCONNECTED
if ! echo "$err" | grep -Eq 'mount error\(22\)|mount error\(112\)|Server abruptly closed the connection|Protocol negotiation|NT_STATUS_CONNECTION_DISCONNECTED'; then
return 0
fi
bashio::log.warning "...... EINVAL (22): trying SMB dialect ladder (3.x -> 2.x)."
bashio::log.warning "...... CIFS negotiation/dialect failure: trying SMB dialect ladder (3.x -> 2.x)."
local base_opts try_opts vers
@@ -277,11 +280,11 @@ if bashio::config.has_value 'networkdisks'; then
} >"$CRED_FILE"
fi
# First mount attempt (no vers pinned yet; we will correct on EINVAL via ladder)
# First mount attempt (no vers pinned yet; we will correct on negotiation/dialect failures via ladder)
if [[ "$FSTYPE" == "cifs" ]]; then
mount_drive "rw,file_mode=0775,dir_mode=0775,credentials=${CRED_FILE},nobrl,mfsymlinks${SMBVERS}${SECVERS}${PUID}${PGID}${CHARSET}"
if [[ "$MOUNTED" == "false" ]]; then
retry_cifs_with_vers_ladder_on_einval
retry_cifs_with_vers_ladder_on_dialect_failure
fi
else
mount_drive "rw,nfsvers=4.2,proto=tcp,hard,timeo=600,retrans=2"
@@ -361,7 +364,7 @@ if bashio::config.has_value 'networkdisks'; then
SMBVERS=",vers=1.0"
else
# IMPORTANT: deterministic fallback (so we don't depend on kernel defaults)
echo "...... SMB version : couldn't detect, falling back to SMB3->SMB2 ladder on EINVAL"
echo "...... SMB version : couldn't detect, falling back to SMB3->SMB2 ladder on negotiation/dialect failure"
SMBVERS=",vers=3.1.1"
fi
@@ -379,9 +382,9 @@ if bashio::config.has_value 'networkdisks'; then
fi
done
# If still EINVAL, step down SMB3 -> SMB2
# If still negotiation/dialect failure, step down SMB3 -> SMB2
if [[ "$MOUNTED" == "false" ]]; then
retry_cifs_with_vers_ladder_on_einval
retry_cifs_with_vers_ladder_on_dialect_failure
fi
else
@@ -435,7 +438,7 @@ if bashio::config.has_value 'networkdisks'; then
# last-ditch: minimal CIFS options (still uses credentials file)
mount_drive "rw,credentials=${CRED_FILE}${PUID}${PGID}"
if [[ "$MOUNTED" == "false" ]]; then
retry_cifs_with_vers_ladder_on_einval
retry_cifs_with_vers_ladder_on_dialect_failure
fi
else
bashio::log.fatal "Error, unable to mount NFS share $disk to /mnt/$diskname. Please check export path and allowlist for this client."

View File

@@ -57,18 +57,18 @@ If you want to do add the repository manually, please follow the procedure highl
### Number of addons
- In the repository : 122
- Installed : 69115
- Installed : 82287
### Top 3
1. Filebrowser (11110x)
2. Portainer (6058x)
3. Postgres_17 (3753x)
1. Filebrowser (12032x)
2. Portainer (8907x)
3. Netalertx (4315x)
### Architectures used
- amd64: 64%
- aarch64: 36%
- amd64: 63%
- aarch64: 37%
- %%STATS_ARMV7%%
### Stars evolution
@@ -309,7 +309,7 @@ If you want to do add the repository manually, please follow the procedure highl
![smb][smb-badge]
![localdisks][localdisks-badge]
✓ ![image](https://api.iconify.design/mdi/file-search.svg) [Filebrowser (11110x)](filebrowser/) : filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files
✓ ![image](https://api.iconify.design/mdi/file-search.svg) [Filebrowser (12032x)](filebrowser/) : filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files
  ![Version](https://img.shields.io/badge/dynamic/yaml?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Ffilebrowser%2Fconfig.yaml)
![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Ffilebrowser%2Fupdater.json)
@@ -708,7 +708,7 @@ If you want to do add the repository manually, please follow the procedure highl
![smb][smb-badge]
![localdisks][localdisks-badge]
✓ ![image](https://api.iconify.design/mdi/docker.svg) [Portainer (6058x)](portainer/) : Manage your Docker environment with ease
✓ ![image](https://api.iconify.design/mdi/docker.svg) [Portainer (8907x)](portainer/) : Manage your Docker environment with ease
  ![Version](https://img.shields.io/badge/dynamic/yaml?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fportainer%2Fconfig.yaml)
![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fportainer%2Fupdater.json)
@@ -716,7 +716,7 @@ If you want to do add the repository manually, please follow the procedure highl
![amd64][amd64-badge]
![ingress][ingress-badge]
✓ [Portainer (6058x) Agent](portainer_agent/) : An agent used to manage all the resources in a Swarm cluster
✓ [Portainer (8907x) Agent](portainer_agent/) : An agent used to manage all the resources in a Swarm cluster
  ![Version](https://img.shields.io/badge/dynamic/yaml?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fportainer_agent%2Fconfig.yaml)
![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fportainer_agent%2Fupdater.json)

View File

@@ -123,4 +123,4 @@ schema:
slug: filebrowser
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "2.57.0-4"
version: "2.57.0-5"