1

I want to extend /dev/sdb1 partition

I extended disk for 2 GB in Hypervisor and new disk size is shown for /dev/sdb disk (from 20 to 22 GB)

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sdb1  *        2048 40894463 40892416 19.5G 83 Linux
/dev/sdb2       40896510 41940991  1044482  510M  5 Extended
/dev/sdb5       40896512 41940991  1044480  510M 82 Linux swap / Solaris

But getting partition 1 could only be grown by 2046 [fudge=2048]

growpart -v /dev/sdb 1
update-partition set to true
resizing 1 on /dev/sdb using resize_sfdisk_dos
46137344 sectors of 512. total size=23622320128 bytes
## sfdisk --unit=S --dump /dev/sdb
label: dos
label-id: 0x000467a9
device: /dev/sdb
unit: sectors

/dev/sdb1 : start=        2048, size=    40892416, type=83, bootable
/dev/sdb2 : start=    40896510, size=     1044482, type=5
/dev/sdb5 : start=    40896512, size=     1044480, type=82
max_end=40896510 tot=46137344 pt_end=40894464 pt_start=2048 pt_size=40892416
NOCHANGE: partition 1 could only be grown by 2046 [fudge=2048]
overflowed
  • 115
  • 1
  • 5

1 Answers1

4

You need to remove/move /dev/sdb2 and /dev/sdb5.

  1. Use sudo cfdisk /dev/sdb to select partitions and delete/modify them.
  2. Extend a partition in a partition table to fill available space: sudo growpart /dev/sdb 1.
  3. Enlarge the mounted file system: sudo resize2fs /dev/sdb1.
eresonance
  • 135
  • 5
sfl0r3nz05
  • 166
  • 4