Posts Tagged ‘resize2fs’

Linux – Reduce filesystem size

On Linux you can reduce the size of a filesystem using the command line.

Firstly you check the filesystem:

# fsck -f <logvolname>

Then you resize the filesystem:

# resize2fs <logvolname> <size>

You then reduce the log volume size:

# lvreduce <logvolname> <size>

Finally you mount the log volume:

# mount <logvolname>


Linux – Increase Filesystem

July 3, 2011 3 comments

You can increase the size of a filesystem on Linux boxes whilst not having to unmount them, therefore doing the increase whilst they are online.

Linux / OEL

On a redhat or OEL system you can use the following:

# df -h
/home/krobbe > df -h
Filesystem                                                           Size    Used    Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00  2.0G  204M  1.7G  11%     /
# lvextend --size +1G /dev/VolGroup00/LogVol24

then either:

# ext2online /dev/VolGroup00/LogVol24


# resize2fs /dev/VolGroup00/LogVol24