Useful article extending VMware disk extend the logical volume and resize the underlying file system with the lvextend command
This linked article by Shehu Awwal, Red Hat's "Enable Systadmin" area is very good if you have to extend an LVM with Linux.
Verified (by me) 2022.07.20
Environment
-VMware instances
- RHEL 7, 8, have not tested on 9 yet
Issue
- Within VMware, you can extend an existing disk and then take the following steps in the article below to extend the disk within the Operating System (OS)
- This article at https://www.redhat.com/sysadmin/resize-lvm-simple is highly useful, one minor edit...
- The command can extend the filesystem if you include "
lvextend", omitting the-rcommand mentioned (for example) in paragraph 6.1 of this Red Hat documentation, look for the NOTE Seexfs_growfsbelow:Resolution
Resolution
How do I do an lvextend command extend the file system all at once, skipping the "
xfs_growfs
" command?
xfs_growfsYou can use the -r option of the lvextend command to extend the logical volume and resize the underlying file system with a single command:
lvextend -r -L 3G /dev/myvg/mylv
Another example, to take the remainder of the added storage:
lvextend -r -l 100%FREE /dev/myvg/mylv
This allows you to SKIP using the command
xfs_growfsAdditional
- This is a discussion, not a Red Hat solution.
Regards,
RJ
Responses