Change host disks, how resize partition ?

Inglebard

Renowned Member
May 20, 2016
107
7
83
32
Hi,

We have a proxmox with RAID1.
We are almost full (95%) on our proxmox host disk.
We plan to replace our 450GB drive to bigger size (1To).

Our partitions are actually like this.

Code:
Device       Start       End   Sectors   Size Type
/dev/sda1       34      2047      2014  1007K BIOS boot
/dev/sda2     2048   1050623   1048576   512M EFI System
/dev/sda3  1050624 936640478 935589855 446.1G Linux LVM

Partition 1 does not start on physical sector boundary.




Disk /dev/mapper/pve-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes


Disk /dev/mapper/pve-root: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes


Disk /dev/mapper/pve-vm--100--disk--0: 400 GiB, 429496729600 bytes, 838860800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disklabel type: dos
Disk identifier: 0xb52966f5

Device                                 Boot   Start       End   Sectors   Size Id Type
/dev/mapper/pve-vm--100--disk--0-part1 *       2048   1026047   1024000   500M  7 HPFS/NTFS/exFAT
/dev/mapper/pve-vm--100--disk--0-part2      1026048 838856703 837830656 399.5G  7 HPFS/NTFS/exFAT

After replacing the disks, I suppose, it will not auto resize itself.

I know it will necessary to resize the lvm (/dev/sda3) and also the "data" lv.

What is the required steps ?
Can all the step can be done online ?

EDIT:
I suppose it requires to extend LVM partition offline with gparted and then use lvmextend -l +100%FREE pve/data, right ?
 
Last edited: