Growing hardware RAID on Proxmox Host with no down time?

Petrus4

Member
Feb 18, 2009
249
0
16
Hello,

I have recently grown my hardware Raid 5 volume by 1 drive and want to add the extra space to my proxmox host.

Can I do this on a live system or do I need to boot from a live cd and run gparted to resize my partitions. My preference is to do this with no down time.

I think if the LVM physical volume was created directly on the RAID volume this would be possible with pvresize, but I think the default proxmox installation put the LVM physical volume on a partition.

Thanks
 
Hello,

I have recently grown my hardware Raid 5 volume by 1 drive and want to add the extra space to my proxmox host.

Can I do this on a live system or do I need to boot from a live cd and run gparted to resize my partitions. My preference is to do this with no down time.

I think if the LVM physical volume was created directly on the RAID volume this would be possible with pvresize, but I think the default proxmox installation put the LVM physical volume on a partition.

Thanks
Hi,
yes with the active partition-table it's not so easy I think. But you can do an trick: add the new disk to the raidset and let the raidcontroller change the raidvolume to use all disks. After that you have space for an additional raid-volume which you can add to the existing volumegroup pve.

Of course, this depends on your raid-firmware if it's be possible.

Udo
 
Hi,
yes with the active partition-table it's not so easy I think. But you can do an trick: add the new disk to the raidset and let the raidcontroller change the raidvolume to use all disks. After that you have space for an additional raid-volume which you can add to the existing volumegroup pve.

Of course, this depends on your raid-firmware if it's be possible.

Udo

Thanks Udo, My Raid firmware allows this and I was able to grow the raid volume.

On my installation I have sda1 (boot partition) and sda2 LVM /dev/mapper/pve-root and /dev/mapper/pve-data

The extra space is visible on sda:

Code:
Disk /dev/sda: 238.3 GB, 238370684928 bytes255 heads, 63 sectors/track, 28980 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          66      524288   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              66       19320   154663580   8e  Linux LVM

But

Code:
#pvdisplay

  PV Name               /dev/sda2
  VG Name               pve
  PV Size               147.50 GB / not usable 2.65 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              37759
  Free PE               1023
  Allocated PE          36736
  PV UUID               e2E2mK-n0HH-q9wA-P5o1-ooVU-faMX-TDUNV7



It looks like the only way to add this extra space is to resize sda2, but I am not sure how to do this with out hurting the data on this partition.:confused:
 
Ok found my own solution

1. increased the partition size of /dev/sda2 with fdisk, needed to reboot after this so that the kernel could see the new partition table (tried partprobed with out rebooting but did not work)
2. increased the physical volume with pvresize /dev/sda2
3. increased logical volume with lvextend -L+74G /dev/mapper/pve-data
4. resized file system online (mounted) with resize2fs /dev/mapper/pve-data

Here are the directions I used.
 
Ok found my own solution

1. increased the partition size of /dev/sda2 with fdisk, needed to reboot after this so that the kernel could see the new partition table (tried partprobed with out rebooting but did not work)
2. increased the physical volume with pvresize /dev/sda2
3. increased logical volume with lvextend -L+74G /dev/mapper/pve-data
4. resized file system online (mounted) with resize2fs /dev/mapper/pve-data

Here are the directions I used.

Hi,
but the way I posts before should also work: create an new raid-volume (sdb), partition sdb (not nessessary) and add to the vg (vgextend /dev/pve /dev/sdb1).

Udo
 
Hi,
but the way I posts before should also work: create an new raid-volume (sdb), partition sdb (not nessessary) and add to the vg (vgextend /dev/pve /dev/sdb1).

Udo


Your method would not work in my scenario since I am only adding one disk to the existing raid volume (Growing the RAID volume, not adding another RAID volume). If I were to add another RAID array your method would be suitable. thanks!
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!