{"id":119,"date":"2020-11-18T14:06:38","date_gmt":"2020-11-18T13:06:38","guid":{"rendered":"http:\/\/admin.bejkon.se\/?p=119"},"modified":"2020-11-18T14:07:13","modified_gmt":"2020-11-18T13:07:13","slug":"minska-hdd-storlek-i-gast-som-har-lagring-pa-zfs","status":"publish","type":"post","link":"https:\/\/admin.bejkon.se\/?p=119","title":{"rendered":"Minska hdd storlek i Proxmox g\u00e4st som har lagring p\u00e5 zfs"},"content":{"rendered":"\n<p>H\u00e4mtat fr\u00e5n: https:\/\/forum.proxmox.com\/threads\/shrink-zfs-disk.45835\/#post-220907<\/p>\n\n\n\n<p>\nBasic guide (may need improvments and it&#8217;s not failproof) to shrink zfs disks:<br><br>\n1. prepare your vm disk for shrinking and shut it down<br>\n2. in pve shell set new zfs pool size<br>\n\n\t\n\t\n\n\n\n\t\n\t\tCode:\n\t\n\t\n\t\t<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$zfs set volsize=&lt;new size&gt;G rpool\/data\/vm-&lt;vm id&gt;-disk-&lt;disk number&gt;\n<\/pre><\/div>\n\n\n<p>\n\t\n3. edit vm config in \/etc\/pve\/local\/qemu-server\/<strong>&lt;vm id&gt;<\/strong>.conf on line<br>\n\n\t\n\t\n\n\n\n\t\n\t\tCode:\n\t\n\t\n\t\t<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nvirtio0: local-zfs:vm-&lt;vm id&gt;-disk-&lt;disk number&gt;,size=&lt;new size&gt;G\n<\/pre><\/div>\n\n\n<p>\n\t\nObviusly the line may not be the same, just edit the disk size<br>\n4. in pve panel change the cache mode to something else and then revert back, this should update the config<br><br>\nNote: you may corrupt your partition table, to fix it in linux boot on a recovery live image like gparted and launch gdisk<br>\n\n\t\n\t\n\n\n\n\t\n\t\tCode:\n\t\n\t\n\t\t<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ gdisk \/dev\/vda\n<\/pre><\/div>\n\n\n<p>\n\t\nand then press v,x,e,w and y.<br>\nThis should do the trick.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>H\u00e4mtat fr\u00e5n: https:\/\/forum.proxmox.com\/threads\/shrink-zfs-disk.45835\/#post-220907 Basic guide (may need improvments and it&#8217;s not failproof) to shrink zfs disks: 1. prepare your vm disk for shrinking and shut it down 2. in pve shell set new zfs pool size Code: 3. edit vm config in \/etc\/pve\/local\/qemu-server\/&lt;vm id&gt;.conf on line Code: Obviusly the line may not be the same, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/admin.bejkon.se\/?p=119\" class=\"more-link\">Forts\u00e4tt l\u00e4sa<span class=\"screen-reader-text\"> \u201dMinska hdd storlek i Proxmox g\u00e4st som har lagring p\u00e5 zfs\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-119","post","type-post","status-publish","format-standard","hentry","category-proxmox"],"_links":{"self":[{"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/posts\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=119"}],"version-history":[{"count":2,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/admin.bejkon.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}