Forrest logo
back to the lvresize tool

lvresize:tldr:72003

lvresize: Extend the size of a logical volume as well as the underlying filesystem by 120 GB.
$ lvresize --size +${120G} --resizefs ${volume_group}/${logical_volume}
try on your machine

This command is used to resize a logical volume within a volume group. Here is a breakdown of the components:

  • lvresize: This is the command used to resize a logical volume.
  • --size +${120G}: The --size parameter is used to specify the new size for the logical volume. In this case, the value +${120G} indicates that the logical volume should be increased by 120 gigabytes.
  • --resizefs: This parameter is used to automatically resize the underlying file system to match the new size of the logical volume. It is optional but it ensures that the file system is adjusted accordingly.
  • ${volume_group}/${logical_volume}: This is the name of the logical volume that should be resized. It consists of two variables, volume_group and logical_volume, which should be replaced with the actual names of the volume group and logical volume.

Overall, this command expands a logical volume by 120 gigabytes and resizes the file system accordingly.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lvresize tool