If you are not able to modify the size of the disk, the provisioned size setting is greyed out. Once complete click OK, this is all that needs to be done in VMware for this process. In the below image I have changed the previously set hard disk of 20gb to 30gb while the virtual machine is up and running. This is done by right clicking the virtual machine in vSphere, selecting edit settings, and then selecting the hard disk. Increasing the virtual hard diskįirst off we increase the allocated disk space on the virtual machine itself. Note that /dev/mapper/Mega-root is the volume made up from /dev/sda5 currently – this is what we will be expanding. For increasing the size of a Linux native partition (hex code 83) see this article.īelow is the disk information showing that our initial setup only has the one 20gb disk currently, which is under the logical volume named /dev/mapper/Mega-root – this is what we will be expanding with the new disk. Now that we have confirmed we are working with an LVM we can continue. The 8e hex code shows that it is a Linux LVM, while 83 shows a Linux native partition. fdisk -lĪs you can see in the above image /dev/sda5 is listed as “Linux LVM” and it has the ID of 8e. Identifying the partition typeĪs this method focuses on working with LVM, we will first confirm that our partition type is actually Linux LVM by running the below command. Throughout my examples I will be working with a VMware virtual machine running Debian 6, this was set up with a 20gb disk and we will be increasing it by 10gb for a total final size of 30gb. If you do not have space for another partition then you will need to consider a different method, there are some others in the above list. Prerequisites: As this method uses the additional space to create a primary partition, you must not already have 4 partitions as you will not be able to create more than 4. It could also be worth cloning the virtual machine first and testing out this method on the clone. Note that a snapshot must not be taken until after the virtual disk has been increased, otherwise you will not be able to increase it. If you are working with virtual machines make sure you take a snapshot of your virtual machine beforehand, or otherwise have some other form of up to date backup before proceeding. Important Note: Be very careful when working with the commands in this article as they have the potential to cause a lot of damage to your data. Update : I have created a video guide of this post in CentOS 7 shown below. How to Decrease the size of a Linux LVM – In this article the file system is shrunk followed by the LVM, allowing you to reclaim space in the volume group. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |