resize2fs is a Linux command used to adjust the size of ext2, ext3, and ext4 file systems. It is typically used to expand or shrink existing ext file systems to accommodate different storage requirements.
resize2fs is generally executed by a superuser, and its syntax is resize2fs [OPTIONS] DEVICE [SIZE]. If you omit "SIZE", it will use the remaining available space.
Common options for resize2fs include:
# resize2fs -M /dev/sda1 ←To resize the /dev/sda1 file system to match the remaining space on the disk # resize2fs /dev/sda1 100G ←Expand the '/dev/sda1' file system to 100 GB |
Please note that resize2fs may not be applicable to xfs file systems. For xfs-specific commands, please refer to the provided link.