From bd9e5c8630e0e78504d6eeff588d03cb7287ea0f Mon Sep 17 00:00:00 2001 From: aaaawwWWWwwwwWWW <73749744+aaaawwWWWwwwwWWW@users.noreply.github.com> Date: Sun, 17 Jan 2021 15:00:02 -0300 Subject: [PATCH] lvresize: add vg to positional arg and example extend (#5150) --- pages/linux/lvresize.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pages/linux/lvresize.md b/pages/linux/lvresize.md index ea8d38426..907a770b6 100644 --- a/pages/linux/lvresize.md +++ b/pages/linux/lvresize.md @@ -1,15 +1,20 @@ # lvresize > Change the size of a logical volume. +> More information: . -- Change a volume's size to 120GB: +- Change the size of a logical volume to 120GB: -`lvresize -L {{120G}} {{logical_volume}}` +`lvresize --size {{120G}} {{volume_group}}/{{logical_volume}}` -- Reduce a volume's size by 120GB as well as the underlying filesystem: +- Extend the size of a logical volume as well as the underlying filesystem by 120GB: -`lvresize --size -{{120G}} -r {{logical_volume}}` +`lvresize --size +{{120G}} --resizefs {{volume_group}}/{{logical_volume}}` -- Increase a volume's size to 100% of the free physical volume space: +- Extend the size of a logical volume to 100% of the free physical volume space: -`lvresize --size {{100}}%FREE {{logical_volume}}` +`lvresize --size {{100}}%FREE {{volume_group}}/{{logical_volume}}` + +- Reduce the size of a logical volume as well as the underlying filesystem by 120GB: + +`lvresize --size -{{120G}} --resizefs {{volume_group}}/{{logical_volume}}`