![]() Please do share your feedback and comments in the below comments section. ![]() ![]() Perfect above output shows that / partition has been extended to 20 GB. Verify the size of / file system using df -Th command, ~]$ df -Th / Now run xfs_growfs command to extend the root filesystem, $ sudo xfs_growfs / Then in Gparted resize first the extended partition to take all the available space, and then same for the LVM partition. Verify the lsblk output for / partition, $ lsblk Note: growpart command will rewrite the partition table so that partition takes all the space. Run growpart command on 2nd partition of /dev/sda disk (we have used 2 as partition number because our root partition is 2nd on the disk). Once above packages are installed, view OS disk size with lsblk and fdisk commands,Ībove output confirms that OS disk size is now 22 GB, now let’s extend root partition using following commands, $ sudo yum install cloud-utils-growpart gdisk -y // For RHEL 7 / CentOS 7 Install cfdisk (apk add cfdisk) Use it to expand partition (just run cfdisk and it pretty intuitive) Install e2fsprogs-extra run resize2fs /dev/sda to expand the file system (substitute with partition that you want to expand) 7 22 22 Comments Best Add a Comment AssumeACanOpener 4 yr. $ sudo dnf install cloud-utils-growpart gdisk -y // For RHEL 8 / CentOS 8 But these are not available in the default installation, so let’s first install these using the following command, $ sudo apt install cloud-guest-utils gdisk -y // For Ubuntu & Debian To extend root partition we need growpart and xfs_growfs commands or utilities. Step 3) Extend root partition based on xfs filesystem In my case I have a VM running inside a VirtualBox, so first stop it and extend the disk size as shown,Ĭlick on apply and then start the virtual machine. Increase the size of OS disk, in my case I will change OS disk size from 12 GB to 22 GB as I want to extend / partition by 10 GB.ĭepending on the environment, one must perform this action. ![]() Verify the size of OS disk using lsblk and fdisk commands $ lsblk /dev/sdaĪbove output shows that size of OS disk is 12 GB. Login to the Linux machine and run below df command to view current size of root partition, $ df -Th /įilesystem Type Size Used Avail Use% Mounted on Let’s dive into the actual steps, Step 1) Verify the root partition size ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |