feat(mounts): Klartext-Hinweis bei mount error(95) – keine gemeinsame SMB-Version

Aufgefallen beim echten Synology-NAS (Maximales SMB-Protokoll: SMB2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Florian Wilde
2026-10-10 22:50:19 +02:00
co-authored by Claude Opus 5.5
parent 2d2238ce4e
commit 0a317e2aa9
4 changed files with 18 additions and 0 deletions
+4
View File
@@ -8,6 +8,10 @@ Die Version steht an genau einer Stelle: `src/netmover/__init__.py`.
## [Unreleased] ## [Unreleased]
### Geändert
- Klartext-Hinweis bei `mount error(95)` (keine gemeinsame SMB-Version) mit
Synology-Einstellung; aufgefallen bei der Anbindung des echten NAS.
## [0.1.1] – 2026-10-10 ## [0.1.1] – 2026-10-10
Korrekturen aus dem ersten Praxistest auf einer Debian-13-VM mit echten Korrekturen aus dem ersten Praxistest auf einer Debian-13-VM mit echten
+1
View File
@@ -327,6 +327,7 @@ findmnt -R /mnt/netmover # was ist wirklich eingehängt?
|---|---| |---|---|
| `mount error(13): Permission denied` (CIFS) | Benutzer oder Passwort falsch, oder keine Rechte auf die Freigabe. | | `mount error(13): Permission denied` (CIFS) | Benutzer oder Passwort falsch, oder keine Rechte auf die Freigabe. |
| `mount error(2): No such file or directory` | Freigabename falsch geschrieben (Groß/klein!). | | `mount error(2): No such file or directory` | Freigabename falsch geschrieben (Groß/klein!). |
| `mount error(95): Operation not supported` | Keine gemeinsame SMB-Version (im Kernel-Log: „Dialect not supported by server“). Am NAS das maximale SMB-Protokoll auf SMB3 stellen oder Zusatzoption `vers=2.0`. |
| `mount error(112): Host is down` | NAS nicht erreichbar, oder SMB1 erwartet: `vers=3.0` bzw. `vers=2.1` probieren. | | `mount error(112): Host is down` | NAS nicht erreichbar, oder SMB1 erwartet: `vers=3.0` bzw. `vers=2.1` probieren. |
| `… helper program` / `unknown filesystem type` | `apt install cifs-utils nfs-common` | | `… helper program` / `unknown filesystem type` | `apt install cifs-utils nfs-common` |
| `Operation not permitted` / `only root can do that` | Kein `CAP_SYS_ADMIN`: unprivilegierter LXC oder Docker ohne `cap_add`. | | `Operation not permitted` / `only root can do that` | Kein `CAP_SYS_ADMIN`: unprivilegierter LXC oder Docker ohne `cap_add`. |
+7
View File
@@ -58,6 +58,13 @@ def explain_mount_error(fstype: str, message: str) -> str:
if "helper program" in low or "unknown filesystem type" in low: if "helper program" in low or "unknown filesystem type" in low:
pkg = "cifs-utils" if fstype == "cifs" else "nfs-common" pkg = "cifs-utils" if fstype == "cifs" else "nfs-common"
hint = f"Das Paket „{pkg}“ fehlt: apt install {pkg}" hint = f"Das Paket „{pkg}“ fehlt: apt install {pkg}"
elif fstype == "cifs" and ("error(95)" in low or "operation not supported" in low):
hint = (
"Server und Client finden keine gemeinsame SMB-Version. Am besten am NAS "
"SMB2/SMB3 erlauben (Synology: Systemsteuerung → Dateidienste → SMB → "
"Erweiterte Einstellungen → Maximales SMB-Protokoll: SMB3). Alternativ "
"Zusatzoption vers=2.0 – vers=1.0 nur im Notfall, SMB1 ist unsicher."
)
elif "permission denied" in low and fstype == "cifs": elif "permission denied" in low and fstype == "cifs":
hint = "Benutzername/Passwort falsch oder der Benutzer hat keine Rechte auf die Freigabe." hint = "Benutzername/Passwort falsch oder der Benutzer hat keine Rechte auf die Freigabe."
elif "permission denied" in low or "access denied by server" in low: elif "permission denied" in low or "access denied by server" in low:
+6
View File
@@ -110,6 +110,12 @@ def test_is_mounted_reads_mountinfo(tmp_path: Path) -> None:
), ),
("nfs4", "mount.nfs4: access denied by server while mounting nas:/x", "NFS-Berechtigungen"), ("nfs4", "mount.nfs4: access denied by server while mounting nas:/x", "NFS-Berechtigungen"),
("cifs", "mount error(112): Host is down", "nicht erreichbar"), ("cifs", "mount error(112): Host is down", "nicht erreichbar"),
# Praxisfall: Synology mit „Maximales SMB-Protokoll: SMB2“
(
"cifs",
"mount error(95): Operation not supported\nRefer to the mount.cifs(8) manual page",
"vers=2.0",
),
("cifs", "mount: only root can do that", "CAP_SYS_ADMIN"), ("cifs", "mount: only root can do that", "CAP_SYS_ADMIN"),
], ],
) )