我在同一台服务器上有 2 个 Proxmox VM(用于学习目的)- 主 docker 服务器(ubuntu 18.04 服务器)192.168.1.108 和 samba/storage 192.168.1.109
在主服务器上,我将 Transmission 设置为 docker 容器。当我将卷(在 docker-compose.yml 中)指向本地目录时,我能够下载完整和不完整的内容:
volumes:
- /etc/localtime:/etc/localtime:ro
- ${USERDIR}/docker/transmission-vpn:/data
- ${USERDIR}/docker/shared:/shared
- ${USERDIR}Downloads/completed:/data/completed
- ${USERDIR}Downloads/incomplete:/data/incomplete
以上工作正常并且 Transmission 可以正常下载。
当我将下载位置更改为已安装的 samba 共享目录时,它停止工作并且传输仅显示“权限被拒绝”。
volumes:
- /etc/localtime:/etc/localtime:ro
- ${USERDIR}/docker/transmission-vpn:/data
- ${USERDIR}/docker/shared:/shared
- /mnt/smbmount/dls/complete:/data/completed
- /mnt/smbmount/dls/dling:/data/incomplete
对于桑巴舞,我遵循本指南用于在我的 samba/存储服务器上设置 sadmin 和用户共享。
这是我在 samba/存储服务器上的 smb.conf:
[users]
path = /samba/users
browseable = yes
writable = yes
guest ok = yes
read only = no
force create mode = 0660
force directory mode = 2770
valid users = @sambashare @sadmin
force user = sadmin
directory mask = 0775
create mask = 664
这是我的主 Docker 服务器上的 fstab:
UUID=2bd84936-de66-46f1-bdb5-8cc00c57cde0 / ext4 defaults 0 0
/swap.img none swap sw 0 0
//192.168.1.109/users /mnt/smbmount cifs credentials=/home/cbody/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
我的.smbcredentials 文件在制作 samba 内容时设置了用户名和密码。
我已经在每个主要点和故障排除步骤中卸载并重新安装了共享,同时使用了两者(不是同时):
sudo mount -a
sudo mount -t cifs -o username=sadmin //192.168.1.109/users /mnt/smbmount
我四处寻找,并且花了将近三天的时间试图让它发挥作用,但没有任何成功。
答案1
现在似乎可以正常工作了……我在发布问题后关闭了服务器以将其移动。几个小时后启动一切(主服务器:启动两个虚拟机,运行 docker-compose,sudo mount -a)>(samba 服务器:testparm)我再次测试了它,transmission 开始从 ombi > sonarr > transmission 下载内容。transmission docker-compose.yml 文件正在使用
volumes:
- /etc/localtime:/etc/localtime:ro
- ${USERDIR}/docker/transmission-vpn:/data
- ${USERDIR}/docker/shared:/shared
- /mnt/smbmount/dls/complete:/data/completed
- /mnt/smbmount/dls/dling:/data/incomplete
我注意到的唯一变化是,在我的主服务器(使用 docker)上,根据一些快速谷歌搜索,/mnt/ 中的所有内容现在都是其他可写的(绿色背景,蓝色文本)。如果我没记错的话,在移动服务器之前它们并没有被突出显示。
如果 Samba 服务器的 Samba 日志中有一些有助于解释原因的内容:
在日志中,这种情况重复了几个小时:
[2019/05/04 18:53:24.200929, 0] ../source3/param/loadparm.c:3350(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/sambashare failed. No such file or directory
[2019/05/04 18:53:26.216203, 0] ../source3/param/loadparm.c:3350(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/sambashare failed. No such file or directory
[2019/05/04 18:53:28.237241, 0] ../source3/param/loadparm.c:3350(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/sambashare failed. No such file or directory
在 log.nmbd 中:
[2019/05/04 18:53:22.542765, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2019/05/04 19:06:17.007804, 0] ../source3/nmbd/nmbd.c:58(terminate)
Got SIGTERM: going down...
[2019/05/04 19:06:17.052438, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2019/05/04 19:43:36.268418, 0] ../source3/nmbd/nmbd.c:58(terminate)
Got SIGTERM: going down...
[2019/05/04 19:43:36.346490, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2019/05/04 20:59:52.498656, 0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
query_name_response: Multiple (2) responses received for a query on subnet
192.168.1.109 for name WORKGROUP<1d>.
This response was from IP 192.168.1.105, reporting an IP address of 192.168.1.105.
[2019/05/04 21:02:27.358132, 0]
../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server CBSTORAGE is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.109
*****
[2019/05/05 01:50:50.978902, 0] ../source3/nmbd/nmbd.c:58(terminate)
Got SIGTERM: going down...
[2019/05/05 04:57:15.828267, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
在 log.smbd 中:
[2019/05/04 18:53:21.969701, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'smbd' finished starting up and ready to serve connections
[2019/05/05 04:57:18.365352, 0] ../lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon 'smbd' finished starting up and ready to serve connections
其余的木材都是空的。