Forrest logo
tool overview
On this page you find all important commands for the CLI tool lvresize. If the command you are looking for is missing please ask our AI.

lvresize

lvresize is a command line tool used in Linux operating systems for resizing logical volumes (LVs). It allows users to dynamically change the size of LVs to accommodate their evolving storage requirements without the need to reboot the system. The lvresize command operates specifically on the Logical Volume Manager (LVM) within Linux systems.

This tool presents various options to specify how the resizing should occur, such as specifying the final size or incrementing/decrementing by a given amount. It also allows users to resize the logical volumes while keeping the file system intact. It is important to note that lvresize can also be used to shrink an LV, in addition to expanding it.

To use lvresize, users typically need to have the appropriate permissions, as resizing LVs usually requires administrative rights. It is advisable to understand the implications of resizing an LV, as it can affect data integrity and the performance of the system.

If the lvresize command is used with caution and proper knowledge, it becomes a powerful tool for managing storage resources in Linux systems, allowing for flexibility and efficient allocation of disk space.

List of commands for lvresize:

  • lvresize:tldr:55346 lvresize: Reduce 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
    explain this command
  • 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
    explain this command
  • 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
    explain this command
  • lvresize:tldr:bd317 lvresize: Change the size of a logical volume to 120 GB.
    $ lvresize --size ${120G} ${volume_group}/${logical_volume}
    try on your machine
    explain this command
tool overview