Saturday, 9 July 2011

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>

No comments:

Post a Comment

Please feel free to leave a comment