Step 4: Update the filesystem to use the new space Now we’ve got the new space added, but the filesystem doesn’t know about it yet. Logical volume LogVol00 successfully resized Rounding up size to full physical extent 24.90 GBĮxtending logical volume LogVol00 to 47.8 GB # lvextend -L+24.9G /dev/VolGroup00/LogVol00 For this command you need to get the path to the logical volume, which you can get by running the lvdisplay command Here’s the command to expand the volume: Next, we need to run the lvextend tool to expand the volume to use the new space. Step 3: Expand the logical volume to use the new space The new physical volume has now been added to the volume group and is ready to be allocated to a logical volume. Volume group "VolGroup00" successfully extended You can do this by using the vgextend command as such: Now that the disk is a physical volume, it can be added to a volume group. Physical volume "/dev/sdb" successfully created To do so, issue the pvcreate command as such: # pvcreate /dev/sdb Units = cylinders of 16065 * 512 = 8225280 bytesĭisk /dev/sdb: 25.7 GB, 25769803776 bytesĭisk /dev/sdb doesn't contain a valid partition tableīefore we can add the new disk to the volume group, we need to do a special format command that will turn the disk into a physical volume. ![]() If you perform an fdisk -l command, you should see the new disk. Now, let’s verify that we can see the new disk. Step 2: Add the new physical disk to an existing Volume Group. Once you have the new drive added (either physical or virtual), start the server up again and let Redhat boot. If you’re working with a physical server, you would need to add the new hard drive, and make sure the BIOS can see the new drive. For our demonstration, I’ll be adding a new 30G disk. Since we’re setup with a virtual machine, we just need to login to vSphere, shutdown the operating system, and add a new virtual disk through the Settings menu. Step 1: Present the new physical disk to the server. Notify the operating system about the change in size. Expanding a logical volume within that Volume Group to use the new disk space.Ĥ. Adding the new physical disk to an existing Volume Group.ģ. Present a new physical disk to the serverĢ. With these requirements in place, here’s a quick summary of what we’ll be doing:ġ. Alternatively, there’s a method that involves deleting partition tables and recreating them. LVM is readily available in the linux kernel, so no packages need to be installed in order to enable it. It’s important to note that you can add more space to existing volume groups in an LVM setup. The disk only has 1G of free space, and we need another 25G to handle a new application’s install and projected growth. So, instead of getting that phone call or page saying that your server is out of space, you can manage your free space by adding more of it dynamically! Yes, with a single reboot of your machine (to install a physical or virtual disk), you can easily add more space and keep things running smoothly.įor demonstration purposes, this article will be focusing on adding more disk space to a virtual Redhat server which has a single virtual disk of 25G in size. I’m sure all of you are well aware of what happens when a server runs out of available disk space! I won’t go into a boring lecture on why managing disk space is critical. A common question is how to increase disk space on a linux system. One of the common tasks for any system administrator is managing disk space on a server. ![]() (Originally published in 2012, updated January 2022.) SPK vCAD ™ - Virtual Engineering Platform
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |