Tuesday, 29 March 2016

[Solved] NFS Server On Centos Inside Container OpenVZ

Tempo hari sempet bikin Server NFS berbasis Centos dalam Container OpenVz, tapi muncul error terus ketika Service NFS nya dijalankan.
Error nya kayak gini ni..

If you see this:
 
# service nfs start
....
Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
                                                           [FAILED]
# mount -t nfsd nfsd /proc/fs/nfsd
mount: unknown filesystem type 'nfsd'

 

Setelah browsing sana sini akhirnya ketemu solusi nya , ini dikarenakan ketika menjalankan container, container belum terdapat NFS module di dalamnya 

Solusi :
Matikan peringatan module NFSv4 and nfsd module loading warnings in /etc/sysconfig/nfs dengan cara uncomment baris dibawah 

MOUNTD_NFS_V3="yes"
RPCNFSDARGS="-N 4"
NFSD_MODULE="noload"
 

Jalankan service NFS :
chkconfig nfs on && service nfs start

Setelah selesai, jangan lupa aktifkan NFS dalam container seperti dibawah :
vzctl set $CTID --feature nfsd:on --save



Selamat Mencoba

Sumber :
https://hungred.com/how-to/setup-openvz-nfs-server/

No comments:

Post a Comment