![]() ![]()
Update /etc/fstab to make sure swap partition is not mounted at boot up stage. #Virtualbox arch linux partition freeVerify the swap partition space, as you see not it is 0 ~]# free -m I will turn off my swap (disable swap partition) and use this space to extend non lvm root partition in Linux ~]# swapoff -a Total used free shared buff/cache available #Virtualbox arch linux partition how toAfter deleting swap, root partition will become the last partition on /dev/sda after which we can resize primary partition.ĪLSO READ: How to configure iSCSI target and initiator on CentOS/RHEL 7/8 Linux Disable swap partitionĬurrently I have around 1GB reserved for swap partition ~]# free -m So to expand root partition I must delete swap device to be able to to use unallocated space and extend non lvm root partition. Number Start End Size Type File system Flags <- This is my partition layoutģ 11.3GB 12.3GB 1074MB primary linux-swap(v1)Īs I mentioned in the disclaimer section, you can change size of partition only on the last partition of the device but here root partition ( /dev/sda2) is not the last one instead swap ( /dev/sda3) is my last partition. Sector size (logical/physical): 512B/512B To list the available partitions in /dev/sda we will execute below command ~]# parted -l /dev/sda Here we plan to resize primary partition which in our case is /dev/sda. You can either use gparted (GUI utility) or parted (CLI utility) to change size of partition in Linux. Method 1: Change size of partition using parted CLI utility Additionally I have left some unallocated free space in /dev/sda for the demonstration of this article to extend non lvm root partition. ![]() Here my VM is installed on /dev/sda device where /dev/sda1 is boot partition, /dev/sda2 is root while /dev/sda3 is for swap. My VM is running with CentOS 8 but I have also verified these steps on RHEL/CentOS 7 and RHEL 8 Linux. I have performed resize primary partition operation on Virtual Machine running on Oracle VirtualBox installed on Linux server. Lab Environment to resize primary partition (RHEL/CentOS 7/8) in Linux I will only demonstrate the steps to extend non lvm root partition, but using the same methods you can also shrink and change size of partition to lower value in Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |