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

lvextend

The "lvextend" command line tool is used in Linux to extend the size of Logical Volumes (LVs) in Logical Volume Management (LVM). It allows users to increase the storage capacity of LVs dynamically without the need for data migration.

The tool requires administrative privileges and is typically executed with the "sudo" command. It works by merging unallocated space from physical volumes (PVs) into existing LVs to increase their size.

The syntax for using lvextend involves specifying the LV path, size increment, and optionally the PV from which the space should be taken. The tool automatically performs the necessary steps to extend the LV, including resizing the file system within the LV if supported.

It is important to note that LVs can only be extended if there is enough physical storage available in the VG (Volume Group) to accommodate the expansion. Additionally, the LV must be mounted and not in use for the command to succeed.

The lvextend command is widely used in Linux system administration to manage disk space efficiently and flexibly, allowing system administrators to adapt to changing storage requirements without downtime or disruption.

List of commands for lvextend:

  • lvextend:tldr:1236e lvextend: Increase a volume's size by 40 GB as well as the underlying filesystem.
    $ lvextend --size +${40G} -r ${logical_volume}
    try on your machine
    explain this command
  • lvextend:tldr:37e39 lvextend: Increase a volume's size to 100% of the free physical volume space.
    $ lvextend --size ${100}%FREE ${logical_volume}
    try on your machine
    explain this command
  • lvextend:tldr:7195b lvextend: Increase a volume's size to 120 GB.
    $ lvextend --size ${120G} ${logical_volume}
    try on your machine
    explain this command
tool overview