{"id":526,"date":"2013-12-24T11:17:29","date_gmt":"2013-12-24T11:17:29","guid":{"rendered":"http:\/\/10sa.com\/sql_stories\/?p=526"},"modified":"2013-12-24T11:17:29","modified_gmt":"2013-12-24T11:17:29","slug":"nfs4","status":"publish","type":"post","link":"http:\/\/10sa.com\/sql_stories\/?p=526","title":{"rendered":"NFS4"},"content":{"rendered":"<p>I used Fedora (F16) with SELinux. On the start I advice to disable the firewall on the box where the exports are shared.<br \/>\nI made chcon to all my exported directories:<\/p>\n<pre lang=\"bash\">\r\nchcon -t nfs_t \/home\r\nchcon -t nfs_t \/home\/phos\r\n# -R means reccurence\r\nchcon -R -t nfs_t \/home\/phos\/www\r\n<\/pre>\n<p>And encountered the following problems:<br \/>\n1. Cannot mount (mount.nfs4)  the directory within \/home path:<\/p>\n<pre lang=\"bash\">\r\nroot@host:~# mount -v \/storage_nfs2\r\nmount.nfs: timeout set for Mon Jun  4 07:53:54 2012\r\nmount.nfs: trying text-based options 'tcp,hard,intr,nfsvers=4,timeo=15,nolock,addr=192.168.122.1,clientaddr=192.168.122.11'\r\nmount.nfs: mount(2): No such file or directory\r\nmount.nfs: mounting mother.local:\/home\/phos\/www2 failed, reason given by server:\r\n  No such file or directory\r\n<\/pre>\n<p>I tried fsid=0 and many other w\/o success.<br \/>\nThe solution is to replace nfsvers=4 with nfsvers=3 + nolock option.<br \/>\nThis is my fstab:<\/p>\n<pre lang=\"bash\">\r\n192.168.122.1:\/home\/phos\/www2 \/storage_nfs2         nfs    tcp,rw,hard,nodev,noatime,intr,sync,nfsvers=3,timeo=15,nolock 0 0\r\n<\/pre>\n<p>I encountered also the following problem:<br \/>\nrpcbind: server localhost not reposponding, timed out.<br \/>\nNow, I am not enable to present my remedy but I think that the most helpfull was to replace portmaper with rpcbind<\/p>\n<pre lang=\"bash\">\r\naptitude install rpcbind\r\n<\/pre>\n<p>Very helpful is:<br \/>\ncheck on client which versions are on the server:<\/p>\n<pre lang=bash>\r\nrpcinfo -n 2049 -t 192.168.122.1 nfs\r\nprogram 100003 version 2 ready and waiting\r\nprogram 100003 version 3 ready and waiting\r\nprogram 100003 version 4 ready and waiting\r\n<\/pre>\n<p>check the exports<\/p>\n<pre lang=bash>\r\nshowmount -e 192.168.122.1\r\nExport list for 192.168.122.1:\r\n\/share_nfs_www 192.168.122.0\/8\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I used Fedora (F16) with SELinux. On the start I advice to disable the firewall on the box where the exports are shared. I made chcon to all my exported directories: chcon -t nfs_t \/home chcon -t nfs_t \/home\/phos # -R means reccurence chcon -R -t nfs_t \/home\/phos\/www And encountered the following problems: 1. Cannot [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/526"}],"collection":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=526"}],"version-history":[{"count":7,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/526\/revisions"}],"predecessor-version":[{"id":664,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/526\/revisions\/664"}],"wp:attachment":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}