2023-03-16 遇到的一點(diǎn)小問題
我使用的掛載命令是這樣子的:
samba="http://${ip}/${share}"
mount -t cifs -v "${samba}" "${dir}" -o username="${user}",password="${psd}",iocharset=utf8,vers=3.1.1
#或者這樣,不指定用戶名,使用當(dāng)前執(zhí)行命令的用戶名
mount -t cifs -v "${smb}" "${dir}" -o password="${psd}",iocharset=utf8,vers=3.1.1
沒有密碼時蹦疑,也加上 password=""峻村,這樣就不會出現(xiàn)要求輸入密碼的情況
.
mount.cifs: bad UNC (${samba})
把samba路徑修改成/${ip}/${share}
或者其他錯誤樣式
返回結(jié)果:1
錯誤信息:mount.cifs: bad UNC (/192.168.1.1/test)
.
Couldn't chdir to ${dir}: No such file or directory
把掛載的路徑修改成不存在的路徑,比如/mntt/test
返回結(jié)果: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地址改成格式正確,但不存在的地址
返回結(jié)果: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文件夾改成不存在的地址
返回結(jié)果: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
使用錯誤的參數(shù)進(jìn)行連接疟呐,比如vers的版本寫成不存在的3.3
返回結(jié)果: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é)點(diǎn)
返回結(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é)點(diǎn)有限制版本,使用不合適的版本去連接
返回結(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電腦上設(shè)置共享文件夾东且,我這邊連接不了启具,提示這個。
這邊win11也設(shè)置了一個珊泳,那邊卻可以連接富纸。
mount error(11): Resource temporarily unavailable
在win11電腦上設(shè)置共享文件夾,使用vers=3.1.1
版本進(jìn)行連接旨椒,提示的這個晓褪。
使用vers=3.0.2
或更低版本進(jìn)行連接,就正常了综慎。
mount error(16): Device or resource busy
${dir}.mount already exists.
mount: bad usage
平時使用過程偶爾有遇到些其他的錯誤信息涣仿,懶得復(fù)現(xiàn)了,先貼一下錯誤信息示惊。