{"id":289314,"date":"2018-09-13T01:45:02","date_gmt":"2018-09-12T21:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=289314"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=289314","title":{"rendered":"\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 LINSTOR \u0434\u043b\u044f Proxmox"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e47\/594\/c07\/e47594c0721332fb46493d20339bb1be.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e LINBIT \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c DRBD-\u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434 \u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 LVM \u0438\u043b\u0438 ZFS \u043f\u0443\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c LINSTOR \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u043e\u043c\u0430 \u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f DRBD-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>LINSTOR \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 thin-provisioning, \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0448\u0442\u0443\u043a.<a name=\"habracut\"><\/a><\/p>\n<p>  <\/p>\n<h1 id=\"linstor-satellites\">LINSTOR Satellites<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0430\u0433\u0430\u044e \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c Proxmox \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043d\u043e\u0434\u044b <code>pve1<\/code>, <code>pve2<\/code> \u0438 <code>pve3<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u2014 \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <strong>drbd-utils<\/strong> \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c <strong>\u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430<\/strong> \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 linstor \u0438 \u0443\u0441\u0442\u0430\u0432\u043d\u043e\u0432\u0438\u043c <strong>kernel-headers<\/strong>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438\u0437 \u043d\u0435\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">wget -O- https:\/\/packages.linbit.com\/package-signing-pubkey.asc | apt-key add -  echo \"deb http:\/\/packages.linbit.com\/proxmox\/ proxmox-5 drbd-9.0\" \\   &gt; \/etc\/apt\/sources.list.d\/linbit.list  apt-get update apt-get -y install pve-headers apt-get -y install drbd-dkms drbdtop<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0430\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0434\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">modproble drbd cat \/proc\/drbd<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 8 \u0432\u0435\u0440\u0441\u0438\u044e, \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u0443 \u0432\u0430\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f in-tree \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 <code>dkms status<\/code> \u0447\u0442\u043e \u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e dkms-\u043c\u043e\u0434\u0443\u043b\u044f.<br \/>  \u0414\u043b\u044f LINSTOR \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DRBD 9 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <strong>linstor-proxmox<\/strong> \u043f\u0430\u043a\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">apt-get -y install linstor-proxmox systemctl start linstor-satellite.service systemctl enable linstor-satellite.service<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"linstor-controller\">LINSTOR Controller<\/h1>\n<p>  <\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 LXC-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c debian-\u0448\u0430\u0431\u043b\u043e\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">wget http:\/\/download.proxmox.com\/images\/system\/debian-9.0-standard_9.3-1_amd64.tar.gz -P \/var\/lib\/vz\/template\/cache\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pct create 100 local:vztmpl\/debian-9.0-standard_9.3-1_amd64.tar.gz \\   --hostname=linstor-controller \\   --net0=name=eth0,bridge=vmbr0,gw=10.1.0.1,ip=10.1.0.123\/16<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u0432\u043e\u0439\u0434\u0435\u043c \u0432 \u043d\u0435\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pct start 100 pct exec 100 bash<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">apt-get update  apt-get -y upgrade<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 linstor \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <strong>linstor-controller<\/strong> \u0438 <strong>linstor-client<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">wget -O- https:\/\/packages.linbit.com\/package-signing-pubkey.asc | apt-key add -  echo \"deb http:\/\/packages.linbit.com\/proxmox\/ proxmox-5 drbd-9.0\" \\   &gt; \/etc\/apt\/sources.list.d\/linbit.list apt-get update &amp;&amp; apt-get install -y linstor-server linstor-client systemctl start linstor-controller.service systemctl enable linstor-controller.service<\/code><\/pre>\n<p>  <\/p>\n<p>Linstor \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c locale:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sed -i '\/en_US.UTF-8 UTF-8\/ s\/^# \/\/' \/etc\/locale.gen locale-gen<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0437\u043e\u043d\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">dpkg-reconfigure tzdata<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"konfigurirovanie-hranilischa\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/h1>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor node create pve1 10.1.0.11 linstor node create pve2 10.1.0.12 linstor node create pve3 10.1.0.13<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f DRBD-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor node interface create pve1 data 10.2.0.11 linstor node interface create pve2 data 10.2.0.12 linstor node interface create pve3 data 10.2.0.13<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>linstor node list<\/code>:<\/p>\n<p>  <\/p>\n<pre><code>\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e \u250a Node \u250a NodeType  \u250a Addresses                        \u250a State  \u250a \u255e\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2561 \u250a pve1 \u250a SATELLITE \u250a 10.0.1.11,10.0.2.11:3366 (PLAIN) \u250a Online \u250a \u250a pve2 \u250a SATELLITE \u250a 10.0.1.12,10.0.2.12:3366 (PLAIN) \u250a Online \u250a \u250a pve3 \u250a SATELLITE \u250a 10.0.1.13,10.0.2.13:3366 (PLAIN) \u250a Online \u250a \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0443\u043b\u044b:<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c <strong>lvm thin-pool<\/strong> \u0434\u043b\u044f drbd:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lvcreate -L 800G --thinpool drbdpool pve<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 linstor:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor storage-pool create lvmthin pve1 drbdpool pve\/drbdpool linstor storage-pool create lvmthin pve2 drbdpool pve\/drbdpool linstor storage-pool create lvmthin pve3 drbdpool pve\/drbdpool<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0443\u043b\u044b \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>data<\/code> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor storage-pool set-property pve1 drbdpool PrefNic data linstor storage-pool set-property pve2 drbdpool PrefNic data linstor storage-pool set-property pve3 drbdpool PrefNic data<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>linstor storage-pool list<\/code>:<\/p>\n<p>  <\/p>\n<pre><code>\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u250a StoragePool \u250a Node \u250a Driver        \u250a PoolName     \u250a FreeCapacity \u250a TotalCapacity \u250a Support \u255e\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504 \u250a drbdpool    \u250a pve1 \u250a LvmThinDriver \u250a hv1\/drbdpool \u250a      800 GiB \u250a       800 GiB \u250a true               \u250a drbdpool    \u250a pve1 \u250a LvmThinDriver \u250a hv1\/drbdpool \u250a      800 GiB \u250a       800 GiB \u250a true               \u250a drbdpool    \u250a pve3 \u250a LvmThinDriver \u250a hv3\/drbdpool \u250a      800 GiB \u250a       800 GiB \u250a true               \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043d\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 Proxmox:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &gt;&gt; \/etc\/pve\/storage.cfg &lt;&lt;EOF  drbd: drbdpool         content rootdir,images         controller 10.1.0.123         controllervm 100         redundancy 3 EOF<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"nastroyka-ha-dlya-kontrollera\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 HA \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/h1>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u043d\u0430\u0448 linstor container \u043d\u0430 linstor storage.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u043a \u0434\u043b\u044f \u043d\u0435\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pct exec 100 bash linstor resource-definition create vm-100-disk-1 linstor volume-definition create vm-100-disk-1 4G linstor resource create vm-100-disk-1 --auto-place 3 -s pve<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>linstor resource list<\/code>:<\/p>\n<p>  <\/p>\n<pre><code>\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e \u250a ResourceName    \u250a Node \u250a Port \u250a    State \u250a \u255e\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2504\u2561 \u250a vm-100-disk-1   \u250a pve1 \u250a 7000 \u250a UpToDate \u250a \u250a vm-100-disk-1   \u250a pve2 \u250a 7000 \u250a UpToDate \u250a \u250a vm-100-disk-1   \u250a pve3 \u250a 7000 \u250a UpToDate \u250a \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>linstor-satellite<\/strong> \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432\u0441\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0437\u0430\u0442\u0435\u043c \u043e\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u0442 <strong>linstor-controller<\/strong>, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u0440\u0436\u0430\u0442\u044c <strong>linstor-controller<\/strong> \u0432 \u0442\u043e\u043c \u0436\u0435 \u043c\u0435\u0441\u0442\u0435 \u0447\u0442\u043e \u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043e\u043f\u0446\u0438\u044e <code>--keep-res=vm-100<\/code> \u0434\u043b\u044f linstor-satellite \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434\u0430\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">echo -e \"[Service]\\nExecStart=\\nExecStart=\/usr\/share\/linstor-server\/bin\/Satellite --logs=\/var\/log\/linstor-satellite --config-directory=\/etc\/linstor --keep-res=vm-100\" | SYSTEMD_EDITOR=tee systemctl edit linstor-satellite.service<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <code>vm-100-disk-1<\/code> \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435. <\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <strong>linstor-controller<\/strong> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 drbd-\u0434\u0438\u0441\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pct shutdown 100 dd if=\/var\/lib\/vz\/images\/100\/vm-100-disk-1.raw of=\/dev\/drbd\/by-res\/vm-100-disk-1\/0 bs=8M status=progress e2fsck -f \/dev\/drbd\/by-res\/vm-100-disk-1\/0  resize2fs \/dev\/drbd\/by-res\/vm-100-disk-1\/0 <\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sed -i '\/^rootfs:\/d' \/etc\/pve\/lxc\/100.conf echo 'rootfs: drbdpool:vm-100-disk-1,size=4G' &gt;&gt; \/etc\/pve\/lxc\/100.conf<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a, \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u0438\u0441\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pct start 100 rm -f \/var\/lib\/vz\/images\/100\/vm-100-disk-1.raw<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 proxmox <strong>ha-manager<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ha-manager add ct:100 --max_relocate=3 --max_restart=3<\/code><\/pre>\n<p>  <\/p>\n<p>PROFIT<\/p>\n<p>  <\/p>\n<h1 id=\"proizvoditelnost-i-tyuning\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0442\u044e\u043d\u0438\u043d\u0433<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441\u043e split-brain, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor controller drbd-options \\   --after-sb-0pri=discard-zero-changes \\   --after-sb-1pri=discard-secondary \\   --after-sb-2pri=disconnect<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043c\u043e\u0435\u0439 10G \u0441\u0435\u0442\u0438, \u044f \u043d\u0430\u0448\u0435\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">linstor controller drbd-options \\   --max-buffers=36864 \\   --rcvbuf-size=2097152 \\   --sndbuf-size=1048576  linstor controller drbd-options \\   --c-fill-target=10240 \\   --c-max-rate=737280 \\   --c-min-rate=20480 \\   --c-plan-ahead=10<\/code><\/pre>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/423101\/\"> https:\/\/habr.com\/post\/423101\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e47\/594\/c07\/e47594c0721332fb46493d20339bb1be.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e LINBIT \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c DRBD-\u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434 \u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 LVM \u0438\u043b\u0438 ZFS \u043f\u0443\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c LINSTOR \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u043e\u043c\u0430 \u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f DRBD-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>LINSTOR \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 thin-provisioning, \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0448\u0442\u0443\u043a.<\/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-289314","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289314","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=289314"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289314\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}