{"id":2000,"date":"2011-11-29T15:13:18","date_gmt":"2011-11-29T13:13:18","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=2000"},"modified":"2025-01-13T17:58:17","modified_gmt":"2025-01-13T15:58:17","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d0%b8-%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-nfs-%d0%ba%d0%bb%d0%b8%d0%b5%d0%bd%d1%82-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=2000","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 NFS (\u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440)"},"content":{"rendered":"<p>\u0422\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <strong>NFS<\/strong> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <strong>SUN<\/strong> \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 \u041e\u0421 <strong>Solaris<\/strong>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043d\u0430 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438.<\/p>\n<p><em><strong><span style=\"color: #008000;\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434<\/span><\/strong><\/em>: <strong>Solaris 10\/11<\/strong> (\u0441\u0435\u0440\u0432\u0435\u0440), <strong>Kubuntu Linux, \u00a0kernel\u00a03.0.0-12-generic-pae<\/strong> (\u043a\u043b\u0438\u0435\u043d\u0442)<\/p>\n<p><!--more--><strong><span style=\"color: #ff0000;\">1) \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/span><\/strong><\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <strong>11<\/strong> \u0432\u0435\u0440\u0441\u0438\u0438 <strong>NFS<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u043e\u043d\u0435. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<p><code>share_nfs: Cannot share filesystems in non-global zones: \/export\/home2<\/code><\/p>\n<p>\u0424\u0430\u0439\u043b\u044b <strong>NFS<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/p>\n<p><strong><span style=\"color: #ff6600;\">\/etc\/dfs\/dfstab<\/span><\/strong> &#8211; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0445 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<br \/>\n<strong><span style=\"color: #ff6600;\">\/etc\/nfs\/nfslogd.conf<\/span><\/strong> \u2013 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c <strong>NFS<\/strong>.<br \/>\n<strong><span style=\"color: #ff6600;\">\/etc\/dfs\/sharetab<\/span><\/strong> \u2013 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0445 <strong>NFS<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<br \/>\n<strong><span style=\"color: #ff6600;\">\/etc\/rmtab<\/span><\/strong> \u2013 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 <strong>NFS<\/strong>-\u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438. \u041d\u0415 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432\u0440\u0443\u0447\u043d\u0443\u044e!<br \/>\n<strong><span style=\"color: #ff6600;\">\/etc\/nfs\/nfslog.conf<\/span><\/strong> \u2013 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c <strong>NFS<\/strong>.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440 <strong>nfs<\/strong> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u043e \u043e\u043d \u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d. \u0427\u0442\u043e \u0431\u044b \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c 2 \u0432\u0435\u0449\u0438:<\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0440\u0430\u0441\u0448\u0430\u0440\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u0432 \u0444\u0430\u0439\u043b\u00a0\/etc\/dfs\/dfstab<\/span><\/em><br \/>\n<em><span style=\"color: #ff6600;\"> &#8211; \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c enable \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 nfs<\/span><\/em><\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u0412 <strong>11<\/strong> \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0442\u044c <strong>NFS<\/strong> \u0440\u0435\u0441\u0443\u0440 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c <strong>NFS<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440, \u0438\u043d\u0430\u0447\u0435 \u043e\u043d \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f. \u0422\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0434\u0435\u043c\u043e\u043d:<\/p>\n<p><code>#echo 'share \u00a0-F nfs \u00a0-o ro \u00a0-d \"home dirs\" \u00a0\/export\/home' &gt;&gt; \/etc\/dfs\/dfstab<br \/>\n#svcadm -v enable -rs svc:\/network\/nfs\/server:default<br \/>\nsvc:\/network\/nfs\/server:default enabled.<br \/>\nsvc:\/milestone\/network enabled.<br \/>\nsvc:\/network\/loopback enabled.<br \/>\nsvc:\/network\/ip-interface-management enabled.<br \/>\nsvc:\/network\/socket-config enabled.<br \/>\nsvc:\/system\/name-service\/upgrade enabled.<br \/>\nsvc:\/network\/physical:default enabled.<br \/>\nsvc:\/network\/physical:upgrade enabled.<br \/>\nsvc:\/network\/netcfg enabled.<br \/>\nsvc:\/network\/datalink-management enabled.<br \/>\nsvc:\/network\/nfs\/nlockmgr enabled.<br \/>\nsvc:\/network\/rpc\/bind enabled.<br \/>\nsvc:\/system\/filesystem\/minimal enabled.<br \/>\nsvc:\/system\/filesystem\/usr enabled.<br \/>\nsvc:\/system\/boot-archive enabled.<br \/>\nsvc:\/system\/filesystem\/root enabled.<br \/>\nsvc:\/system\/device\/local enabled.<br \/>\nsvc:\/system\/identity:node enabled.<br \/>\nsvc:\/network\/nfs\/status enabled.<br \/>\nsvc:\/system\/filesystem\/local enabled.<br \/>\nsvc:\/milestone\/single-user enabled.<br \/>\nsvc:\/milestone\/config enabled.<br \/>\nsvc:\/system\/filesystem\/minimal:default enabled.<br \/>\nsvc:\/system\/device\/local:default enabled.<br \/>\nsvc:\/milestone\/unconfig:default enabled.<br \/>\nsvc:\/system\/utmp:default enabled.<br \/>\nsvc:\/network\/ip-interface-management:default enabled.<br \/>\nsvc:\/network\/netcfg:default enabled.<br \/>\nsvc:\/milestone\/devices enabled.<br \/>\nsvc:\/system\/manifest-import enabled.<br \/>\nsvc:\/milestone\/unconfig enabled.<br \/>\nsvc:\/system\/config-user enabled.<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0448\u0430\u0440 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<pre># share\n-               \/export\/home   rw   \"\"\n# dfshares\nRESOURCE                                  SERVER ACCESS    TRANSPORT\n  sol10new:\/export\/home                 sol10new  -         -<\/pre>\n<p>\u041d\u0430\u0436\u0438\u0432\u0443\u044e \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><code>#share -F nfs -o ro -d \"home dirs\" \/export\/home2<\/code><\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u0412 <strong>11.1<\/strong> \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <strong>zfs &#8211; share.nfs<\/strong>:<\/p>\n<p><code># zfs set share.nfs=on rpool\/test<\/code><\/p>\n<p>\u0422\u0430\u043a \u0436\u0435, \u0447\u0435\u0440\u0435\u0437 <strong>share.nfs.parm<\/strong> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<p><code># zfs set share.nfs.nosuid=on rpool\/test<\/code><\/p>\n<p><span style=\"color: #ff6600;\"><em>&#8212; \u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f &#8212;<\/em><\/span><\/p>\n<p>\u0420\u0430\u0441\u0448\u0430\u0440\u0438\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 (\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b\u0438 \u0434\u043b\u044f <strong>1.1.1.1<\/strong> \u0438 <strong>2.2.2.2<\/strong>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0430\u043f\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 = <strong>777<\/strong>):<\/p>\n<p><code>#share -F nfs -o rw=1.1.1.1:2.2.2.2 -d \"home dirs\" \/export\/home2<\/code><\/p>\n<p>\u0414\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0440\u0443\u0442\u0430 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u0430 <strong>3.3.3.3<\/strong> (\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f <strong>root<\/strong>)<\/p>\n<p><code>#share -F nfs -o rw,root=3.3.3.3 \/export\/home<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0448\u0430\u0440\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u00a0<strong>\/etc\/dfs\/dfstab<\/strong> \u0438 \u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>shareall<\/strong><\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <strong>shareall<\/strong> \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u0434\u0440\u044f\u0434 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<strong> share<\/strong>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>\/etc\/dfs\/dfstab<\/strong>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 <strong>share<\/strong>, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0434\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0441\u044f \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <strong>shareall<\/strong>.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 2.<\/span><\/strong><\/em><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 <strong>Linux<\/strong> <strong>server<\/strong> \u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <strong>debug<\/strong> <strong>RPC<\/strong>, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a:<\/p>\n<p><code>rpcdebug -m nfsd -s all<\/code><\/p>\n<p><strong><span style=\"color: #ff0000;\">2) \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/span><\/strong><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 <strong>nfs<\/strong><\/p>\n<p><code>#apt-get install nfs-common<\/code><\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0430\u0440\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<p><code>#showmount -e 10.5.5.130<br \/>\nExport list for 10.5.5.130:<br \/>\n\/export\/home (everyone)<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 <strong>uid:gid<\/strong> (\u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a\u0438\u043c\u0438 <strong>4294967294:4294967294<\/strong>) \u043f\u0440\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>NEED_IDMAPD=yes<\/strong>\u00a0(\u0444\u0430\u0439\u043b <strong>\/etc\/default\/nfs-common<\/strong>) \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 <strong>idmapd<\/strong>:<\/p>\n<p><code>#service idmapd start<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441:<\/p>\n<p><code>#mount 10.5.5.130:\/export\/home \/mnt\/nfs\/<br \/>\n# ls -la \/mnt\/nfs\/<br \/>\n\u0438\u0442\u043e\u0433\u043e 9<br \/>\ndrwxr-xr-x 4 777 nogroup 4 2011-11-29 13:43 .<br \/>\ndrwxr-xr-x 3 root root 4096 2011-11-29 13:23 ..<br \/>\ndrwxr-xr-x 2 nobody nogroup 2 2011-11-29 13:43 dsasd<br \/>\ndrwxrwxrwx 2 nobody nogroup 2 2011-11-29 13:20 qqq<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b <strong>mapid<\/strong>, \u043d\u0443\u0436\u043d\u043e :<\/p>\n<ul>\n<li>\u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 <strong>\/etc\/resolv.conf<\/strong><\/li>\n<\/ul>\n<p><code>search domain.com<\/code><\/p>\n<ul>\n<li>\u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 <strong>\/etc\/idmapd.conf<\/strong><\/li>\n<\/ul>\n<p><code>Domain=domain.com<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u0435\u0448:<\/p>\n<p><code># nfsidmap -c<\/code><\/p>\n<p>\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<p><code>#umount.nfs \/mnt\/nfs -fl<\/code><\/p>\n<p><span style=\"color: #ff6600;\"><em><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 2.<\/strong><\/em><\/span><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 <strong>mapid<\/strong> \u0442\u0430\u043a \u0438 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0431\u0430\u0433. \u0418 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d \u0442\u0430\u043a:<\/p>\n<p><span style=\"color: #0000ff;\"><em>1) \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c idmap \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/em><\/span><\/p>\n<p><code># rpc.idmapd -c \/etc\/idmapd.conf -f<br \/>\nrpc.idmapd: main: open(\/run\/rpc_pipefs\/nfs): No such file or directory<\/code><\/p>\n<p><em><span style=\"color: #0000ff;\">2) \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443:<\/span><\/em><\/p>\n<p><code># mkdir \/run\/rpc_pipefs<\/code><\/p>\n<p><em><span style=\"color: #0000ff;\">3) \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c rpc_pipefs:<\/span><\/em><\/p>\n<p><code># mount -t rpc_pipefs rpc_pipefs \/run\/rpc_pipefs<\/code><\/p>\n<p><em><span style=\"color: #0000ff;\">4) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u00a0idmap:<\/span><\/em><\/p>\n<p><code># rpc.idmapd -c \/etc\/idmapd.conf<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u043e\u043d\u043e \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043c\u0430\u043f\u0438\u0442 \u0432\u0441\u0435\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u0432\u00a0<strong>Nobody-User:Nobody-Group<\/strong> \u0438\u0437 \u0444\u0430\u0439\u043b\u0430\u00a0<strong>\/etc\/idmapd.conf<\/strong>.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0411\u0414 <strong>Oracle<\/strong> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Direct NFS<\/strong>\u00a0<a href=\"http:\/\/www.orafaq.com\/wiki\/Direct_NFS\" rel=\"nofollow\">http:\/\/www.orafaq.com\/wiki\/Direct_NFS<\/a><\/p>\n<p><strong><span style=\"color: #ff0000;\">3) \u041d\u0438\u0437\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/span><\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <strong>NFS<\/strong> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u0437\u043a\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0442\u044e\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c <a title=\"\u0437\u0434\u0435\u0441\u044c\" href=\"https:\/\/blogs.oracle.com\/paulie\/entry\/configuration_for_1m\" target=\"_blank\" rel=\"nofollow noopener\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"http:\/\/www.c0t0d0s0.org\/archives\/7678-Beware,-biting-bsize.html\" target=\"_blank\" rel=\"nofollow noopener\">\u0437\u0434\u0435\u0441\u044c<\/a>\u00a0. \u0412\u043e\u0442 \u043f\u0430\u0440\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 <strong>MTU<\/strong> \u0434\u043e <strong>9000<\/strong><\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <strong>pNFS<\/strong> (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 <strong>NFS<\/strong> <strong>4.1<\/strong>)<\/li>\n<li>\u0442\u044e\u043d\u0438\u043d\u0433 <strong>NFS<\/strong> (\u0432 <strong>\/etc\/system<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u043e\u043a\u0438, <span style=\"text-decoration: underline;\"><span style=\"color: #0000ff;\"><em>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/em><\/span><\/span>):<\/li>\n<\/ul>\n<p><code>set nfs:nfs4_nra=16<br \/>\nset nfs:nfs4_bsize=1048576<br \/>\nset nfs:nfs4_max_transfer_size=1048576<br \/>\nset rpcmod:clnt_max_conns=8<\/code><\/p>\n<p>\u041d\u0430\u043b\u0435\u0442\u0443 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a:<\/p>\n<p><code># echo nfs4_nra\/W0t16 | mdb -kw<br \/>\n# echo nfs4_bsize\/W0t1048576 | mdb -kw<br \/>\n# echo nfs4_max_transfer_size\/W0t1048576 | mdb -kw<br \/>\n# echo clnt_max_conns\/W0t8 | mdb -kw<br \/>\n<\/code><br \/>\n\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p><code># echo nfs4_nra\/D | mdb -k<br \/>\nnfs4_nra:<br \/>\nnfs4_nra: 16 <\/code><\/p>\n<p>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435:<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">nfs:nfs4_nra<\/span><\/strong><\/em> &#8211; Controls the number of read-ahead operations that are queued by the NFS version 4 client when sequential access to a file is discovered. These read-ahead operations increase concurrency and read throughput. Each read-ahead request is generally for one logical block of file data. Default 4.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">nfs:nfs4_bsize<\/span><\/strong><\/em> &#8211; Controls the logical block size used by the NFS version 4 client. This block size represents the amount of data that the client attempts to read from or write to the server when it needs to do an I\/O. Default 32768 (32 Kbytes).<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">nfs:nfs4_max_transfer_size<\/span><\/strong><\/em> &#8211; Controls the maximum size of the data portion of an NFS version 4 READ, WRITE, READDIR, or READDIRPLUS request. This parameter controls both the maximum size of the request that the server returns as well as the maximum size of the request that the client generates. Default 32768 (32 Kbytes).<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">rpcmod:clnt_max_conns<\/span><\/strong><\/em> &#8211; Controls the number of TCP connections that the NFS client uses when communicating with each NFS server. The kernel RPC is constructed so that it can multiplex RPCs over a single connection, but multiple connections can be used if desired. Default 1.<\/p>\n<p>&#8211; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u043b\u043e\u043a\u0430 (\u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 <strong>\/etc\/auto_direct<\/strong>):<\/p>\n<p><code>\/data\/share \u00a0 \u00a0 \u00a0 -rw,rsize=1048576,wsize=1048576 server.com:\/data\/share<\/code><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff6600;\"><em><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong><\/em><\/span><\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 <strong>share lock<\/strong> &#8211; <a href=\"https:\/\/docs.oracle.com\/en\/operating-systems\/solaris\/oracle-solaris\/11.4\/manage-nfs\/clear-locks-command.html\">clear_locks<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b NFS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f SUN \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 \u041e\u0421 Solaris. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043d\u0430 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438. \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434: Solaris 10\/11 (\u0441\u0435\u0440\u0432\u0435\u0440), Kubuntu Linux, \u00a0kernel\u00a03.0.0-12-generic-pae (\u043a\u043b\u0438\u0435\u043d\u0442)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,24],"tags":[],"class_list":["post-2000","post","type-post","status-publish","format-standard","hentry","category-linux","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2000"}],"version-history":[{"count":23,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":6524,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions\/6524"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}