grows or shrinks a mounted log-structured filesystem to the specified size. mounted-file-system
is the name of the filesystem to be resized, and new-size
is the desired new filesystem size, in sectors. If new-size
is not specified, resize_lfs
will default to the current size of the partition containing the filesystem in question.
When growing, the partition must be large enough to contain a filesystem of the specified size; when shrinking, resize_lfs must first “clean” the segments that will be invalid when the filesystem is shrunk. If this cleaning process results in these segments becoming redirtied, this indicates that the given new size is not large enough to contain the existing filesystem data, and resize_lfs will return an error.