Hi,
In Lab 8.5 - I notice all checks passed but I checked the answers and I did not use the below command in my solution:
xfs_growfs /storage/data1
It seems the lab passed regardless of this command.
What are the consequences of not using xfs_growfs and only using lvextend?
Thanks.
Hi @chis0
The xfs_growfs command introduces an extra step to extend the file system. An
alternative would be to use the lvextend command -r option: -r|--resizefs
Resize the fs using the fs-specific resize command. See --fs for
more options (--resizefs is equivalent to --fs resize.)
Hi @chis0
The xfs_growfs command introduces an extra step to extend the file system. An
alternative would be to use the lvextend command -r option: -r|--resizefs
Resize the fs using the fs-specific resize command. See --fs for
more options (--resizefs is equivalent to --fs resize.)
@chis0 Please recall that :
When you use lvextend to increase the size of a logical volume (LV), it doesn't automatically update the file system size within that LV. The file system itself, in this case XFS, remains unaware of this increased space. To enable the file system to utilize the newly allocated space within the extended LV, you must run xfs_growfs. This command informs the XFS file system about the available space, allowing you to effectively store more data on the expanded partition / file system.
In a nutshell, lvextend only extends the raw storage size of the underlying LVM, inorder to utilise the space and store data / files ( everything is a file in Linux ) - we need to grow / extend / expand the file system as well - in this case xfs filesystem.
Note that - you can do the same in a single command with lvextend and you dont necessarily have to use xfs_growfs ( as @shura mentioned ).
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.