From 33ff9575389d466b45f5ea8505acf8027885522b Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 24 Apr 2025 13:32:13 -0400 Subject: [PATCH] lvextend: fix improper flag usage, add additional example (#16250) --- pages/linux/lvextend.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/linux/lvextend.md b/pages/linux/lvextend.md index 53f6305233..00927c66bc 100644 --- a/pages/linux/lvextend.md +++ b/pages/linux/lvextend.md @@ -6,12 +6,16 @@ - Increase a volume's size to 120 GB: -`lvextend {{[-L|--size]}} {{120G}} {{logical_volume}}` +`sudo lvextend {{[-L|--size]}} {{120G}} {{logical_volume}}` - Increase a volume's size by 40 GB as well as the underlying filesystem: -`lvextend {{[-L|--size]}} +{{40G}} {{[-r|--resizefs]}} {{logical_volume}}` +`sudo lvextend {{[-L|--size]}} +{{40G}} {{[-r|--resizefs]}} {{logical_volume}}` - Increase a volume's size to 100% of the free physical volume space: -`lvextend {{[-L|--size]}} +{{100}}%FREE {{logical_volume}}` +`sudo lvextend {{[-l|--extents]}} +{{100}}%FREE {{logical_volume}}` + +- Increase a volume's size to 100% of the free physical volume space and resize the underlying filesystem: + +`sudo lvextend {{[-l|--extents]}} +{{100}}%FREE {{[-r|--resizefs]}} {{logical_volume}}`