{"id":170,"date":"2009-08-17T18:35:43","date_gmt":"2009-08-17T16:35:43","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/2009\/08\/17\/proxmox-software-raid\/"},"modified":"2009-08-17T18:35:43","modified_gmt":"2009-08-17T16:35:43","slug":"proxmox-software-raid","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2009\/08\/17\/proxmox-software-raid\/","title":{"rendered":"proxmox software raid"},"content":{"rendered":"<p>I have a testing box that didn&#8217;t have a hardware raid card in it so I decided to see if I could get this going for grins. I&#8217;m fairly certain this whole setup would break at the least desirable moment and I certainly won&#8217;t be using this for any production boxes, but it was an interesting diversion into the world of software raid which I&#8217;d never used before. The basic order I followed is:<\/p>\n<p>Install Proxmox as usual onto 1 drive(\/dev\/sda)<br \/>\naptitude install mdadm initramfs-tools<\/p>\n<p>Edit the modules list for initramfs-tools to force add the raid1 module<\/p>\n<p>mkinitramfs -o \/boot\/test -r \/dev\/mapper\/pve-root<br \/>\nadd a grub list entry to point to my new initrd image<\/p>\n<p>fdisk the 2nd disk to look exactly like the first disk<br \/>\nmdadm &#8211;create \/dev\/md0 &#8211;level=1 &#8211;raid-devices=2 missing \/dev\/sdb1<br \/>\nmdadm &#8211;create \/dev\/md1 &#8211;level=1 &#8211;raid-devices=2 missing \/dev\/sdb2<br \/>\nmdadm &#8211;detail &#8211;scan >> \/etc\/mdadm\/mdadm.conf<\/p>\n<p>pvcreate \/dev\/md1<br \/>\nvgextend pve \/dev\/md1<br \/>\npvmove \/dev\/sda2 \/dev\/md1<br \/>\nvgreduce pve \/dev\/sda2<\/p>\n<p>mdadm &#8211;add \/dev\/md1 \/dev\/sda2<br \/>\nwatch -n 1 &#8220;cat \/proc\/mdstat&#8221;<\/p>\n<p>mkfs.ext3 \/dev\/md0<br \/>\nmkdir \/mnt\/md0<br \/>\nmount \/dev\/md0 \/mnt\/md0<br \/>\ncp -ax \/boot \/mnt\/md0<\/p>\n<p>edit fstab to map the \/boot to \/dev\/md0<\/p>\n<p>sfdisk &#8211;change-id \/dev\/sda1 fd<br \/>\nmdadm &#8211;add \/dev\/md0 \/dev\/sda1<\/p>\n<p>use grub to install bootloader onto the 2nd hard drive <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a testing box that didn&#8217;t have a hardware raid card in it so I decided to see if I could get this going for grins. I&#8217;m fairly certain this whole setup would break at the least desirable moment and I certainly won&#8217;t be using this for any production boxes, but it was an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":0,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}