Adding any NAS/CIFS storage fails with mount error(79) on hosts running
Linux 6.6 or newer. The NAS, credentials and share are correct; mounting
the same share manually without iocharset=utf8 works.
Cause
In src/adapters/content/storage/storageManager.ts:36, the default mount
options are hardcoded to include iocharset=utf8:
ts
const options: string[] = ['rw', 'file_mode=0644', 'dir_mode=0755', 'iocharset=utf8'];
mount.cifs requires the matching NLS module to be loadable before it
will accept the option. Since Linux 6.6, nls_utf8 is built into the
kernel image (CONFIG_NLS_UTF8=y) and is no longer shipped as a
loadable module (nls_utf8.ko). modprobe nls_utf8 returns
FATAL: Module nls_utf8 not found, so mount -t cifs aborts with
error 79 ("Can not access a needed shared library") before any SMB
negotiation happens.
dmesg:
CIFS: Attempting to mount //server/share
CIFS: VFS: CIFS mount error: iocharset utf8 not found
Suggested fix
Either:
-
Drop iocharset=utf8 from the default option list. UTF-8 is the
native charset on every modern NAS and Linux client, and CIFS
defaults to UTF-8 when the option is absent.
-
Make the option conditional: probe /proc/filesystems / kernel
config first, only add iocharset=utf8 when the charset actually
differs from the local 8-bit codeset, or when modprobe -n nls_utf8
succeeds.
Reproduction
- Run the server on Ubuntu 24.04 / any distro with kernel 6.6+.
- Add a NAS storage via the admin UI (server, share, user, password).
- Observe the error in the logs:
[ERROR][Content|Storage] mount failed (inline fallback) mount.cifs failed: ... iocharset utf8 not found
Environment
- Server version: sonn-audio/core beta:18
- Kernel: Linux 6.8.0-134-generic (Ubuntu 24.04 container)
- cifs-utils: latest
- NAS: Linux-based, SMB3
Adding any NAS/CIFS storage fails with mount error(79) on hosts running
Linux 6.6 or newer. The NAS, credentials and share are correct; mounting
the same share manually without iocharset=utf8 works.
Cause
In src/adapters/content/storage/storageManager.ts:36, the default mount
options are hardcoded to include iocharset=utf8:
ts
const options: string[] = ['rw', 'file_mode=0644', 'dir_mode=0755', 'iocharset=utf8'];
mount.cifs requires the matching NLS module to be loadable before it
will accept the option. Since Linux 6.6, nls_utf8 is built into the
kernel image (CONFIG_NLS_UTF8=y) and is no longer shipped as a
loadable module (nls_utf8.ko). modprobe nls_utf8 returns
FATAL: Module nls_utf8 not found, so mount -t cifs aborts with
error 79 ("Can not access a needed shared library") before any SMB
negotiation happens.
dmesg:
CIFS: Attempting to mount //server/share
CIFS: VFS: CIFS mount error: iocharset utf8 not found
Suggested fix
Either:
Drop iocharset=utf8 from the default option list. UTF-8 is the
native charset on every modern NAS and Linux client, and CIFS
defaults to UTF-8 when the option is absent.
Make the option conditional: probe /proc/filesystems / kernel
config first, only add iocharset=utf8 when the charset actually
differs from the local 8-bit codeset, or when modprobe -n nls_utf8
succeeds.
Reproduction
[ERROR][Content|Storage] mount failed (inline fallback) mount.cifs failed: ... iocharset utf8 not found
Environment