{"id":2629,"date":"2025-06-20T09:24:56","date_gmt":"2025-06-20T07:24:56","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=2629"},"modified":"2025-06-20T09:24:56","modified_gmt":"2025-06-20T07:24:56","slug":"lvm-per-ambiente-di-test","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=2629","title":{"rendered":"LVM per ambiente di test"},"content":{"rendered":"<p>Arrivati a questo punto si deve predisporre il sistema in modo da poter creare dei volumi logici con LVM sui device\u00a0 DRBD, la prima cosa da fare \u00e8 istruire LVM ad accettare drbd, quindi modificare \/etc\/lvm\/lvm.conf commentando le due righe originali e sostituendole con queste due:<\/p>\n<p>filter = [ &#8220;a|drbd[01]|&#8221;, &#8220;r|.*|&#8221; ]<br \/>\nglobal_filter = [ &#8220;a|drbd[01]|&#8221;, &#8220;r|.*|&#8221; ]<br \/>\nQui il mio <a href=\"http:\/\/clark.tipistrani.it\/wp-content\/uploads\/2025\/06\/lvm.txt\">lvm<\/a><\/p>\n<p>Su nodo A (marino)<br \/>\npvcreate \/dev\/drbd0<br \/>\nvgcreate xen1 \/dev\/drbd0<\/p>\n<p>pvdisplay<br \/>\n&#8212; Physical volume &#8212;<br \/>\nPV Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/dev\/drbd0<br \/>\nVG Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xen1<br \/>\nPV Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01,76 TiB \/ not usable &lt;3,64 MiB<br \/>\nAllocatable \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0yes<br \/>\nPE Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04,00 MiB<br \/>\nTotal PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0461407<br \/>\nFree PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0319327<br \/>\nAllocated PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0142080<br \/>\nPV UUID \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0LgPfCD-mUSy-eJiL-oEtg-pv1f-xRn7-QSpMmA<br \/>\nvgdisplay<br \/>\n&#8212; Volume group &#8212;<br \/>\nVG Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xen1<br \/>\nSystem ID<br \/>\nFormat \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0lvm2<br \/>\nMetadata Areas \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nMetadata Sequence No \u00a017<br \/>\nVG Access \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0read\/write<br \/>\nVG Status \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0resizable<br \/>\nMAX LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00<br \/>\nCur LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a07<br \/>\nOpen LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a05<br \/>\nMax PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00<br \/>\nCur PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nAct PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nVG Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01,76 TiB<br \/>\nPE Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04,00 MiB<br \/>\nTotal PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0461407<br \/>\nAlloc PE \/ Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0142080 \/ 555,00 GiB<br \/>\nFree \u00a0PE \/ Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0319327 \/ &lt;1,22 TiB<br \/>\nVG UUID \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0b7Fb9S-Sng4-y1l3-52zc-Tr67-vseC-uI72ey<\/p>\n<p>Su nodo B (pedretti)<br \/>\npvcreate \/dev\/drbd1<br \/>\nvgcreate xen2 \/dev\/drbd1<\/p>\n<p>pvdisplay<br \/>\n&#8212; Physical volume &#8212;<br \/>\nPV Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/dev\/drbd1<br \/>\nVG Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xen2<br \/>\nPV Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;1,82 TiB \/ not usable 3,76 MiB<br \/>\nAllocatable \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0yes<br \/>\nPE Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04,00 MiB<br \/>\nTotal PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0476784<br \/>\nFree PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0429424<br \/>\nAllocated PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a047360<br \/>\nPV UUID \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ZuGKZ6-ML8Z-ecTw-TwNt-z6PU-outF-385ofw<br \/>\nvgdisplay<br \/>\n&#8212; Volume group &#8212;<br \/>\nVG Name \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xen2<br \/>\nSystem ID<br \/>\nFormat \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0lvm2<br \/>\nMetadata Areas \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nMetadata Sequence No \u00a07<br \/>\nVG Access \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0read\/write<br \/>\nVG Status \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0resizable<br \/>\nMAX LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00<br \/>\nCur LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04<br \/>\nOpen LV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02<br \/>\nMax PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00<br \/>\nCur PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nAct PV \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01<br \/>\nVG Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;1,82 TiB<br \/>\nPE Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04,00 MiB<br \/>\nTotal PE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0476784<br \/>\nAlloc PE \/ Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a047360 \/ 185,00 GiB<br \/>\nFree \u00a0PE \/ Size \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0429424 \/ &lt;1,64 TiB<br \/>\nVG UUID \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0QIgpXW-ZRez-CAzN-s0r6-ARPD-8L4u-L72E5v<\/p>\n<p>Su nodo A<br \/>\nlvcreate -L 50G \u00a0xen1 -n lupo<br \/>\nsu nodo B<br \/>\nlvcreate -L 70G xen2 -n alpino<br \/>\ncon questi ultimi due passi si creano i volumi logici che saranno gli HD di due VM, per comodit\u00e0\u00a0 si usa il nome dell&#8217;host che verr\u00e0 configurato\u00a0 e che verr\u00e0 scritto nel file di configurazione della VM ma si pu\u00f2 usare qualsiasi forma sia comoda.<\/p>\n<p><a href=\"http:\/\/clark.tipistrani.it\/?p=2617\">back<\/a>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <a href=\"http:\/\/clark.tipistrani.it\/?p=2624\">home<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arrivati a questo punto si deve predisporre il sistema in modo da poter creare dei volumi logici con LVM sui device\u00a0 DRBD, la prima cosa da fare \u00e8 istruire LVM ad accettare drbd, quindi modificare \/etc\/lvm\/lvm.conf commentando le due righe originali e sostituendole con queste due: filter = [ &#8220;a|drbd[01]|&#8221;, &#8220;r|.*|&#8221; ] global_filter = [ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,304,165,6],"tags":[37,34,36,131,86],"class_list":["post-2629","post","type-post","status-publish","format-standard","hentry","category-linux","category-lvm2","category-virtualizzazione-work","category-work","tag-cluster-2","tag-drbd","tag-ha","tag-lvm2","tag-xen"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2629"}],"version-history":[{"count":4,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2629\/revisions"}],"predecessor-version":[{"id":2656,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2629\/revisions\/2656"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2629"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}