how to use resize2fs command and its examples

The resize2fs command is used to resize an ext2, ext3, or ext4 file system. Which also allows you to increase or decrease the size of an existing file system.

  • About resize2fs: Its ext2/ext3/ext4 file system resizer
  • Comes From : e2fsprogs-1.41.12
  • Configuration Files:
  • Path: /sbin/resize2fs


1. To resize a recently extended file system

$ resize2fs /dev/mapper/VG02-LV05

 2. To forcefully resize the file system

$ resize2fs -f /dev/mapper/VG02-LV05

 3. To flush the filesystem device’s  buffer caches

$ resize2fs -F /dev/mapper/VG02-LV05 

4. To shrink the filesystem to the minimum size

$ resize2fs -M /dev/mapper/VG02-LV05 

5. To prints out a percentage completion bars for each resize2fs operation

$ resize2fs -p /dev/mapper/VG02-LV05 

6. To Print the minimum size of the filesystem and exit

$ resize2fs -P /dev/mapper/VG02-LV05

 Related Commands: fdisk, e2fsck, mke2fs, lvm, lvextend 

Leave a Reply

Your email address will not be published. Required fields are marked *