This is my current disk partition configuration

fd0      2:0    1    4K  0 disk 
sda      8:0    0  150G  0 disk 
├─sda1   8:1    0  200M  0 part /boot
├─sda2   8:2    0  3.9G  0 part 
├─sda3   8:3    0 34.2G  0 part /
└─sda4   8:4    0  1.8G  0 part /home
sdb      8:16   0   20G  0 disk 
sr0     11:0    1 1024M  0 rom
  1. I would like to resize the root partition currently on sda3, and extend it onto the free space on sdb. After this, the size of my root partition would be 54.2G

  2. if this free space (unallocated) existing in a disk and end of disk (number sectors are too many distance and above limit), who to do other method for this solution question.

------edited------ for additional info:

by fdisk:

# fdisk -l
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 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/sda: 150 GiB, 161061273600 bytes, 314572800 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: 0x2971e5ee

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048   411647   409600  200M 83 Linux
/dev/sda2         411648  8515575  8103928  3.9G 82 Linux swap / Solaris
/dev/sda3        8515584 80195583 71680000 34.2G 83 Linux                                                                                                                                       
/dev/sda4       80195584 83886079  3690496  1.8G 83 Linux

by parted:

(parted) p free                                                           
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 161GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
        32.3kB  1049kB  1016kB           Free Space
 1      1049kB  211MB   210MB   primary  ext2            boot
 2      211MB   4360MB  4149MB  primary  linux-swap(v1)
        4360MB  4360MB  4096B            Free Space
 3      4360MB  41.1GB  36.7GB  primary  ext4
 4      41.1GB  42.9GB  1890MB  primary  ext4
        42.9GB  161GB   118GB            Free Space


unallocated sectors are not Back together Respectively

  • You have a 150GB disk and your root is 34.2 GB, you could use resize2fs to expand it if the rest of the disk is still unallocated, but you won't be able to extend on to the new hard drive. You should look at re-configuring to use LVM so as to benefit from resizable partitions (this would require a re-install, though)
    – tk-noodle
    Commented Apr 20, 2017 at 10:42

1 Answer 1


Use this below command to increase/decrease the file system size.

resize2fs device [new_size]

Refer this link for more details

  • Does not match the asker's question. resize2fs works on a partition which is on the same disk as has free space. Asker is wanting to expand onto new disk
    – tk-noodle
    Commented Apr 20, 2017 at 10:34
  • Additionally this assumes reiserfs, which the OP gives no indication is the FS in use. And such is rather unlikely given that reiserfs has been significantly declining in popularity.
    – phemmer
    Commented Apr 20, 2017 at 16:11
  • i checked for resize to 140.2GB(34.2GB + 110GB unallocated) but return error -> resize2fs: Invalid new size: 144.2GB
    – evergreen
    Commented Apr 21, 2017 at 9:02
  • Can you pls post the command which you used and sudo fdisk -l output Commented Apr 21, 2017 at 9:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .