1

I have a Proxmox disk with 130Gb LVM image. I moved it to 235Gb disk. And resized in the Proxmox. Done.

But in my Linux distro, the partition still 130Gb (disk become 235Gb).

The partitions:

  • /dev/sda1
  • /dev/sdb1

They are part of RAID1 volume: /dev/md0

What is the correct way to resize it from 130Gb to 235Gb without loosing data?

root@debian:~# fdisk -l
Disk /dev/sdb: 235 GiB, 252329328640 bytes, 492830720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd098f1da

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1            2048 273436671 273434624 130.4G fd Linux raid autodetect
/dev/sdb2       273436672 291502079  18065408   8.6G fd Linux raid autodetect

Disk /dev/sda: 235 GiB, 252329328640 bytes, 492830720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x559572cb

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 273436671 273434624 130.4G fd Linux raid autodetect
/dev/sda2       273436672 291502079  18065408   8.6G fd Linux raid autodetect

Disk /dev/md0: 130.3 GiB, 139864309760 bytes, 273172480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md1: 8.6 GiB, 9241100288 bytes, 18049024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

root@debian:~# cat /proc/mdstat
Personalities : [raid1]
md1 : active (auto-read-only) raid1 sda2[0] sdb2[1]
      9024512 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      136586240 blocks super 1.2 [2/2] [UU]
      bitmap: 0/2 pages [0KB], 65536KB chunk

unused devices: <none>

root@debian:~# cat /proc/partitions
major minor  #blocks  name

   8       16  246415360 sdb
   8       17  136717312 sdb1
   8       18    9032704 sdb2
   8        0  246415360 sda
   8        1  136717312 sda1
   8        2    9032704 sda2
  11        0    1048575 sr0
   9        0  136586240 md0
   9        1    9024512 md1

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.