As with many of my posts, please please please use caution here - your mileage may vary and, in the worst case, you'll LOSE YOUR DATA. If in doubt, back up first. If still in doubt, DON'T DO IT :-)
This is a rough set of notes, which I'll polish up at some future time ...
Problem
I'd exceeded the 20 GB I'd allocated to a VM running RHEL, and didn't want to have to rebuild it from scratch.
Having increased the size of the disk image within VMware, I then needed to work out how to get Linux to use the extra 10 GB added.
Solution
(a) *CAUTION* Use the FDISK command to add a new partition to utilise the extra 10 GB *CAUTION*
fdisk /dev/sda
adding a new primary partition of type 8e ( Linux LVM )
meaning that the command: -
fdisk -l /dev/sda
returns: -
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
/dev/sda3 2611 3916 10490445 8e Linux LVM
rather than: -
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
(b) reboot to have the new partition table picked up: -
reboot
(c) Create the new Physical Volume (PV) which will utilise the new partition: -
pvcreate /dev/sda3
(d) Extend the Volume Group to include the new PV: -
vgextend VolGroup00 /dev/sda3
(e) Increase the size of the Logical Volume (LV): -
lvextend -L +10G /dev/VolGroup00/LogVol00
(f) Increase the size of the file system using the LV: -
resize2fs -p /dev/VolGroup00/LogVol00
Having done this, the command df -km / now shows that my disk is 44% utilised rather than 81% utilised.
Now to test it ....
Much of this came from this LinuxQuestions.org thread.
As with many of my posts, please please please use caution here - your mileage may vary and, in the worst case, you'll LOSE YOUR DATA. If in doubt, back up first. If still in doubt, DON'T DO IT :-)
Geeking in technology since 1985, with IBM Development, focused upon Docker and Kubernetes on the IBM Z LinuxONE platform In the words of Dr Cathy Ryan, "If you don't write it down, it never happened". To paraphrase one of my clients, "Every day is a school day". I do, I learn, I share. The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions. Remember, YMMV https://infosec.exchange/@davehay
Subscribe to:
Post Comments (Atom)
Reminder - installing podman and skopeo on Ubuntu 22.04
This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman and skopeo on an Ubuntu box: - lsb_rel...
-
Why oh why do I forget this ? Running this command : - ldapsearch -h ad2012.uk.ibm.com -p 389 -D CN=bpmbind,CN=Users,DC=uk,DC=ibm,DC=com -w...
-
Error "ldap_sasl_interactive_bind_s: Unknown authentication method (-6)" on a LDAPSearch command ...Whilst building my mega Connections / Domino / Portal / Quickr / Sametime / WCM environment recently, I was using the LDAPSearch command tha...
-
Whilst building a new "vanilla" Kubernetes 1.25.4 cluster, I'd started the kubelet service via: - systemctl start kubelet.se...
No comments:
Post a Comment