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 / 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, Virtualbox increase disk size ubuntu fdisk lvm install#$ sudo yum install cloud-utils-growpart gdisk -y // For RHEL 7 / CentOS 7 $ 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 Linux Mastery: Master the Linux Command Line in 11.Let’s dive into the actual steps, Step 1) Verify the root partition size. Virtualbox increase disk size ubuntu fdisk lvm how to#
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |