Forrest logo
back to the lvresize tool

lvresize:tldr:a770f

lvresize: Extend the size of a logical volume to 100% of the free physical volume space.
$ lvresize --size ${100}%FREE ${volume_group}/${logical_volume}
try on your machine

This command is used to resize a logical volume in a volume group using the LVM (Logical Volume Manager) utility. Here's an explanation of each component:

  1. lvresize: This is the command itself and it is used to resize a logical volume.
  2. --size ${100}%FREE: This option specifies the new size of the logical volume. In this case, it is set to 100% of the free space available in the volume group. The ${100}%FREE is a variable expression indicating 100 percent of the available space.
  3. ${volume_group}: This is the name of the volume group where the logical volume resides. It is a placeholder that should be replaced with the actual name of the volume group.
  4. ${logical_volume}: This is the name of the logical volume that needs to be resized. Similar to the volume group, it should be replaced with the appropriate logical volume name.

By providing the appropriate values for ${volume_group} and ${logical_volume}, this command will resize the specified logical volume to utilize all the available free space in the volume group.

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