20 commenti su “How to install PROXMOX VE 3.1 on SOFTWARE-RAID

  1. Pingback: Proxmox 3.1 auf Softraid mit GPT « ClearOS und Zarafa

  2. Dear Boff Blog,

    Can you show me how if i want to use RAID 10 ?
    I’ve installed proxmox in server with 4 unit 2TB HDD.
    Right now is only 1 HDD is used.
    please give me some clue…

    Thanks…
    Sorry for bad english.

    • Got Proxmox 3.2 working on a raid10 like this:
      mdadm –create /dev/md0 –level=10 –raid-disks=4 missing /dev/sdb2 /dev/sdc2 /dev/sdd2
      mdadm –create /dev/md1 –level=10 –raid-disks=4 missing /dev/sdb3 /dev/sdc3 /dev/sdd3

      One problem i encountered was that the original proxmox 3.2 partitions were GPT, therefore I had to change the sfdisk commands to:
      sgdisk -R=/dev/sdb /dev/sda (copy partitions from sda to sdb; same command with sdc/sdd)
      sgdisk -t 2:fd00 /dev/sda (change partition type of /dev/sda2 to raid)

  3. Did you not encounter this problem?

    root@proxmox:~# mdadm –create /dev/md0 –level=1 –raid-disks=2 missing /dev/sdb1
    mdadm: cannot open /dev/sdb1: No such file or directory
    root@proxmox:~# partprobe
    root@proxmox:~# mdadm –create /dev/md0 –level=1 –raid-disks=2 missing /dev/sdb1
    mdadm: cannot open /dev/sdb1: Device or resource busy
    root@proxmox:~# dmsetup table
    pve-swap: 0 8388608 linear 8:2 2048
    pve-root: 0 201326592 linear 8:2 8390656
    pve-data: 0 732463104 linear 8:2 209717248
    root@proxmox:~# dmsetup status
    pve-swap: 0 8388608 linear
    pve-root: 0 201326592 linear
    pve-data: 0 732463104 linear
    root@proxmox:~# cat /proc/mdstat
    Personalities : [raid1]
    md0 : active raid1 sdb[0]
    488255360 blocks super 1.2 [2/1] [U_]

    unused devices:
    root@proxmox:~# mdadm –create /dev/md1 –level=1 –raid-disks=2 missing /dev/sdb2
    mdadm: cannot open /dev/sdb2: Device or resource busy

    Etc…

  4. Answering my own post, for a reason I can’t remember if I figured it out, but I had to simply do “mdadm –stop /dev/md0” and the same for md1. Then the raid creation worked. Also the partprobe is essential to do after you modify the partitions on any drives.

    So I did go through the rest of the instructions and, as I apprehended, I ended up with an unbootable system. Here I only had the ProxMox CD, nothing else. I could have reinstalled from scratch, but I had a couple of VMs (which I did not bothered to lose… but) I tried to recover the system anyway, in case somebody else follow this (and for my own short-term future reference).

    –First off, thanks for these instructions.

    — Second, I think it would be possible (and much safer) to configure all raid1 partitions on sdb ONLY at first and then boot from it using GRUB2 command line. If it fails, you can still boot normally from sda, if it succeed, THEN copy the raid1 partitions from sdb to sda.

    To boot from GRUB2 command line, when you see the grub menu, press c and at the grub prompt, type:

    grub> insmod raid
    grub> insmod mdraid1x
    grub> insmod lvm
    grub> set root=(md/0)
    grub> linux /vmlinuz-2.6.32-26-pve root=/dev/mapper/pve-root
    grub> initrd /initrd.img-2.6.32-26-pve
    grub> boot

    (once set root= is define, you can “ls /” to get the exact filenames for the kernel and the image)

    Then proceed and follow the instruction parts on adding sda to the raid running on sdb.

    — Third, I think the part that failed me in these instructions is that “dmraid” had to be replace by “mdraid1x” in GRUB_PRELOAD_MODULES.

    Since I knew ProxMox install on sda, I simply reinstalled ProxMox from the CD knowing sdb would be untouched (with my existing VMs). Once booted from (the newly reinstalled) sda, I could then reinstall the mdadm tools, which started the arrays on sdb and I could mount md0 to fix it… (chanding “dmraid” to “mdraid1x” and reissue “update-grub” and “update-initramfs -u”.

    To not screwup my virgin ProxMox on sda, I poweroff the system and disconnected the sda drive. So I simply booted from a one drive raid1 from sdb and it worked. I the poweroff, rehook the sda drive and manually boot from the grub command from md0. o ‘mbootdoff the rd, the root file system is from LVM on md1, and I have access to sda to add he partitions the raid1.

  5. The last couple of steps have some syntax issues:

    vgreduce pve / dev/sda2 should be vgreduce pve /dev/sda2

    pvremove / dev/sda2 should be pvremove /dev/sda2

    sfdisk-change-id / dev / sda 2 fd should be sfdisk –change-id /dev/sda 2 fd

    mdadm-add / dev/md1 / dev/sda2 should be mdadm –add /dev/md1 /dev/sda2

    And /proc/mdstat should be either cat /proc/mdstat or watch cat /proc/mdstat (or something equivalent)

  6. It works like a charm! I succesfully installed proxmox VE 3.1 with raid1 in an HP proliant ml350e gen8 server with dynamic smart array (soft raiid) disabled.

    Thank you very much

    Stefano

  7. I’ve used proxmox 1.9 with mdadm (software raid1). After some the system started to hang from time to time. I’ve investigated the issue and it seems that when you use snapshot feature then this may cause the whole system hang. Is there are any similar issues with 3.x?

  8. In step 7 i got
    mdadm: An option must be given to set the mode before a second device
    (/dev/md0) is listed
    and i can’t continue, can you help please?
    thanks

  9. Pingback: Proxmox VE 3.1でソフトウェアRAIDを使ってみた(システム領域含む) | 俺的備忘録 〜なんかいろいろ〜

  10. Pingback: How to install PROXMOX VE 3.2 on SOFTWARE-RAID (MDRAID) | Articoll

  11. I find this very interesting tutorial and I’m starting to implement a raid1 config with proxmox 3.3.
    But instaling proxmox3 create a GPT partition table and nor fdisk nor sfdisk support GPT partitions.
    Any update needed for this tutorial with parted ?

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...