Proxmox VE 3.0 - RAID 1 - second volume - extending storage

wild.lucifero

New Member
Mar 30, 2018
4
0
1
59
Hello to everybody,
I would extend PVE storage on a new volume RAID (1). Is there someone that could help me please?
The actual server has installed Proxmox VE 3.0; it has installed 2 phisical disks (/dev/sda /dev/sdb) that are in the RAID 1 (dev/md0 for the boot and /dev/md1 for the root) with mdadm. I would add other 2 phisical disks (/dev/sdc and /dev/sdd) ; mirror them in a new volume (dev/md2) with mdadm and then extend the PVE adding their space.
I'm thinking to do the follow commands.
- fdisk /dev/sdc to create new partition type 8e
- sfdisk -d /dev/sdc | sfdisk -f /dev/sdd to replicate the same structure in /dev/sdd
- mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdd1 to create the volume raid
- mdadm --add /dev/md2 /dev/sdc1 to add into volume raid the device /dev/sdc1

- pvcreate /dev/sdc1 to create physicak extension
- vgextend "pve" /dev/sdc1 to extend volume group
- lvresize -l xxxxx /dev/mapper/pve-data to resize logical volume
- resize2fs /dev/mapper/pve-data to update the filesystem

- sfdisk -c /dev/sdc 1 fd
- mdadm --add /dev/md2 /dev/sdc1

I'm sure there is something wrong. Is it better to do:
- fdisk /dev/sdc to create new partition type 8e
- sfdisk -d /dev/sdc | sfdisk -f /dev/sdd to replicate the same structure in /dev/sdd
- mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdd1 to create the volume raid
- mdadm --add /dev/md2 /dev/sdc1 to add into volume raid the device /dev/sdc1
- sfdisk -c /dev/sdc 1 fd
- mdadm --add /dev/md2 /dev/sdc1
- pvcreate /dev/md2 to create physicak extension
- vgextend "pve" /dev/md2 to extend volume group
- lvresize -l xxxxx /dev/mapper/pve-data to resize logical volume
- resize2fs /dev/mapper/pve-data to update the filesystem
I think to have missed something important....
Thanks in advance
Ciao!
 
assuming a new server with PVE5 is out of the question:
simply create your sdc1+sdd1 partitions and add those into the md2 mirror - no need to hassle around with missing and copying the partitionschema, then extend the pve volumegroup; now you should probably make sure you have backups of your VEs/VMs and stop those and then extend and resize the pve-data volume and then start your VEs again.
 
Hello hk@
Thank you very much for your reply.
I made the work, but now I have an error during the boot, after the row "mdadm: /dev/md/1 has been started with 2 drives." there is the "Couldn't find device with uuid......" message and the system proceed regularly with the boot until the login.
I made the follow steps.
I had 2 empy disks: /dev/ sdb and /dev/sdd (1.st and 3.rd phisical disks on the SATA controller)
There was already 2 raid-1 volumes: /dev/md0 and /dev/md1
I initialized the 2 empty disks using fdisk command to create the new devices /dev/sdb1 and /dev/sdd1 (type 8e)
I made the 3rd raid-1 using the follow command lines:
mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdd1
mdadm --add /dev/md2 /dev/sdb1

the /proc/stat was right and the reboot didn't show any errors.
All the 3 raid-1 volumes was OK and everything until now was OK.
So I added the new space of the /dev/md2 volume into pve-data using the follow command lines:
pvcreate /dev/md2
vgextend "pve" /dev/md2
lvresize -l xxxxx /dev/mapper/pve-data
resize2fs /dev/mapper/pve-data
No errors was displayed during and after the command lines.
everything seems to work properly, but if I reboot the Proxmox, during the boot it shows the error "Couldn't find device with uuid"
The UUID number that is displayed, it is about the new raid-1 /dev/md2 that I created
The command lines: vgdisplay, pvdisplay and lsblk don't show any errors;the /proc/mdstat shows that /dev/md2 is in auto-read-only but it is active.
So the question is: how can I solve the error? Where I made the mistake? Is it a real problem? Why?
Thanks to anybody that can help me. Thanks again in advance.
Ciao!
 
assuming a new server with PVE5 is out of the question:
simply create your sdc1+sdd1 partitions and add those into the md2 mirror - no need to hassle around with missing and copying the partitionschema, then extend the pve volumegroup; now you should probably make sure you have backups of your VEs/VMs and stop those and then extend and resize the pve-data volume and then start your VEs again.
Hello,
as I wrote, I had some problems during my tests.
I was thinking too "turn around" the problem: I'll add the raid-1 volume, I'll add the new storage to proxmox and after I'll add 2nd disk from the Proxmox new storage to the VM (there is only one VM). Because the VM is Zentyal, I should extend the Zentyal's volume group.
But there is the question: why don't I see the message "mdadm: /dev/md2 has been started with 2 drives." during Proxmox boot?
What do you think?
Thanks again
Ciao!