記錄掛載samba遇到的部分錯誤

2023-03-16 遇到的一點小問題

我使用的掛載命令是這樣子的:

samba="http://${ip}/${share}"
mount -t cifs -v "${samba}" "${dir}" -o username="${user}",password="${psd}",iocharset=utf8,vers=3.1.1
#或者這樣,不指定用戶名,使用當前執(zhí)行命令的用戶名
mount -t cifs -v "${smb}" "${dir}" -o password="${psd}",iocharset=utf8,vers=3.1.1 

沒有密碼時,也加上 password="",這樣就不會出現要求輸入密碼的情況

.

mount.cifs: bad UNC (${samba})

把samba路徑修改成/${ip}/${share}或者其他錯誤樣式

返回結果:1 
錯誤信息:mount.cifs: bad UNC (/192.168.1.1/test)
.

Couldn't chdir to ${dir}: No such file or directory
把掛載的路徑修改成不存在的路徑,比如/mntt/test

返回結果:1 
錯誤信息:Couldn't chdir to /mntt/test: No such file or directory
.

mount error(113): could not connect to ${ip}Unable to find suitable address.
把ip地址改成格式正確,但不存在的地址

返回結果:32
錯誤信息:
mount.cifs kernel mount options: ip=192.168.100.250,unc=\192.168.100.250    est,iocharset=utf8,vers=3.1.1,user=root,pass=********
mount error(113): could not connect to 192.168.100.250Unable to find suitable address.

mount error: could not resolve address for ${ip}: Unknown error
把ip地址改成格式錯誤,比如1921.68.100.250,掛載時就會提示這個。

.

mount error(2): No such file or directory
把share文件夾改成不存在的地址

返回結果:32
錯誤信息:
mount.cifs kernel mount options: ip=192.168.1.1,unc=\192.168.1.1\testtttt,iocharset=utf8,vers=2.1,user=root,pass=********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
.

mount error(22): Invalid argument
使用錯誤的參數進行連接,比如vers的版本寫成不存在的3.3

返回結果:32
錯誤信息:
mount.cifs kernel mount options: ip=192.168.1.1,unc=\192.168.1.1\test,iocharset=utf8,vers=3.3,user=root,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
.

mount error(13): Permission denied
使用錯誤的賬號信息取連接需要密碼的節(jié)點

返回結果:32
錯誤信息:
mount.cifs kernel mount options: ip=192.168.1.1,unc=\192.168.1.1\test,iocharset=utf8,vers=2.1,user=root,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
.

mount error(112): Host is down
mount error(95): Operation not supported
samba節(jié)點有限制版本,使用不合適的版本去連接

返回結果:32
錯誤信息:
mount.cifs kernel mount options: ip=192.168.1.1,unc=\192.168.1.1\test,iocharset=utf8,vers=3.0.2,user=root,pass=********
mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

或者這個信息:

mount.cifs kernel mount options: ip=192.168.1.1,unc=\192.168.1.1\test,iocharset=utf8,vers=2.0,user=root,pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
.

mount error(115): Operation now in progress
在外地的一臺win11電腦上設置共享文件夾,我這邊連接不了,提示這個。
這邊win11也設置了一個,那邊卻可以連接。

mount error(11): Resource temporarily unavailable
在win11電腦上設置共享文件夾,使用vers=3.1.1版本進行連接,提示的這個。
使用vers=3.0.2或更低版本進行連接,就正常了。

mount error(16): Device or resource busy
${dir}.mount already exists.
mount: bad usage
平時使用過程偶爾有遇到些其他的錯誤信息,懶得復現了,先貼一下錯誤信息。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容