![]() ![]() ~]# df -h /įilesystem Size Used Avail Use% Mounted on Resize the File System resize2fs /dev/VolGroup/lv_root ~]# lvresize /dev/VolGroup/lv_root -l +100%FREEĪnd that is it. #Adding more disk space to linux vm freeThe “+100%FREE” part of the command tells it to uses up all of the free space available lvresize /dev/VolGroup/lv_root -l +100%FREE ~]# lvresize /dev/VolGroup/lv_root -l +100%FREEĮxtending logical volume lv_root to 10.71 GiB ![]() ![]() If it says 0 then you won’t be able to run the next command. Resize the Phisical Volume pvresize /dev/xvda2 ~]# pvresize /dev/xvda2ġ physical volume(s) resized / 0 physical volume(s) not ~]# Show the current size of the Physical Volume pvdisplay ~]# pvdisplay The next reboot or after you run partprobe(8) or kpartx(8) WARNING: Re-reading the partition table failed with error 16: Device or resource busy. Partition 1 does not end on cylinder boundary.Ĭalling ioctl() to re-read partition table. I/O size (minimum/optimal): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes #Adding more disk space to linux vm 64 BitSwitch off the mode (command 'c') and change display units toĭisk /dev/xvda: 12.9 GB, 12884901888 bytesĢ55 heads, 63 sectors/track, 1566 cylinders Check for if we are running a 64 bit kernel (it is needed for handling >2TB disk sizes) uname -a. WARNING: DOS-compatible mode is deprecated. Resize2fs /dev/VolGroup/lv_root <- Resize File SystemĪll the keys and command that were hit and executed are in bold. Lvresize /dev/xvda2 -l +100%FREE <- Resize Logical Volume Pvresize /dev/xvda2 <- Resize Physical Volume Pvdisplay <- Display Physical Volume info Reboot <- Reboot to apply the partition table updates fdisk /dev/xvda <- Edit the Partition Table If for some reason your drive is not “xvda” or your LVM name is different, change the commands accordingly. The path to the disk is “/dev/xvda” the LVM path/name is “/dev/VolGroup/lv_root” The goal is to increase lv_root’s size from about 8GB to about 12GB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |