{"id":4269,"date":"2014-06-05T14:36:37","date_gmt":"2014-06-05T11:36:37","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=4269"},"modified":"2015-02-05T12:03:51","modified_gmt":"2015-02-05T10:03:51","slug":"direct-maps-%d0%b2-solaris","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=4269","title":{"rendered":"Direct Maps \u0432 Solaris"},"content":{"rendered":"<p><strong>Direct Maps<\/strong> \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 <strong>autofs<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e \u0441\u0443\u0442\u0438 \u0441 \u0430\u0432\u0442\u043e\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0440\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435. \u0418 \u043d\u0435\u0432\u0430\u0436\u043d\u043e, \u044d\u0442\u043e <strong>NFS<\/strong> \u0438\u043b\u0438 <strong>LOFS<\/strong>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f &#8211; \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>automount<\/strong>. \u041e\u043d\u0430 \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0440 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435: \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043e\u0442\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p><!--more--><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <strong>\/etc\/auto_master<\/strong> \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p><code>\/- auto_direct -rw<\/code><\/p>\n<p>\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0430\u0439\u043b \/<strong>etc\/auto_direct<\/strong> \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p><code>\/data\/test\/test2 -rw,rsize=1048576,wsize=1048576 data.domain.com:\/data\/test\/test2<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<p><code># automount -v<br \/>\nautomount: mount \/data\/test\/test2<br \/>\nautomount: no unmounts<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0448\u0430\u0440\u0443 &#8211; \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u0432<strong> \/etc\/auto_direct<\/strong>, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c &#8211; \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>automount<\/strong>.<\/p>\n<p>\u0427\u0442\u043e \u0435\u0449\u0451 \u043f\u043e\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0447\u0442\u043e \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0441\u0430\u043c\u0430 \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u0415\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0434\u0430 \u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u0440\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u0442\u043e\u0447\u043a\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 <strong>555<\/strong> <strong>root:root<\/strong> \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e, \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0442\u0430\u043a\u0443\u044e \u0448\u0430\u0440\u0443 \u0432 <strong>global-zone<\/strong>, \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0437\u043e\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 <strong>permission denied<\/strong>. \u041d\u0430\u0448\u0451\u043b \u0442\u0430\u043a \u0436\u0435 <a href=\"http:\/\/unix.derkeiler.com\/Mailing-Lists\/SunManagers\/2008-07\/msg00096.html\" target=\"_blank\" rel=\"nofollow\">\u0437\u0430\u043c\u0435\u0442\u043a\u0443<\/a> \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u0438 &#8220;\u044f\u043a\u043e\u0431\u044b&#8221; <a href=\"http:\/\/unix.derkeiler.com\/Mailing-Lists\/SunManagers\/2008-07\/msg00120.html\" target=\"_blank\" rel=\"nofollow\">\u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b <strong>mapping uid&#8217;\u043e\u0432<\/strong> (\u0442\u043e \u0435\u0441\u0442\u044c \u044e\u0437\u0435\u0440 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u043d\u043e, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 <strong>UID<\/strong> \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u0435 \u0436\u0435 \u043f\u0440\u0430\u0432\u0430, \u0447\u0442\u043e \u043d\u0430 \u0448\u0430\u0440\u0443 <strong>NFS<\/strong>) \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c, <strong>SMF<\/strong>-\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e &#8211; \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <strong>automount<\/strong>):<\/p>\n<p>1) \u0432 <strong>\/etc\/resolv.conf<\/strong> \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<p><code>search mydomain.com<\/code><\/p>\n<p>2) \u0432 <strong>DNS<\/strong> \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c<\/p>\n<p><code>_nfsv4idmapdomain.mydomain.com TXT \"mydomain.com\"<\/code><\/p>\n<p>\u0433\u0434\u0435 <strong>mydomain.com<\/strong> \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><code>$ nslookup -q=txt _nfsv4idmapdomain | grep _nfsv4idmapdomain<br \/>\n_nfsv4idmapdomain.mydomain.com text = \"mydomain.com\"<\/code><\/p>\n<p>3) <strong>NFS<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043c\u0435\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 <strong>nfsmapid_domain<\/strong>:<\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c<\/span><\/em><\/p>\n<p><code># sharectl get -p nfsmapid_domain nfs<\/code><\/p>\n<p>&#8211; <em><span style=\"color: #ff6600;\">\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c<\/span><\/em><\/p>\n<p><code># sharectl set -p nfsmapid_domain=mydomain.com nfs<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Direct Maps \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 autofs, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e \u0441\u0443\u0442\u0438 \u0441 \u0430\u0432\u0442\u043e\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0440\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435. \u0418 \u043d\u0435\u0432\u0430\u0436\u043d\u043e, \u044d\u0442\u043e NFS \u0438\u043b\u0438 LOFS. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f &#8211; \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 automount. \u041e\u043d\u0430 \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0440 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435: \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043e\u0442\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-4269","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4269","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=4269"}],"version-history":[{"count":2,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4269\/revisions"}],"predecessor-version":[{"id":4690,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4269\/revisions\/4690"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}