{"id":253876,"date":"2015-03-26T17:44:03","date_gmt":"2015-03-26T13:44:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=253876"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=253876","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Linux \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 Shared DAS \u0438 ZFS"},"content":{"rendered":"<p>     \t\u042d\u0442\u0438\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u043c\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 <a href=\"http:\/\/habrahabr.ru\/company\/etegro\/blog\/215333\/\">\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Shared DAS<\/a> \u0438 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0432 \u041e\u0421 GNU\\Linux.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0446\u0438\u043a\u043b\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0434\u0432\u0443\u0445-\u0443\u0437\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u0435\u0433\u043e \u0431\u0430\u0437\u0435 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 iSCSI-\u0421\u0425\u0414 \u0441 ZFS.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/a07\/47e\/ed1\/a0747eed1984499e8d40fbf93a2a20b8.png\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  <b>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/b><\/p>\n<p>  <b>\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/b><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a \u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u043b\u043a\u0435 (JBOD) \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 SAS HBA \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/f67\/972\/633\/f67972633c8c4a3eb4cc304020cd33e0.png\"\/><br \/>  <i>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0434\u0432\u0443\u0445\u0443\u0437\u043b\u043e\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/i><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435 (Cluster-in-Box). \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u043f\u0430\u0440\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 JBOD, \u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u044b <a href=\"http:\/\/habrahabr.ru\/company\/etegro\/blog\/250345\/\">\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438<\/a>.<\/p>\n<p>  <a href=\"http:\/\/habrastorage.org\/files\/5b2\/ff7\/bc6\/5b2ff7bc6d59422b980a124fa83b5ba0.jpg\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/5b2\/ff7\/bc6\/5b2ff7bc6d59422b980a124fa83b5ba0.jpg\"\/><\/a><br \/>  <i>Cluster-in-Box<\/i><\/p>\n<p>  \u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0435\u043d\u0434\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  <b>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/b><\/p>\n<p>  \u041d\u0438\u0436\u0435 \u0434\u0430\u043d\u044b \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0431\u0449\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445:  <\/p>\n<ul>\n<li>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432: \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432; \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 JBOD; \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 SAS (multipath) \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. <\/li>\n<li>\u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u041e\u0421 \u043c\u043d\u043e\u0433\u043e\u043f\u0443\u0442\u0435\u0432\u043e\u0439 \u0432\u0432\u043e\u0434\/\u0432\u044b\u0432\u043e\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u043c\u043e\u043d multipathd. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 bonding\/teaming. <\/li>\n<li>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u2014 ZFS. \u041e\u043d\u0430 \u0436\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043c\u0430\u043c\u0438, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. <\/li>\n<li>corosync+<a href=\"http:\/\/clusterlabs.org\/doc\/en-US\/Pacemaker\/1.1-pcs\/html\/Clusters_from_Scratch\/index.html\">pacemaker<\/a> \u2014 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f HA-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. <\/li>\n<\/ul>\n<p>  <b>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 GNU\/Linux<\/b><\/p>\n<p>  <b>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/b> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0443\u0437\u043b\u0430\u0445<\/p>\n<p>  \u041d\u0430 \u0443\u0437\u043b\u0430\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d GNU\/Linux \u0441 OpenSSH. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430 <a href=\"https:\/\/access.redhat.com\/documentation\/en-US\/Red_Hat_Enterprise_Linux\/7\/html\/High_Availability_Add-On_Overview\/index.html\">CentOS 7<\/a>, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 (\u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438) \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 GNU\/Linux \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/p>\n<p>  <b>\u0421\u0435\u0442\u044c<\/b><\/p>\n<p>  \u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0438 (\u043d\u0430 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f):  <\/p>\n<pre><code class=\"bash\">systemctl stop NetworkManager systemctl disable NetworkManager yum erase NetworkManager* <\/code><\/pre>\n<p>  \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 10Gbps:  <\/p>\n<ul>\n<li>ens11f0, ens11f1 \u2014 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. \u0411\u0443\u0434\u0443\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 team0; <\/li>\n<li>enp130s0 \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 corosync. <\/li>\n<\/ul>\n<p>  \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Team.<\/p>\n<p>  \u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b:  <\/p>\n<pre><code class=\"bash\"># cat ifcfg-ens11f0 DEVICETYPE=TeamPort BOOTPROTO=none USERCTL=no ONBOOT=no TEAM_MASTER=team0 TEAM_PORT_CONFIG='{&quot;prio&quot;:100}' NAME=&quot;ens11f0&quot; UUID=&quot;704d85d9-7430-4d8f-b920-792263d192ba&quot; HWADDR=&quot;00:8C:FA:E5:6D:E0&quot; <\/code><\/pre>\n<pre><code class=\"bash\"># cat ifcfg-ens11f1 DEVICETYPE=TeamPort BOOTPROTO=none USERCTL=no ONBOOT=no TEAM_MASTER=team0 TEAM_PORT_CONFIG='{&quot;prio&quot;:100}' NAME=ens11f1 UUID=4bd90873-9097-442a-8ac8-7971756b0fc5 HWADDR=00:8C:FA:E5:6D:E1 <\/code><\/pre>\n<p>  team0 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:  <\/p>\n<pre><code class=\"bash\"># cat .\/ifcfg-team0 DEVICE=team0 DEVICETYPE=Team BOOTPROTO=static USERCTL=no ONBOOT=yes IPADDR=10.3.254.64 NETMASK=255.255.255.0 GATEWAY=10.3.254.1 DNS1=192.168.10.107 TEAM_CONFIG='{&quot;runner&quot;:{&quot;name&quot;:&quot;activebackup&quot;},&quot;link_watch&quot;:{&quot;name&quot;:&quot;ethtool&quot;}}' <\/code><\/pre>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439:  <\/p>\n<pre><code class=\"bash\"># cat .\/ifcfg-enp130s0 TYPE=Ethernet BOOTPROTO=none NAME=enp130s0 UUID=2933ee35-eb16-485e-b65c-e186d772b480 ONBOOT=yes HWADDR=00:8C:FA:CE:56:DB IPADDR=172.30.0.1 PREFIX=28 <\/code><\/pre>\n<p>  <b>\/etc\/hosts<\/b><\/p>\n<pre><code class=\"bash\"># cat \/etc\/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6  172.30.0.1 node1 172.30.0.2 node2  10.3.254.64 node1-ext 10.3.254.12 node2-ext <\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/b><\/p>\n<p>  \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u0440\u0432\u043e\u043b:<\/p>\n<pre><code class=\"bash\">systemctl stop firewalld systemctl disable firewalld <\/code><\/pre>\n<p>  <b>Multipath<\/b><\/p>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a SAS HBA \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043e\u0434\u043d\u0438\u043c \u043f\u0443\u0442\u0435\u043c, \u0431\u043b\u043e\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d multipathd.<\/p>\n<pre><code class=\"bash\">yum install device-mapper-multipath.x86_64  touch \/etc\/multipath.conf systemctl start multipathd systemctl enable multipathd <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <\/p>\n<pre><code class=\"bash\">multipath -l<\/code><\/pre>\n<p> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"bash\">35000c50077ad9a3f dm-6 SEAGATE ,ST2000NX0263 size=1.8T features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=0 status=active | `- 0:0:0:0 sdb 8:16 active undef running `-+- policy='service-time 0' prio=0 status=enabled `- 0:0:6:0 sdg 8:96 active undef running 35000c50077580317 dm-4 SEAGATE ,ST2000NX0273 size=1.8T features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=0 status=active | `- 0:0:1:0 sdc 8:32 active undef running `-+- policy='service-time 0' prio=0 status=enabled `- 0:0:7:0 sdh 8:112 active undef running <\/code><\/pre>\n<p>  \u041a \u0441\u0430\u043c\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0438\u043f\u0430:  <\/p>\n<pre><code class=\"bash\">\/dev\/mapper\/35000c50077580317 \/dev\/mapper\/35000c50077ad9287 \/dev\/mapper\/35000c50077ad9a3f \/dev\/mapper\/35000c50077ad8aab \/dev\/mapper\/35000c50077ad92ef <\/code><\/pre>\n<p>  <b>ZFS<\/b><\/p>\n<p>  ZFS \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0441\u0432\u044f\u0437\u043a\u0438 MD+LVM. \u042d\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f heartbeat \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0431\u043b\u043e\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f (iSCSI), \u0442\u0430\u043a \u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 (NFS), \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0438 \u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 CentOS \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 <a href=\"http:\/\/zfsonlinux.org\/epel.html\">http:\/\/zfsonlinux.org\/epel.html<\/a>:  <\/p>\n<pre><code class=\"bash\">yum install ftp:\/\/ftp.yandex.ru\/epel\/7\/x86_64\/e\/epel-release-7-5.noarch.rpm yum install http:\/\/archive.zfsonlinux.org\/epel\/zfs-release.el7.noarch.rpm yum install kernel-devel zfs <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u043b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u043e\u043c. \u041f\u0443\u043b \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f.  <\/p>\n<pre><code class=\"bash\">zpool create -o cachefile=none pool72 raidz1 \/dev\/mapper\/35000c50077* zfs create -s -V 1T pool72\/vol1T zpool export pool72 <\/code><\/pre>\n<p>  \u0422\u043e\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e iSCSI. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043c\u0435\u0442\u0430\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u0442\u043e\u043c\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b udev \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u044d\u0442\u0438 \u0442\u043e\u043c\u0430:  <\/p>\n<pre><code class=\"bash\">cp \/lib\/udev\/rules.d\/60-persistent-storage.rules \/etc\/udev\/rules.d\/60-persistent-storage.sed -i '1s\/^\/KERNEL==&quot;zd*&quot; SUBSYSTEM==&quot;block&quot; GOTO=&quot;persistent_storage_end&quot;\\n\/' \/etc\/systemctl restart systemd-udevd <\/code><\/pre>\n<p>  <b>iSCSI<\/b><\/p>\n<pre><code class=\"bash\">yum install targetcli.noarch <\/code><\/pre>\n<p>  <b>Corosync+Pacemaker<\/b><\/p>\n<p>  <b>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430):<\/b><\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:  <\/p>\n<pre><code class=\"bash\">yum install pcs fence-agents-all <\/code><\/pre>\n<p>  \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0438 pacemaker \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ZFS \u0438 iSCSI:  <\/p>\n<pre><code class=\"bash\">cd \/usr\/lib\/ocf\/resource.d\/heartbeat\/ wget https:\/\/github.com\/skiselkov\/stmf-ha\/raw\/master\/heartbeat\/ZFS wget https:\/\/github.com\/ClusterLabs\/resource-agents\/raw\/master\/heartbeat\/iSCSITarget wget https:\/\/github.com\/ClusterLabs\/resource-agents\/raw\/master\/heartbeat\/iSCSILogicalUnit chmod a+x .\/ZFS chmod a+x .\/iSCSILogicalUnit chmod a+x .\/iSCSITarget  passwd hacluster  systemctl enable pcsd systemctl enable corosync systemctl enable pacemaker  systemctl start pcsd <\/code><\/pre>\n<p>  <b>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (\u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0437\u043b\u0435):<\/b><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:  <\/p>\n<pre><code class=\"bash\">pcs cluster auth node1 node2 <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u0440\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0434\u0432\u0443\u043c\u044f \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u043a\u043e\u043b\u044c\u0446\u0430\u043c\u0438 \u2014 \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443:  <\/p>\n<pre><code class=\"bash\">pcs cluster setup --start --name cib node1,node1-ext node2,node2-ext  pcs status Cluster name: cib WARNING: no stonith devices and stonith-enabled is not false Last updated: Thu Mar 12 14:38:37 2015 Last change: Thu Mar 12 14:38:24 2015 via crmd on node1 Current DC: NONE 2 Nodes configured 0 Resources configured  Node node1 (1): UNCLEAN (offline) Node node2 (2): UNCLEAN (offline)  Full list of resources:  PCSD Status: node1: Online node2: Online  Daemon Status: corosync: active\/disabled pacemaker: active\/disabled pcsd: active\/enabled <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 <b>WARNING: no stonith devices and stonith-enabled is not false<\/b> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e <a href=\"http:\/\/habrahabr.ru\/post\/200348\/\">\u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b STONITH \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/a>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e fencing&#8217;\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SCSI-3 Persistant Reservation. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 Split Brain \u043e\u0434\u0438\u043d \u0438\u0437 \u0443\u0437\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0438. \u0412 \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0443\u043b ZFS.  <\/p>\n<pre><code class=\"bash\">pcs stonith create fence-pool72 fence_scsi \\ devices=&quot;\/dev\/mapper\/35000c50077580317, \\ \/dev\/mapper\/35000c50077ad8aab, \\ \/dev\/mapper\/35000c50077ad9287, \\ \/dev\/mapper\/35000c50077ad92ef, \\ \/dev\/mapper\/35000c50077ad9a3f&quot; meta provides=unfencing <\/code><\/pre>\n<p>  \u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432\u043e\u0439 \u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043a\u0432\u043e\u0440\u0443\u043c\u0430:  <\/p>\n<pre><code class=\"bash\">pcs property set no-quorum-policy=ignore <\/code><\/pre>\n<p>  <b>\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/b><\/p>\n<p>  \u0420\u0435\u0441\u0443\u0440\u0441\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0443\u043b\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 <b>group-pool72<\/b>:  <\/p>\n<pre><code class=\"bash\">pcs resource create pool72 ZFS \\ params pool=&quot;pool72&quot; importargs=&quot;-d \/dev\/mapper\/&quot; \\ op start timeout=&quot;90&quot; op stop timeout=&quot;90&quot; --group=group-pool72 <\/code><\/pre>\n<p>  iSCSI-target \u0438 LUN:  <\/p>\n<pre><code class=\"bash\">pcs resource create target-pool72 iSCSITarget \\ portals=&quot;10.3.254.230&quot; iqn=&quot;iqn.2005-05.com.etegro:cib.pool72&quot; \\ implementation=&quot;lio-t&quot; --group group-pool72  pcs resource create lun1-pool72 iSCSILogicalUnit \\ target_iqn=&quot;iqn.2005-05.com.etegro:cib.pool72&quot; lun=&quot;1&quot; \\ path=&quot;\/dev\/pool72\/vol1T&quot; --group group-pool72 <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u0440\u0433\u0435\u0442 LIO \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 CentOS \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432.<\/p>\n<p>  IP-\u0430\u0434\u0440\u0435\u0441:  <\/p>\n<pre><code class=\"bash\">pcs resource create ip-pool72 IPaddr2 \\ ip=&quot;10.3.254.230&quot; cidr_netmask=24 --group group-pool722 <\/code><\/pre>\n<p>  \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435:  <\/p>\n<pre><code class=\"bash\">pcs constraint order pool72 then target-pool72 pcs constraint order target-pool72 then lun1-pool72 pcs constraint order lun1-pool72 then ip-pool72 <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0451. \u041f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f, \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u043e\u043f\u0440\u043e\u0441\u044b.     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/254083\/\"> http:\/\/habrahabr.ru\/post\/254083\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u042d\u0442\u0438\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u043c\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 <a href=\"http:\/\/habrahabr.ru\/company\/etegro\/blog\/215333\/\">\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Shared DAS<\/a> \u0438 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0432 \u041e\u0421 GNU\\Linux.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0446\u0438\u043a\u043b\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0434\u0432\u0443\u0445-\u0443\u0437\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u0435\u0433\u043e \u0431\u0430\u0437\u0435 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 iSCSI-\u0421\u0425\u0414 \u0441 ZFS.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/a07\/47e\/ed1\/a0747eed1984499e8d40fbf93a2a20b8.png\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-253876","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253876"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253876\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}