使用最小安裝的 CentOS 是不包含 nfs 的 mount util 的! 所以如果下 mount nfs 的指令就會出現
# mount -t nfs 192.168.1.101://storage /mnt/storage
mount: wrong fs type, bad option, bad superblock on 192.168.1.101://storage,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
 
使用 dmesg | tail 則會看到類似下面的訊息
# dmesg | tail
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Slow work thread pool: Starting up
Slow work thread pool: Ready
FS-Cache: Loaded
NFS: Registering the id_resolver key type
FS-Cache: Netfs 'nfs' registered for caching
 
此時只要安裝 nfs-utils 即可!
yum install nfs-utils
 
如果是 Window 網芳則加入 cifs 即可
yum install cifs-utils
 
加好後就可以正常 mount 了!
 
別忘了在 /etc/fstab 加入設定,這樣開機才會自動 mount 喔!
Facebook 討論區載入中...