[SOLVED]Proxmox VE 3.2 with Software Raid 5 (mdraid)

  • Hello .
    On my server I installed Proxmox VE 3.2 (on 1HD 1TB) , and I decided to install it on raid5 (Software) so I have to add 3 more hd , ok done .
    I've read many guides but encountered some problems , I am aware that Proxmox VE does not support Software RAID (mdraid) Wiki
    the guide which I have tried to follow ,This refers to the version 3.1 , some command fails .


    Install mdadm

    Code
    apt-get install mdadm


    Code
    modprobe raid5


    Code
    fdisk -l


    Output


    in all the guides I found reference is made to the command sfdisk , but does not handle partitions GPT , so I have to use sgdisk right?
    how can I proceed, I need help
    many Thanks

    • Offizieller Beitrag

    You don't need sfdisk, sgdisk, or fdisk because raid doesn't need partitions :) I can't tell which drive proxmox is on. So, I will assume it is on /dev/sda.


    Clear each drive:

    Code
    parted /dev/sdb mklabel msdos
    parted /dev/sdc mklabel msdos
    parted /dev/sdd mklabel msdos


    Create the array:

    Code
    mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sd[bcd]


    Format the array (xfs in this example):

    Code
    mkfs.xfs /dev/md0


    Get uuid from blkid command:

    Code
    blkid


    Make directory:

    Code
    mkdir /media/md0


    Add line to fstab:

    Code
    UUID=abd24394-0ac7-4223-8f8d-87349a8def41 /media/md0 xfs defaults,nofail 0 2


    Mount the drive (or reboot):

    Code
    mount /media/md0


    Should be available in the proxmox web interface now :)

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • thanks a lot ryecoaaron
    with these steps I create the raid 5 on 3 hd ? sdb , sdc , sdd


    I formatted the hd in ext3

    Code
    mkfs.ext3 /dev/md0


    Code
    blkid


    Code
    /dev/sda2: UUID="4566711b-bb01-4d17-9123-a58c14212d00" TYPE="ext3"
    /dev/sda3: UUID="cOKcBg-RgDG-Cxqg-7OoJ-Wbo2-ALA0-79Vks9" TYPE="LVM2_member"
    /dev/sdb: UUID="ceb857b2-f7a5-df4f-cdbb-487235e80956" UUID_SUB="38f22951-98fe-53ee-9294-755b546a9a62" LABEL="vnet:0" TYPE="linux_raid_member"
    /dev/sdc: UUID="ceb857b2-f7a5-df4f-cdbb-487235e80956" UUID_SUB="cb2a1188-6308-bd32-8736-bf59eb35bdfd" LABEL="vnet:0" TYPE="linux_raid_member"
    /dev/mapper/pve-root: UUID="cfbe9ae1-f171-4cc0-b61b-474586c83336" TYPE="ext3"
    /dev/sdd: UUID="ceb857b2-f7a5-df4f-cdbb-487235e80956" UUID_SUB="d13fbeaa-4cca-1a3a-ea54-4fb91b1b2c30" LABEL="vnet:0" TYPE="linux_raid_member"
    /dev/mapper/pve-swap: UUID="c9600c48-1819-47d4-b753-613d35e85ce4" TYPE="swap"
    /dev/mapper/pve-data: UUID="beb2f7c5-2de9-427b-b873-6dc7bf2f5ec4" TYPE="ext3"
    /dev/md0: UUID="77617804-f75d-4a50-b46c-6ce3e8ab50c1" SEC_TYPE="ext2" TYPE="ext3"


    now I have to add this line to fstab

    Code
    UUID="77617804-f75d-4a50-b46c-6ce3e8ab50c1 /media/md0 ext3 defaults,nofail 0 2


    right?

  • I have done something wrong

    Code
    mdadm --detail /dev/md0


    • Offizieller Beitrag

    I should've said let the raid build before formatting. What is the output of:


    cat /proc/mdstat

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I redid the formatting
    I chose the xfs

    Code
    more /proc/mdstat


    Code
    Personalities : [raid6] [raid5] [raid4]
    md0 : active raid5 sdd[3] sdc[1] sdb[0]
          1953262592 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
          [===========>.........]  recovery = 56.5% (552714368/976631296) finish=89.0min speed
    =79334K/sec


    now creating the raid 5 on 3 HD , right?

    • Offizieller Beitrag

    Glad it is working. I don't think ext4 has any benefit over ext3 for vm files.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • chente

    Hat das Thema geschlossen.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!