You are currently viewing Look at the file system resize progress with resize2fs

Look at the file system resize progress with resize2fs

lvextend -L +100G /dev/sda2
resize2fs -p /dev/sda2 

-p option —> Prints out a percentage completion bars for each resize2fs operation, so that the user can keep track of what the program is doing

resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/sda2 to 26214400 
(4k) blocks.
Begin pass 2 (max = 5713)
Relocating blocks         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 1480)
Scanning inode table      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 1547)|
Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 26214400 blocks long.

This is very helpful, especially when the partition resizing size is significant, taking a few minutes to complete the resize. This helps to avoid confusion about whether the command is hung or not.

Leave a Reply