2020-08-10 12:03:18 +01:00
|
|
|
# lvresize
|
|
|
|
|
|
|
|
> Change the size of a logical volume.
|
2021-03-08 19:25:12 +00:00
|
|
|
> See also: `lvm`.
|
2024-06-18 16:51:43 +01:00
|
|
|
> More information: <https://manned.org/lvresize>.
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Change the size of a logical volume to 120 GB:
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-01-17 18:00:02 +00:00
|
|
|
`lvresize --size {{120G}} {{volume_group}}/{{logical_volume}}`
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Extend the size of a logical volume as well as the underlying filesystem by 120 GB:
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-01-17 18:00:02 +00:00
|
|
|
`lvresize --size +{{120G}} --resizefs {{volume_group}}/{{logical_volume}}`
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-01-17 18:00:02 +00:00
|
|
|
- Extend the size of a logical volume to 100% of the free physical volume space:
|
2020-08-10 12:03:18 +01:00
|
|
|
|
2021-01-17 18:00:02 +00:00
|
|
|
`lvresize --size {{100}}%FREE {{volume_group}}/{{logical_volume}}`
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Reduce the size of a logical volume as well as the underlying filesystem by 120 GB:
|
2021-01-17 18:00:02 +00:00
|
|
|
|
|
|
|
`lvresize --size -{{120G}} --resizefs {{volume_group}}/{{logical_volume}}`
|