{"id":434175,"date":"2024-10-02T15:00:42","date_gmt":"2024-10-02T15:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=434175"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=434175","title":{"rendered":"<span>Persistent Storage \u0434\u043b\u044f Kubernetes \u043d\u0430 \u0431\u0430\u0437\u0435 Linstor<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 DevOps&#8217;\u044b, \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0449\u0438\u0435 kubernetes \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: &#171;\u041a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c Persistent Storage \u0432 \u0441\u0432\u043e\u0451\u043c kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435?&#187; \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: ceph, nfs, mayastor, iscsi, linstor, longhorn. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 &#8212; linstor (\u043e\u043d \u0436\u0435 piraeus). \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0432\u043e\u0439 Persistent Storage \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0435\u043c\u0443 kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443<\/a>.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435:<\/h2>\n<p>  \u041f\u0440\u043e PersistentStorage &#8212; \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/717486\/\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 linstor \u0438 \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/680286\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435:<\/h2>\n<p>  <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u0439 kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/a> \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0430\u0448 PersistentStorage. <br \/>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f 7\u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0441 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c.<br \/>  \u0410\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0441 \u043d\u0430\u0448\u0438\u043c <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u043c \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/a>: <code>172.20.0.31\/24<\/code><\/p>\n<p>  \u0414\u043b\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 RedOS8. \u0422\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b drbd-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0432\u043e\u0440\u0443\u043c \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 primary-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430.<br \/>  \u0412 \u0432\u0438\u0434\u0443 \u0441\u043a\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<br \/><code>CPU: 2 \/ RAM: 2GB \/ HDD: 8GB + \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0434\u0438\u0441\u043a<\/code> \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c Storage. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 10\u0413\u0411.<br \/>  \u0425\u043e\u0441\u0442\u043d\u0435\u0439\u043c\u044b \u043c\u043e\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0443\u0442 <code>s1, s2, s3<\/code> (\u043d\u0438\u0436\u0435 \u044d\u0442\u0438 \u0445\u043e\u0441\u0442\u043d\u0435\u0439\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430).<br \/>  \u0410\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a: <code>172.20.0.21\/24, 172.20.0.22\/24, 172.20.0.23\/24<\/code><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a:<\/h2>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, <strong>\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 <\/strong><a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\"><strong>kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/strong><\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438:<\/p>\n<pre><code class=\"bash\">dnf update -y &amp;&amp; reboot<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b (\u043d\u0430 \u0412\u041c <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a> docker-ce \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c):<\/p>\n<p>dnf install -y docker-ce drbd drbd-kmod drbd-reactorzfs zfs-kmod<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<pre><code class=\"bash\">echo -e \"dm_cache\\ndm_crypt\\ndm_thin_pool\\ndm_snapshot\\ndm_writecache\\ndrbd\\ndrbd_transport_tcp\\nlibcrc32c\\nloop\\nnvmet_rdma\\nnvme_rdma\\n\" &gt; \/etc\/modules-load.d\/drbd.conf echo \"options drbd usermode_helper=disabled\" &gt; \/etc\/modprobe.d\/drbd.conf modprobe -a $(cat \/etc\/modules-load.d\/drbd.conf)<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443\u0435\u043c lvm:<\/p>\n<pre><code class=\"bash\">sed -i 's\/# global_filter = .*\/global_filter = \\[ \\\"r\\|\\^\\\/dev\\\/drbd\\|\\\" \\]\/' \/etc\/lvm\/lvm.conf<\/code><\/pre>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 (s1, s2, s3) \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <code>\/etc\/systemd\/system\/linstor-satellite.service<\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-satellit&#8217;a<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; \/etc\/systemd\/system\/linstor-satellite.service [Unit] Description=Linstor-Satellite container After=docker.service Wants=network-online.target docker.socket Requires=docker.socket  [Service] Restart=always ExecStartPre=\/bin\/bash -c \"\/usr\/bin\/docker container inspect linstor-satellite 2&gt; \/dev\/null || \/usr\/bin\/docker run -d --name=linstor-satellite --net=host -v \/dev:\/dev -v \/var\/lib\/drbd:\/var\/lib\/drbd --privileged quay.io\/piraeusdatastore\/piraeus-server:v1.29.1\" ExecStart=\/usr\/bin\/docker start -a linstor-satellite ExecStop=\/usr\/bin\/docker stop -t 10 linstor-satellite  [Install] WantedBy=multi-user.target EOF <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c linstor-satellite:<\/p>\n<pre><code class=\"bash\">systemctl daemon-reload &amp;&amp; systemctl enable --now linstor-satellite<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 s1 (<strong><u>\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0435\u0439<\/u><\/strong>) \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <code>\/etc\/systemd\/system\/linstor-controller.service<\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; \/etc\/systemd\/system\/linstor-controller.service [Unit] Description=Linstor-Controller container After=docker.service Wants=network-online.target docker.socket Requires=docker.socket  [Service] Restart=always ExecStartPre=\/bin\/bash -c \"\/usr\/bin\/docker container inspect linstor-controller 2&gt; \/dev\/null || \/usr\/bin\/docker run -d --name=linstor-controller --net=host -v \/dev:\/dev -v \/var\/lib\/linstor\/:\/var\/lib\/linstor\/ --privileged quay.io\/piraeusdatastore\/piraeus-server:v1.29.1 startController\" ExecStart=\/usr\/bin\/docker start -a linstor-controller ExecStop=\/usr\/bin\/docker stop -t 10 linstor-controller  [Install] WantedBy=multi-user.target EOF <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 linstor-controller:<\/p>\n<pre><code class=\"bash\">systemctl daemon-reload &amp;&amp; systemctl enable --now linstor-controller<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-controller&#8217;a \u0438 linstor-satellite \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">docker ps<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cca\/afb\/7b3\/ccaafb7b37440b180ef391f36f68ee4f.png\" width=\"974\" height=\"42\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cca\/afb\/7b3\/ccaafb7b37440b180ef391f36f68ee4f.png\"\/><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430  linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u0412\u041c s1 (\u0442\u0430\u043c \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d linstor-cotroller) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<br \/>\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443, \u0447\u0442\u043e <u>\u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430&#187; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0449\u0435\u043d linstor-controller<\/u>.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <code>linstor-controller<\/code>: \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u043d\u043e\u0434\u0443, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0443\u044e\u0441\u044f \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 <code>s1,<\/code> \u0430\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <code>172.20.0.21<\/code><\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node create s1 172.20.0.21<\/code><\/pre>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u043d\u043e\u0434\u044b s2 (172.20.0.22) \u0438 s3 (172.20.0.23):<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node create s2 172.20.0.22 docker exec -it linstor-controller linstor node create s3 172.20.0.23<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node list<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c6d\/add\/d70\/c6daddd705c9164cb3a1f21a7b07b580.png\" width=\"711\" height=\"172\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c6d\/add\/d70\/c6daddd705c9164cb3a1f21a7b07b580.png\"\/><\/figure>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u043c\u0435\u0441\u0442\u0430 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e PersistentStorage:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor physical-storage list<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fac\/567\/b60\/fac567b606181676dcc82e61fa45822a.png\" width=\"555\" height=\"173\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fac\/567\/b60\/fac567b606181676dcc82e61fa45822a.png\"\/><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0434\u0438\u0441\u043a <code>\/dev\/sdb<\/code> \u043f\u043e 10\u0413\u0411 \u043a\u0430\u0436\u0434\u044b\u0439.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0438\u0441\u043a\u0430\u0445 (<code>\/dev\/sdb<\/code>) StoragePool \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>sp01<\/code> \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: <code>s1, s2, s3<\/code>  (<strong><u>\u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 s1 \u0441 linstor-controller&#8217;\u043e\u043c<\/u><\/strong>):<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s1 \/dev\/sdb --storage-pool sp01 docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s2 \/dev\/sdb --storage-pool sp01 docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s3 \/dev\/sdb --storage-pool sp01<\/code><\/pre>\n<p>\u041b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor storage-pool list<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b68\/a93\/991\/b68a93991fe5de253dad4ebed0cdc8ec.png\" width=\"974\" height=\"130\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b68\/a93\/991\/b68a93991fe5de253dad4ebed0cdc8ec.png\"\/><\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c PersistentStorage \u043a kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443<\/h2>\n<p>\u041d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:<\/p>\n<pre><code class=\"bash\">mkdir ~\/piraeus &amp;&amp; cd ~\/piraeus<\/code><\/pre>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c piraeus-operator<\/p>\n<pre><code class=\"bash\">git clone --branch v2 https:\/\/github.com\/piraeusdatastore\/piraeus-operator<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 helm-\u0447\u0430\u0440\u0442 piraeus-operator:<\/p>\n<pre><code class=\"bash\">helm install piraeus-operator piraeus-operator\/charts\/piraeus --create-namespace -n piraeus-datastore --set installCRDs='true'<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 linstor-cluster&#8217;a \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0443\u0431\u0435\u0440\u0435:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; LinstorCluster.yaml apiVersion: piraeus.io\/v1 kind: LinstorCluster metadata:   name: linstorcluster spec:   externalController:     url: http:\/\/172.20.0.21:3370 EOF<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 linstor-satellite:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; LinstorSatelliteConfiguration.yaml apiVersion: piraeus.io\/v1 kind: LinstorSatelliteConfiguration metadata:   name: satellite spec:   podTemplate:     spec:       initContainers:         - name: drbd-module-loader           \\$patch: delete       hostNetwork: true EOF<\/code><\/pre>\n<p>\u0413\u043b\u0443\u0431\u0438\u043d\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: \u043c\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 (\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043d\u043e\u0433\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u0439) \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u0430 \u043d\u043e\u0434\u0430(\u044b) \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c drbd-\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u043d\u0430 \u043d\u043e\u0434\u0443 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a&#8230; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 yaml-\u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"bash\">kubectl apply -f LinstorCluster.yaml kubectl apply -f LinstorSatelliteConfiguration.yaml<\/code><\/pre>\n<p>\u0416\u0434\u0451\u043c \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0438\u043d\u0443\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"bash\">kubectl get pods -n piraeus-datastore<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a6c\/24a\/f13\/a6c24af13a68b48e6da36af192184818.png\" width=\"974\" height=\"133\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6c\/24a\/f13\/a6c24af13a68b48e6da36af192184818.png\"\/><\/figure>\n<p>\u0423\u0441\u043f\u0435\u0445! \u0412\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u043e\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/storage\/storage-classes\/\" rel=\"noopener noreferrer nofollow\">StorageClass<\/a>:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt; EOF &gt; StorageClass.yaml apiVersion: storage.k8s.io\/v1 kind: StorageClass metadata:   name: linstor provisioner: linstor.csi.linbit.com parameters:   autoPlace: \"2\"   storagePool: sp01   resourceGroup: DfltRscGrp EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply -f StorageClass.yaml<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430!<\/p>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b PersistentStorage<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 PersistentVolumeClaim, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043a\u0443\u0431\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 PersistentVolume \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; testpvc.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata:   name: testpvc spec:   storageClassName: linstor   accessModes:     - ReadWriteOnce   resources:     requests:       storage: 500Mi EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply \u2013f testpvc.yaml<\/code><\/pre>\n<pre><code class=\"bash\">kubectl get pvc<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e53\/321\/0ad\/e533210adf170b3b1b7009edf77c29e6.png\" width=\"974\" height=\"42\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e53\/321\/0ad\/e533210adf170b3b1b7009edf77c29e6.png\"\/><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c pod, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a testpvc, \u043f\u043e\u0434\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data<\/code> \u0438 \u043d\u0430\u0447\u043d\u0451\u0442 \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 <code>\/data<\/code> \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; testpod.yaml apiVersion: v1 kind: Pod metadata:   name: alpine   namespace: default spec:   containers:   - name: alpine     image: alpine     command: [\/bin\/sh]     args: [\"-c\", \"while true; do echo $(date '+%Y%m%d-%H%M%S') &gt; \/data\/$(date '+%Y%m%d-%H%M%S') ; sleep 10; done\"]     volumeMounts:     - name: testpvc       mountPath: \/data   volumes:   - name: testpvc     persistentVolumeClaim:       claimName: \"testpvc\" EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply \u2013f testpod.yaml<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"bash\">kubectl get pods<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f2\/0a6\/0bc\/1f20a60bcca3113331e8c1d54afa9c34.png\" width=\"527\" height=\"53\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f2\/0a6\/0bc\/1f20a60bcca3113331e8c1d54afa9c34.png\"\/><\/figure>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 shell pod&#8217;a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data:<\/code><\/p>\n<pre><code class=\"bash\">kubectl exec -it alpine -- ls -la \/data<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/142\/edd\/d5b\/142eddd5b4a8f69c4bf95e593e3f8bf8.png\" width=\"930\" height=\"255\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/142\/edd\/d5b\/142eddd5b4a8f69c4bf95e593e3f8bf8.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e! \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 <code>\/data<\/code> \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0430\u0448 pod \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0432\u043e \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">kubectl delete pod alpine &amp;&amp; kubectl apply \u2013f testpod.yaml<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 pod&#8217;a \u043a\u0443\u0431\u0435\u0440 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 pod&#8217;a \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c PersistentStorage. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data<\/code> \u0432\u043e \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c pod&#8217;e:<\/p>\n<pre><code class=\"bash\">kubectl exec -it alpine -- ls -la \/data<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/635\/b6f\/e6f\/635b6fe6f5f9f92c372ee30cc54b059d.png\" width=\"919\" height=\"430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/635\/b6f\/e6f\/635b6fe6f5f9f92c372ee30cc54b059d.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c pod&#8217;e \u0444\u0430\u0439\u043b\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data <\/code>PersistentStorage \u0441\u043e\u0437\u0434\u0430\u043d, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<br \/>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b, \u043a\u043e\u043b\u043b\u0435\u0433\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/847568\/\"> https:\/\/habr.com\/ru\/articles\/847568\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 DevOps&#8217;\u044b, \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0449\u0438\u0435 kubernetes \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: &#171;\u041a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c Persistent Storage \u0432 \u0441\u0432\u043e\u0451\u043c kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435?&#187; \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: ceph, nfs, mayastor, iscsi, linstor, longhorn. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 &#8212; linstor (\u043e\u043d \u0436\u0435 piraeus). \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0432\u043e\u0439 Persistent Storage \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0435\u043c\u0443 kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443<\/a>.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435:<\/h2>\n<p>  \u041f\u0440\u043e PersistentStorage &#8212; \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/717486\/\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 linstor \u0438 \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/680286\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435:<\/h2>\n<p>  <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u0439 kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/a> \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0430\u0448 PersistentStorage. <br \/>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f 7\u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0441 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c.<br \/>  \u0410\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0441 \u043d\u0430\u0448\u0438\u043c <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u043c \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/a>: <code>172.20.0.31\/24<\/code><\/p>\n<p>  \u0414\u043b\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 RedOS8. \u0422\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b drbd-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0432\u043e\u0440\u0443\u043c \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 primary-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430.<br \/>  \u0412 \u0432\u0438\u0434\u0443 \u0441\u043a\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<br \/><code>CPU: 2 \/ RAM: 2GB \/ HDD: 8GB + \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0434\u0438\u0441\u043a<\/code> \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c Storage. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 10\u0413\u0411.<br \/>  \u0425\u043e\u0441\u0442\u043d\u0435\u0439\u043c\u044b \u043c\u043e\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0443\u0442 <code>s1, s2, s3<\/code> (\u043d\u0438\u0436\u0435 \u044d\u0442\u0438 \u0445\u043e\u0441\u0442\u043d\u0435\u0439\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430).<br \/>  \u0410\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a: <code>172.20.0.21\/24, 172.20.0.22\/24, 172.20.0.23\/24<\/code><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a:<\/h2>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, <strong>\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 <\/strong><a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\"><strong>kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/strong><\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438:<\/p>\n<pre><code class=\"bash\">dnf update -y &amp;&amp; reboot<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b (\u043d\u0430 \u0412\u041c <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a> docker-ce \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c):<\/p>\n<p>dnf install -y docker-ce drbd drbd-kmod drbd-reactorzfs zfs-kmod<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<pre><code class=\"bash\">echo -e \"dm_cache\\ndm_crypt\\ndm_thin_pool\\ndm_snapshot\\ndm_writecache\\ndrbd\\ndrbd_transport_tcp\\nlibcrc32c\\nloop\\nnvmet_rdma\\nnvme_rdma\\n\" &gt; \/etc\/modules-load.d\/drbd.conf echo \"options drbd usermode_helper=disabled\" &gt; \/etc\/modprobe.d\/drbd.conf modprobe -a $(cat \/etc\/modules-load.d\/drbd.conf)<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443\u0435\u043c lvm:<\/p>\n<pre><code class=\"bash\">sed -i 's\/# global_filter = .*\/global_filter = \\[ \\\"r\\|\\^\\\/dev\\\/drbd\\|\\\" \\]\/' \/etc\/lvm\/lvm.conf<\/code><\/pre>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u0445 (s1, s2, s3) \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <code>\/etc\/systemd\/system\/linstor-satellite.service<\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-satellit&#8217;a<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; \/etc\/systemd\/system\/linstor-satellite.service [Unit] Description=Linstor-Satellite container After=docker.service Wants=network-online.target docker.socket Requires=docker.socket  [Service] Restart=always ExecStartPre=\/bin\/bash -c \"\/usr\/bin\/docker container inspect linstor-satellite 2&gt; \/dev\/null || \/usr\/bin\/docker run -d --name=linstor-satellite --net=host -v \/dev:\/dev -v \/var\/lib\/drbd:\/var\/lib\/drbd --privileged quay.io\/piraeusdatastore\/piraeus-server:v1.29.1\" ExecStart=\/usr\/bin\/docker start -a linstor-satellite ExecStop=\/usr\/bin\/docker stop -t 10 linstor-satellite  [Install] WantedBy=multi-user.target EOF <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c linstor-satellite:<\/p>\n<pre><code class=\"bash\">systemctl daemon-reload &amp;&amp; systemctl enable --now linstor-satellite<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 s1 (<strong><u>\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0435\u0439<\/u><\/strong>) \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <code>\/etc\/systemd\/system\/linstor-controller.service<\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; \/etc\/systemd\/system\/linstor-controller.service [Unit] Description=Linstor-Controller container After=docker.service Wants=network-online.target docker.socket Requires=docker.socket  [Service] Restart=always ExecStartPre=\/bin\/bash -c \"\/usr\/bin\/docker container inspect linstor-controller 2&gt; \/dev\/null || \/usr\/bin\/docker run -d --name=linstor-controller --net=host -v \/dev:\/dev -v \/var\/lib\/linstor\/:\/var\/lib\/linstor\/ --privileged quay.io\/piraeusdatastore\/piraeus-server:v1.29.1 startController\" ExecStart=\/usr\/bin\/docker start -a linstor-controller ExecStop=\/usr\/bin\/docker stop -t 10 linstor-controller  [Install] WantedBy=multi-user.target EOF <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 linstor-controller:<\/p>\n<pre><code class=\"bash\">systemctl daemon-reload &amp;&amp; systemctl enable --now linstor-controller<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 linstor-controller&#8217;a \u0438 linstor-satellite \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">docker ps<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430  linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u0412\u041c s1 (\u0442\u0430\u043c \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d linstor-cotroller) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<br \/>\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443, \u0447\u0442\u043e <u>\u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430&#187; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0449\u0435\u043d linstor-controller<\/u>.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <code>linstor-controller<\/code>: \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u043d\u043e\u0434\u0443, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0443\u044e\u0441\u044f \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 <code>s1,<\/code> \u0430\u0439\u043f\u0438-\u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <code>172.20.0.21<\/code><\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node create s1 172.20.0.21<\/code><\/pre>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u043d\u043e\u0434\u044b s2 (172.20.0.22) \u0438 s3 (172.20.0.23):<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node create s2 172.20.0.22 docker exec -it linstor-controller linstor node create s3 172.20.0.23<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor node list<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u043c\u0435\u0441\u0442\u0430 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e PersistentStorage:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor physical-storage list<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0434\u0438\u0441\u043a <code>\/dev\/sdb<\/code> \u043f\u043e 10\u0413\u0411 \u043a\u0430\u0436\u0434\u044b\u0439.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0438\u0441\u043a\u0430\u0445 (<code>\/dev\/sdb<\/code>) StoragePool \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>sp01<\/code> \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: <code>s1, s2, s3<\/code>  (<strong><u>\u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 s1 \u0441 linstor-controller&#8217;\u043e\u043c<\/u><\/strong>):<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s1 \/dev\/sdb --storage-pool sp01 docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s2 \/dev\/sdb --storage-pool sp01 docker exec -it linstor-controller linstor physical-storage create-device-pool --pool-name lvmpool LVMTHIN s3 \/dev\/sdb --storage-pool sp01<\/code><\/pre>\n<p>\u041b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c:<\/p>\n<pre><code class=\"bash\">docker exec -it linstor-controller linstor storage-pool list<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c PersistentStorage \u043a kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443<\/h2>\n<p>\u041d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/847116\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e\u043d\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:<\/p>\n<pre><code class=\"bash\">mkdir ~\/piraeus &amp;&amp; cd ~\/piraeus<\/code><\/pre>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c piraeus-operator<\/p>\n<pre><code class=\"bash\">git clone --branch v2 https:\/\/github.com\/piraeusdatastore\/piraeus-operator<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 helm-\u0447\u0430\u0440\u0442 piraeus-operator:<\/p>\n<pre><code class=\"bash\">helm install piraeus-operator piraeus-operator\/charts\/piraeus --create-namespace -n piraeus-datastore --set installCRDs='true'<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 linstor-cluster&#8217;a \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0443\u0431\u0435\u0440\u0435:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; LinstorCluster.yaml apiVersion: piraeus.io\/v1 kind: LinstorCluster metadata:   name: linstorcluster spec:   externalController:     url: http:\/\/172.20.0.21:3370 EOF<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 linstor-satellite:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; LinstorSatelliteConfiguration.yaml apiVersion: piraeus.io\/v1 kind: LinstorSatelliteConfiguration metadata:   name: satellite spec:   podTemplate:     spec:       initContainers:         - name: drbd-module-loader           \\$patch: delete       hostNetwork: true EOF<\/code><\/pre>\n<p>\u0413\u043b\u0443\u0431\u0438\u043d\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: \u043c\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 (\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043d\u043e\u0433\u043e\u043d\u043e\u0434\u043e\u0432\u044b\u0439) \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u0430 \u043d\u043e\u0434\u0430(\u044b) \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c drbd-\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u043d\u0430 \u043d\u043e\u0434\u0443 \u043a\u0443\u0431\u0435\u0440-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a&#8230; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 yaml-\u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"bash\">kubectl apply -f LinstorCluster.yaml kubectl apply -f LinstorSatelliteConfiguration.yaml<\/code><\/pre>\n<p>\u0416\u0434\u0451\u043c \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0438\u043d\u0443\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"bash\">kubectl get pods -n piraeus-datastore<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0423\u0441\u043f\u0435\u0445! \u0412\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u043e\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/storage\/storage-classes\/\" rel=\"noopener noreferrer nofollow\">StorageClass<\/a>:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt; EOF &gt; StorageClass.yaml apiVersion: storage.k8s.io\/v1 kind: StorageClass metadata:   name: linstor provisioner: linstor.csi.linbit.com parameters:   autoPlace: \"2\"   storagePool: sp01   resourceGroup: DfltRscGrp EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply -f StorageClass.yaml<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430!<\/p>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b PersistentStorage<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 PersistentVolumeClaim, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043a\u0443\u0431\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 PersistentVolume \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 linstor-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; testpvc.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata:   name: testpvc spec:   storageClassName: linstor   accessModes:     - ReadWriteOnce   resources:     requests:       storage: 500Mi EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply \u2013f testpvc.yaml<\/code><\/pre>\n<pre><code class=\"bash\">kubectl get pvc<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c pod, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a testpvc, \u043f\u043e\u0434\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data<\/code> \u0438 \u043d\u0430\u0447\u043d\u0451\u0442 \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 <code>\/data<\/code> \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt; testpod.yaml apiVersion: v1 kind: Pod metadata:   name: alpine   namespace: default spec:   containers:   - name: alpine     image: alpine     command: [\/bin\/sh]     args: [\"-c\", \"while true; do echo $(date '+%Y%m%d-%H%M%S') &gt; \/data\/$(date '+%Y%m%d-%H%M%S') ; sleep 10; done\"]     volumeMounts:     - name: testpvc       mountPath: \/data   volumes:   - name: testpvc     persistentVolumeClaim:       claimName: \"testpvc\" EOF<\/code><\/pre>\n<pre><code class=\"bash\">kubectl apply \u2013f testpod.yaml<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"bash\">kubectl get pods<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 shell pod&#8217;a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data:<\/code><\/p>\n<pre><code class=\"bash\">kubectl exec -it alpine -- ls -la \/data<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e! \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 <code>\/data<\/code> \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0430\u0448 pod \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0432\u043e \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">kubectl delete pod alpine &amp;&amp; kubectl apply \u2013f testpod.yaml<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 pod&#8217;a \u043a\u0443\u0431\u0435\u0440 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 pod&#8217;a \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c PersistentStorage. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data<\/code> \u0432\u043e \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c pod&#8217;e:<\/p>\n<pre><code class=\"bash\">kubectl exec -it alpine -- ls -la \/data<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c pod&#8217;e \u0444\u0430\u0439\u043b\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/data <\/code>PersistentStorage \u0441\u043e\u0437\u0434\u0430\u043d, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<br \/>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b, \u043a\u043e\u043b\u043b\u0435\u0433\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/847568\/\"> https:\/\/habr.com\/ru\/articles\/847568\/<\/a><br \/><\/br><\/br><\/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-434175","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/434175","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=434175"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/434175\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=434175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=434175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=434175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}