顯示具有 nfs 標籤的文章。 顯示所有文章
顯示具有 nfs 標籤的文章。 顯示所有文章

2009年9月15日

ubuntu NFS - network file system檔案共享

參考網址:
http://wiki.debian.org.hk/w/Share_files_with_NFS

首先分為server和client端,
server為分享目錄的一方,
而client為欲掛載server分享出來的目錄一方

設定如下:

server:
----------------------------------
sudo apt-get install nfs-kernel-server
sudo apt-get install portmap
sudo vi /etc/exports

接著就是告訴 NFS 伺服器您打算分享那些檔案和不同電腦有什麼權限等,

您需要把這些資料寫在 /etc/exports 中。

本例是要分享目錄 /var/nfs192.168.13.0 - 192.168.13.255 網路上所有電腦使用,

所以請在 /etc/exports 加入以下一行:

/var/nfs       192.168.13.0/24(ro)

完成後就要啟動 NFS 伺服器, Ubuntu 使用者請打:

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

sudo /etc/init.d/nfs-kernel-server restart


client:
----------------------------------------------------
sudo apt-get install nfs-common
sudo apt-get install portmap
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

可用以下指令確認是否順利連線
sudo showmount -e 伺服器地址

現在您可以用「mount -t nfs 伺服器地址:欲分享目錄 掛載點(client端欲被掛上的空目錄)」連接有關目錄

mount -t nfs 192.168.13.15:/var/nfs /mnt




2009年8月24日

修復ubuntu9.04開機時會在starting nfs common utilities fail卡很久

轉自作者:dimis2410

I had the same problem when i tried to set up a static IP... and this worked for me :



sudo gedit /etc/network/interfaces


and make the file look like this:

修改即可
auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

auto eth0



"192.168.1.100 " my static ip
"255.255.255.0" my subnet mask
"192.168.1.1" my routers/gateway ip
"eth0" my current ethernet interface

Change the addresses to yours...
and then restart networking...

sudo /etc/init.d/networking restart


Now i'm sure that it will not hang on "Starting NFS common utils..."

:)

NO-CARRIER 網卡無法啟動

 工作時,由於想要啟動linux OS的網卡, 發現某張新設定的網卡一直無法啟動,就算下指令UP了,但是也沒有順利啟動 所以爬文後,想要確認該網卡的status, 發現某行為: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu...