LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 11-06-2012, 05:38 AM   #1
dingo-den
Member
 
Registered: Aug 2005
Location: Kamloops, BC Canada
Distribution: Debian 6 and 7
Posts: 30

Rep: Reputation: 0
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

Last edited by dingo-den; 11-06-2012 at 08:30 AM. Reason: Pasted in information
 
Old 11-07-2012, 06:22 AM   #2
dingo-den
Member
 
Registered: Aug 2005
Location: Kamloops, BC Canada
Distribution: Debian 6 and 7
Posts: 30

Original Poster
Rep: Reputation: 0
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
 
Old 11-07-2012, 07:36 PM   #3
dingo-den
Member
 
Registered: Aug 2005
Location: Kamloops, BC Canada
Distribution: Debian 6 and 7
Posts: 30

Original Poster
Rep: Reputation: 0
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

Last edited by dingo-den; 11-07-2012 at 10:17 PM. Reason: Added comment at bottom
 
  


Reply

Tags
disc, virtualbox


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to increase the VDI size in VirtualBox on Fedora 9? Mr. Rey Linux - Software 10 05-24-2010 08:05 AM
Ubuntu guest increase hard drive using VirtualBox? Syllan Linux - Newbie 2 08-25-2009 09:29 AM
20gb linux partition already full hilliard Ubuntu 3 09-21-2008 06:17 PM
LXer: The 20GB+ Eee PC mod LXer Syndicated Linux News 0 12-04-2007 11:00 PM
missing 20GB on 160GB drive jb8578 Fedora 3 12-14-2006 01:40 PM


All times are GMT -5. The time now is 12:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration