{"id":377,"date":"2024-12-30T19:24:50","date_gmt":"2024-12-30T17:24:50","guid":{"rendered":"https:\/\/pauli.work\/?p=377"},"modified":"2025-01-04T14:48:06","modified_gmt":"2025-01-04T12:48:06","slug":"proxmox-lvm-zfs-mirror-conversion","status":"publish","type":"post","link":"https:\/\/pauli.work\/?p=377","title":{"rendered":"Proxmox lvm -> zfs mirror conversion"},"content":{"rendered":"\n<p>I Have single drive for my main proxmox node. It has all VM&#8217;s disks. Separate hardware raid has proxmox install.<\/p>\n\n\n\n<p>Try first in a VM before proceeding. I mainly created this for my self, when I tried this in a VM. Yet to be done in practice in production.<\/p>\n\n\n\n<p>Plug your new drive in and reboot node.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup disk<\/h2>\n\n\n\n<p>Go to: Node -> Disks -> ZFS<br>Make a ZFS pool with that single drive.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"419\" src=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-2.png\" alt=\"\" class=\"wp-image-387\" srcset=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-2.png 794w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-2-300x158.png 300w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-2-768x405.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<p>Thin provisioning can be enabled in Datacenter -> Storage<br>Edit the storage and enable Thin provisioning.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"250\" src=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-4.png\" alt=\"\" class=\"wp-image-390\" srcset=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-4.png 604w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-4-300x124.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Migrate VM&#8217;s &amp; CT&#8217;s<\/h2>\n\n\n\n<p>Move all hosts to the new Drive. Probably recommended Delete source is checked.<\/p>\n\n\n\n<p>VM: Hardware -> Hard Disk<br>Select the drive you want to move -> Disk Action -> Move Storage<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"276\" src=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-3-1024x276.png\" alt=\"\" class=\"wp-image-389\" srcset=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-3-1024x276.png 1024w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-3-300x81.png 300w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-3-768x207.png 768w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-3.png 1151w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>CT: Resources -> Root Disk<br>Select the drive you want to move Volume Action -> Move Storage<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"215\" src=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-5.png\" alt=\"\" class=\"wp-image-391\" srcset=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-5.png 924w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-5-300x70.png 300w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-5-768x179.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/figure>\n\n\n\n<p>We can check on the drive we migrated from, is everything is migrated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Raid time<\/h2>\n\n\n\n<p>Go to Node -> Disks -> LVM<br>Select the Storage you moved everything off of -> More -> Destroy<\/p>\n\n\n\n<p>Datacenter -> Storage<br>Select the Storage you moved everything off of -> Remove<\/p>\n\n\n\n<p>Now SSH, in to your server<\/p>\n\n\n\n<p>You will need the disk id&#8217;s of the zfs storage and the disk we deleted.<br>Basically <code># zpool attach &lt;pool> &lt;current-disk-id> &lt;new-disk-id><\/code> To make a mirror raid.<br>You can get the id of your drive with <code>ls -l \/dev\/disk\/by-id\/<\/code> <br>Also will need the current disk, can be show with <code>zpoll status &lt;pool><\/code>  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"918\" src=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-6-1024x918.png\" alt=\"\" class=\"wp-image-393\" srcset=\"https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-6-1024x918.png 1024w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-6-300x269.png 300w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-6-768x688.png 768w, https:\/\/pauli.work\/wp-content\/uploads\/2024\/12\/image-6.png 1030w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<p>ZFS single-disk to mirror <br><a href=\"https:\/\/askubuntu.com\/questions\/1301828\/extend-existing-single-disk-zfs-with-a-mirror-without-formating-the-existing-hdd\">https:\/\/askubuntu.com\/questions\/1301828\/extend-existing-single-disk-zfs-with-a-mirror-without-formating-the-existing-hdd<\/a><\/p>\n\n\n\n<p>Proxmox ZFS thin-provisioning<br><a href=\"https:\/\/forum.proxmox.com\/threads\/zfs-enable-thin-provisioning.41549\/\">https:\/\/forum.proxmox.com\/threads\/zfs-enable-thin-provisioning.41549\/<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I Have single drive for my main proxmox node. It has all VM&#8217;s disks. Separate hardware raid has proxmox install. Try first in a VM before proceeding. I mainly created this for my self, when I tried this in a VM. Yet to be done in practice in production. Plug your new drive in and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":437,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pauli.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=377"}],"version-history":[{"count":6,"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/posts\/377\/revisions\/396"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pauli.work\/index.php?rest_route=\/wp\/v2\/media\/437"}],"wp:attachment":[{"href":"https:\/\/pauli.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pauli.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pauli.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}