Clone
2.3 掛載 SMB
jsc-wiki edited this page 2026-10-14 06:27:29 +00:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

掛載 SMB

第2章 網路與儲存 · 來源:JSC 知識庫

簡介

在 Proxmox VE 主機以 CIFS 掛載 SMB 分享資料夾。

步驟

1. 安裝 CIFS 工具

apt update && apt install -y cifs-utils

2. 建立 SMB 驗證檔

nano /root/.smbcredentials

(內容如下)

username=SMB帳號
password=SMB密碼
domain=WORKGROUP

設定權限

chmod 600 /root/.smbcredentials

3. 掛載 SMB 資料夾

nano /etc/fstab

(加入以下內容)

//<SMB主機位址>/emby /mnt/ds918/emby cifs credentials=/root/.smbcredentials,uid=100000,gid=100000 0 0

uid=100000,gid=100000:對 unprivileged LXC container 很重要,這樣權限會對應到 container 內的 root 使用者(id 100000)

若是 privileged container,可用 uid=0,gid=0

nano /etc/pve/lxc/<ctid>.conf

(加入以下內容)

mp0: /mnt/ds918/emby,mp=/emby

4. 建立掛載的資料夾

mkdir -p /mnt/ds918/emby

5. 重新掛載資料夾

systemctl daemon-reload
mount -a

← 2.2 53 埠被占用 · 本章目錄 · 全書目錄 · 2.4 停用 SMB 服務 →