VirtualBox increase from 20gb to 40 gb
I have Window 7 Professional with Oracle VM VirtualBox version 4122 r80657 with Linux Centos 6 Servers.
I increased my Oracle VM VirtualBox from 20gb to 40 gb. I tried to copy a large folder from my old Centos 5 Server to this new Centos 6 server and it said there was not enough space. When I look at the machine its says under the Drive information: Type Normal (VDI) Virtual Size 40 GB Actual Size 14 GB Details Dynamically allocated storage. df -kh . Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_centos6webserver-lv_root 17G 14G 1.8G 89% / vgdisplay vg_centos6webserver --- Volume group --- VG Name vg_centos6webserver System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 19.51 GiB PE Size 4.00 MiB Total PE 4994 Alloc PE / Size 4994 / 19.51 GiB Free PE / Size 0 / 0 VG UUID IbyHuz-uNpx-ZgX5-pGnr-4P5r-R5MR-b0PWoP I created /dev/sda3 and it is empty and when I look in fdisk I see this Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 2611 20458496 8e Linux LVM /dev/sda3 2611 5221 20966162+ 83 Linux So my question is how do I make so that I can increase the LVM drive with the empty space on sda3 ??? I am new to linux so need help. I think I am doing something silly or missed something somewhere but any help would be appresiated. Cheers |
I booted in to gparted but could do nothing with the /dev/sda2 which is lvm2. I deleted the partition /dev/sda3 that I created and I now have 20 gb of free space which is where I was after I make the disk larger in VertualBox. I can make the free space either Primary or Extended in gparted.
VertualBox still shows the disk 40 gb which /dev/sda is but I can only use the 19 Gb that is on sda2. Any help appreciated as I have working on this server for so long. It is at home not a work server so it is personal :) fdisk /dev/sda with the p option gives this Command (m for help): p Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0002b93c Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 2611 20458496 8e Linux LVM Cheers |
OK this is what I did to solve the problem.
I made a Clone of the VM then did the following. 1. I used fdisk to change /dev/sda2 from lvm to Linux 3. Shut down the VM and booted into Gparted 4. I deactivated sda2 and increased the size by all available space (Still showed as lvm at this stage) 5. I reactivated sda2 and shutdown Gparted. 6. I booted into the VM 7 fdisk shows the following: Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0002b93c Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 5222 41430016 83 Linux Everything looks OK and I can open the web server and see the files.... I think that the problem is fixed, and I take no responsibility if you try and it fails to work :) EDIT: This did not fix the problem just looked like it did. I deleted it all and started again |
All times are GMT -5. The time now is 09:18 PM. |