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