![]() Open Server Manager -> Tools -> Computer Management.How to Increase the Disk Size in Guest Windows Server?Ĭonnect to the Windows Server virtual machine using RDP or VNC and expand the disk. Thus, you have extended the disk size on the virtual machine running CentOS 7. Some sources recommend using the following command :īut it won’twork for the XFS file system! Last sector, +sectors or +size Īfter the VM restart, check the disk using this command: # fdisk /dev/vda Welcome to fdisk (util-linux 2.23.2).Ĭhanges will remain in memory only, until you decide to write them.īe careful before using the write command. Let’s extend /dev/vda2 to the maximum available size: The screenshot shows that /dev/vda2 has the size of 20GB, and the available disk space is 25GB. Note that after performing the above steps, because we deleted the swap partition and re-created it, its UUID changes, so it is better to find your swap partition new UUID with the blkid command and update it in the /etc/fstab file.Connect to the VM Guest OS over SSH and make sure that additional 5 Gb of disk space appears. Now after Resize Partition : /dev/sda2 After-resize The system may give you this warning several times, each time typing the word ignore.Īfter rebooting the server, run the partition resize command: resize2fs /dev/sda2 Before-resize Rebuild the swap partition with this command : Type: Ignore ( The system may give you this warning several times, each time typing the ignore.) You should reboot now before making further changes. As a result, the old partition(s) will remain in use. (Capital letter) If the value is a change of terabytes, use the letter T.Įrror: Partition(s) 3 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. G is a GIGABYTE symbol and must be entered after entering a numeric value. I have 53.7 GB of space here, the final size I consider for the root partition is 51.7 and the rest will be used to build the swap partition. Because we need to re-create the swap partition after the root partition is resized, and I will allocate 2 GB for the swap partition, so I will reduce this amount by 2 GB of space and allocate the rest to the root partition. Now the system asks you to specify the final size of the partition. Warning: Partition /dev/sda2 is being used. Now we are going to resize the partition with this command: resizepart 2 Ignore/Cancel? Create and Resize partition with parted #ģ. It also displays the following warning that you must type the Ignore option.Įrror: Partition(s) 3 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. (Run this command: rm 3)Īs you can see in the image above, the system warns you that the partition is being used by the system. Therefore, we need to delete the third partition, which is the swap partition, so that we can change the second partition. I want to increase the root partition and the root partition is number two. Check current Disk status with gparted.Step-by-step tutorial on resize (increasing) the root partition: Check Disk status with parted command # In the event of a mistake or any unforeseen error, your server may not boot again or you may lose your data. Warning: Please make a backup of your data before performing these steps. Note that this method may be risky, so I recommend backing up your server data before doing so. Also I am teching this Article on Ubunto. In this scenario, according to which I have prepared the training, it is based on the fact that the partition of hard disk tables is based on GPT patition table and is non-logical (non-LVM). In this article, I will teach you how to resize a root partition on Linux servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |