From d3518c17834226ef8d4a1763e6fd56561bf46c81 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 16 Jan 2023 10:41:14 -0500 Subject: [PATCH] vault backup: 2023-01-16 10:41:14 --- hard_disks.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/hard_disks.md b/hard_disks.md index ce86622..c13dc3c 100644 --- a/hard_disks.md +++ b/hard_disks.md @@ -23,3 +23,24 @@ UUID="86e81045-a0dc-4881-8ddb-5ef25834ea5a" /datadrive xfs defaults,nofail 1 2 ``` * somehow in the process an new systemctl service module is loaded based on fstab at runs at boot + +## lvm (logical volume manager) +`vgs` to list volume groups +`vgdisplay` to show all info for a volume group +`lvs` to show logical volumes + +Given a logical volume `group` you can extend the size of a `logical volume` inside that group. +``` +sudo lvextend -L+100G /dev/ubuntu-vg/ubuntu-lv +``` + +now if you do `lsblk` the size of the disk has grown but filesystem still needs to be extended as per `df` + +use `resize2fs` to expand the file system to take up all the disk space +``` +ptrowbridge@usmidsap01:/var/log/postgresql$ sudo resize2fs /dev/ubuntu-vg/ubuntu-lv +resize2fs 1.46.5 (30-Dec-2021) +Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required +old_desc_blocks = 13, new_desc_blocks = 25 +The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 52428800 (4k) blocks long. +``` \ No newline at end of file