Other How to resize middle partition when free space is at the end?

Hi,

I need to resize a partition sandwiched between two other partitions (I am using a freebsd recovery boot).

Partition table right now shows:
Code:
root@rescue-bsd:~ # gpart show
=>        63  3907029105  ada0  MBR  (1.8T)
          63        4033        - free -  (2.0M)
        4096     1046528     1  linux-data  [active]  (511M)
     1050624    40957952     2  linux-data  (20G)
    42008576  3435134976     3  linux-data  (1.6T)
  3477143552   429885616        - free -  (205G)

=>        63  3907029105  diskid/DISK-PN1134P6KV9BEW  MBR  (1.8T)
          63        4033                              - free -  (2.0M)
        4096     1046528                           1  linux-data  [active]  (511M)
     1050624    40957952                           2  linux-data  (20G)
    42008576  3435134976                           3  linux-data  (1.6T)
  3477143552   429885616                              - free -  (205G)

When I try to resize I get the following:
Code:
root@rescue-bsd:~ # gpart resize -i 2 -s 60G ada0
gpart: end '126879743': No space left on device

Any ideas how I can resolve this?

Thanks
 
Last edited by a moderator:
I need to resize a partition sandwiched between two other partitions (I am using a freebsd recovery boot).
Extending a partition only works if there's free space adjacent to the partition. So the only way to extend it is by removing the partition that's in the way (losing its data in the process).
 
Back
Top