From 5e30dd19d5a46a775ecb199671dacf5e82e93b59 Mon Sep 17 00:00:00 2001 From: dkington-ans Date: Mon, 7 Oct 2024 08:49:59 +0100 Subject: [PATCH 1/5] Update lvm-extend.md Add instructions for expanding a disk partition if the PV uses a partition, rather than an entire disk. --- source/operatingsystems/linux/basics/lvm-extend.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/operatingsystems/linux/basics/lvm-extend.md b/source/operatingsystems/linux/basics/lvm-extend.md index c06287abb..eb6e82d75 100644 --- a/source/operatingsystems/linux/basics/lvm-extend.md +++ b/source/operatingsystems/linux/basics/lvm-extend.md @@ -129,6 +129,20 @@ I added 5G to the VM, and this disk is ~5G in size, so we've identified where it We've identified that one of the disks has been resized - `sdb` in this case. +## Expand the partition if necessary + +If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the 'growpart' command to do this: + +```growpart ``` + +for example + +```growpart /dev/sdb 3``` + +Note that it is intentional that there is a space between the '/dev/sdb' and '3'. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had /dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4, and your PV was /dev/sdb3, you couldn't expand /dev/sdb3 because /dev/sdb4 would be in the way. Contact support for advice if you find yourself in this situation. + +The growpart command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. + ## Resize the physical volume to use the new space While the operating system (OS) can see the additional space, we've still got to make this usable. From cf27003772d315c29223346166d7fdfa0c857ba0 Mon Sep 17 00:00:00 2001 From: dkington-ans Date: Mon, 7 Oct 2024 09:05:43 +0100 Subject: [PATCH 2/5] Update lvm-extend.md Delete trailing spaces --- source/operatingsystems/linux/basics/lvm-extend.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/operatingsystems/linux/basics/lvm-extend.md b/source/operatingsystems/linux/basics/lvm-extend.md index eb6e82d75..8ad8abd5d 100644 --- a/source/operatingsystems/linux/basics/lvm-extend.md +++ b/source/operatingsystems/linux/basics/lvm-extend.md @@ -139,9 +139,9 @@ for example ```growpart /dev/sdb 3``` -Note that it is intentional that there is a space between the '/dev/sdb' and '3'. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had /dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4, and your PV was /dev/sdb3, you couldn't expand /dev/sdb3 because /dev/sdb4 would be in the way. Contact support for advice if you find yourself in this situation. +Note that it is intentional that there is a space between the '/dev/sdb' and '3'. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had /dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4, and your PV was /dev/sdb3, you couldn't expand /dev/sdb3 because /dev/sdb4 would be in the way. Contact support for advice if you find yourself in this situation. -The growpart command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. +The growpart command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. ## Resize the physical volume to use the new space From b5bb35555a85dd79c2b5f4cfd101b39e1a32c703 Mon Sep 17 00:00:00 2001 From: dkington-ans Date: Thu, 10 Oct 2024 09:32:09 +0100 Subject: [PATCH 3/5] Update lvm-extend.md Put growpart reference into a code block --- source/operatingsystems/linux/basics/lvm-extend.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/operatingsystems/linux/basics/lvm-extend.md b/source/operatingsystems/linux/basics/lvm-extend.md index 8ad8abd5d..8469b39fc 100644 --- a/source/operatingsystems/linux/basics/lvm-extend.md +++ b/source/operatingsystems/linux/basics/lvm-extend.md @@ -131,7 +131,7 @@ We've identified that one of the disks has been resized - `sdb` in this case. ## Expand the partition if necessary -If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the 'growpart' command to do this: +If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the :code:```growpart``` command to do this: ```growpart ``` From 27cece6a3d8f8fd8b0780974c759ba2a08b61c52 Mon Sep 17 00:00:00 2001 From: dkington-ans Date: Thu, 17 Oct 2024 10:39:19 +0100 Subject: [PATCH 4/5] Update lvm-extend.md Spelling issues again --- source/operatingsystems/linux/basics/lvm-extend.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/operatingsystems/linux/basics/lvm-extend.md b/source/operatingsystems/linux/basics/lvm-extend.md index 8469b39fc..a52e427b2 100644 --- a/source/operatingsystems/linux/basics/lvm-extend.md +++ b/source/operatingsystems/linux/basics/lvm-extend.md @@ -127,11 +127,11 @@ I added 5G to the VM, and this disk is ~5G in size, so we've identified where it # Resized disk method -We've identified that one of the disks has been resized - `sdb` in this case. +We've identified that one of the disks has been resized - ```sdb``` in this case. ## Expand the partition if necessary -If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the :code:```growpart``` command to do this: +If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the ```growpart``` command to do this: ```growpart ``` @@ -141,7 +141,7 @@ for example Note that it is intentional that there is a space between the '/dev/sdb' and '3'. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had /dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4, and your PV was /dev/sdb3, you couldn't expand /dev/sdb3 because /dev/sdb4 would be in the way. Contact support for advice if you find yourself in this situation. -The growpart command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. +The ```growpart``` command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. ## Resize the physical volume to use the new space From 111f5ebc7c31aa5dc913889baaefd4bab0bf5b7a Mon Sep 17 00:00:00 2001 From: dkington-ans Date: Fri, 18 Oct 2024 12:02:33 +0100 Subject: [PATCH 5/5] Update lvm-extend.md Spelling (again...) --- source/operatingsystems/linux/basics/lvm-extend.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/operatingsystems/linux/basics/lvm-extend.md b/source/operatingsystems/linux/basics/lvm-extend.md index a52e427b2..d838835d8 100644 --- a/source/operatingsystems/linux/basics/lvm-extend.md +++ b/source/operatingsystems/linux/basics/lvm-extend.md @@ -131,7 +131,7 @@ We've identified that one of the disks has been resized - ```sdb``` in this case ## Expand the partition if necessary -If the LVM PV refers to a partition on a disk (e.g. /dev/sdb3) rather than a complete disk (/dev/sdb), you'll first need to expand the partition to use the new space. Use the ```growpart``` command to do this: +If the LVM PV refers to a partition on a disk (e.g. ```/dev/sdb3```) rather than a complete disk (```/dev/sdb```), you'll first need to expand the partition to use the new space. Use the ```growpart``` command to do this: ```growpart ``` @@ -139,9 +139,9 @@ for example ```growpart /dev/sdb 3``` -Note that it is intentional that there is a space between the '/dev/sdb' and '3'. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had /dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4, and your PV was /dev/sdb3, you couldn't expand /dev/sdb3 because /dev/sdb4 would be in the way. Contact support for advice if you find yourself in this situation. +Note that it is intentional that there is a space between the ```/dev/sdb``` and ```3```. It's also important to note that this will only work if the partition number is the highest numbered on on the disk. For example, if you had ```/dev/sdb1```, ```/dev/sdb2```, ```/dev/sdb3```, ```/dev/sdb4```, and your PV was ```/dev/sdb3```, you couldn't expand ```/dev/sdb3``` because ```/dev/sdb4``` would be in the way. Contact support for advice if you find yourself in this situation. -The ```growpart``` command isn't always installed by default on a server, you may need to install it first using yum / apt / dnf as appropriate. +The ```growpart``` command isn't always installed by default on a server, you may need to install it first using ```yum``` / ```apt``` / ```dnf``` as appropriate. ## Resize the physical volume to use the new space