Forrest logo
tool overview
On this page you find all important commands for the CLI tool resize2fs. If the command you are looking for is missing please ask our AI.

resize2fs

The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device. If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel supports on-line resizing. (As of this writing, the Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 and ext4.).

List of commands for resize2fs:

  • hetzner:cloud:volume:resize:ext4 Resize a volume on a Hetzner cloud server (ext4 file system)
    $ resize2fs ${volume}
    try on your machine
    explain this command
  • resize2fs:tldr:7278f resize2fs: Resize the filesystem to a size of 40G, displaying a progress bar.
    $ resize2fs -p ${-dev-sdXN} ${40G}
    try on your machine
    explain this command
  • resize2fs:tldr:fef9d resize2fs: Shrink the filesystem to its minimum possible size.
    $ resize2fs -M ${-dev-sdXN}
    try on your machine
    explain this command
tool overview