在gentoo中掛載windows共用資料夾

來源:互聯網
上載者:User

mount -t smbfs -o username=administrator,password=123456 //192.168.100.224/public /mnt/winkernel

 

mount -t cifs -o username=administrator,password=123456,codepage=cp936 //192.168.100.224/public /mnt/winkernel 

 

[92615.408159] smbfs is deprecated and will be removed from the 2.6.27 kernel. Please migrate to cifs

參考

 

公司發存新程式由專人負責的。我需要講war包上傳到一個windws共用目錄。由於現在換成Gentoo + xfce4環境了。Thunar又不支援 smb://協議。所以只有自己手動mount了。由於之前已經裝過samba了。所以就直接mount一把。

gentoo ~ # mount -t smbfs -o username=aaa,password=aaa //10.200.106.252/updatepack release
ERROR: smbfs filesystem not supported by the kernel
Please refer to the smbmnt(8) manual page
smbmnt failed: 255

發現核心不支援smbfs.就重新編譯了一下核心。

< >   SMB file system support (OBSOLETE, please use CIFS)
<M>   CIFS support (advanced network filesystem, SMBFS successor)
  [*]     CIFS statistics
  [*]       Extended statistics
  [*]     Support legacy servers which use weaker LANMAN security
  [*]     CIFS extended attributes
  [*]       CIFS POSIX Extensions
  [*]     Enable additional CIFS debugging routines
  [ ]     CIFS Experimental Features (EXPERIMENTAL)  

當看到SMB file system的時候看到OBSOLETE了,看來不建議使用了。建議使用CIFS,所以就把CIFS選上了。看起來是 SMBFS的繼承者。

編譯替換核心重啟,再mount一把。鬱悶的是還提示不行。但是選擇CIFS的時候自己想當然的以為CIFS肯定支援SMBFS的。沒想到就不是這麼回事。如果要mount -t smbfs就必須要選擇 SMB file system support 才行。當時就只好用vbox裡的windows去訪問共用目錄了。不過不知道為什麼出奇的慢。100M的區域網路拷貝十幾M的包要20分鐘(Orz)。

後來意識到自己的想法是錯誤的。又不想用廢棄的SMB file system support。所以在gentoo-wiki.com中找到了答案。

gentoo ~ # mount -t cifs //10.200.106.252/updatepack /home/rory/release -o "username=aaa,password=aaa,uid=1000,isocharset=cp936"

一切搞定。再把這命令寫到啟動指令碼裡。

rory@gentoo ~ $ more /etc/conf.d/local.start
# /etc/conf.d/local.start

# This is a good place to load any misc programs
# on startup (use &>/dev/null to hide output)

############## smbmount release from dual ################
mount -t cifs //10.200.106.252/updatepack /home/rory/release -o "username=aaa,password=aaa,uid=1000,isocharset=
cp936"

##########################################################
如果你沒有local.start 應該有 local 檔案。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.