ENLARGED HDD IN VIRTUAL BOX

I run openSUSE 11.4 in a VBox on a Win 7 host and ran out of virtual HDD space (12GB). It is easy to add another vrtual HDD and mount it to, say, /home. I enlarged the HDD space in VBox to 20GB, but the suse client does not see the new size / empty disk space (20GB) and reports the original disk size (12GB) in du, ds, fdisk and partitioner. I booted from a GParted iso, same. I do realise that there are always workarounds, but as a learning experience, I would like to solve this. Any ideas will be welcome.

On Tue, 16 Aug 2011 15:46:03 +0000, stefaug wrote:

> I run openSUSE 11.4 in a VBox on a Win 7 host and ran out of virtual HDD
> space (12GB). It is easy to add another vrtual HDD and mount it to,
> say, /home. I enlarged the HDD space in VBox to 20GB, but the suse
> client does not see the new size / empty disk space (20GB) and reports
> the original disk size (12GB) in du, ds, fdisk and partitioner. I
> booted from a GParted iso, same. I do realise that there are always
> workarounds, but as a learning experience, I would like to solve this.
> Any ideas will be welcome.

You have to increase the size of the partition in the virtual hard drive
as well - just expanding the vitual disk is not enough.

gparted can be used to grow the partition, most likely - what filesystem
did you put on it?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Are you saying that fdisk is showing no unpartitioned space? Utilities such as df generally don’t report on unpartitioned space, but you should see it in a partitioning tool. Try to use the partitioning utility in YaST and see what it reports as your total HD size. If that checks out, you can use that tool to expand one of your existing partitions to use that extra space. This is usually safe, but make sure to back everything up before doing it. If something does go wrong in the middle of a partitioning operation, you will need it.

Did try all of the above. openSUSE still sees the disk as 12GB, no matter what tool I use. This should be the same as if you take the physical disk out of a machine, ghost it to a larger drive and replace it, not no?

Thanks for the reply, Mr Henderson. I did try all of the above utilities. openSUSE still sees the disk as 12GB with no unpartitioned space, no matter what tool I use. The present root partition is Ext4, no additional partitions other than swap. This should be the same as if you take the physical disk out of a machine, ghost it to a larger drive and replace it, not no?

On 08/16/2011 05:46 PM, stefaug wrote:
>
> I run openSUSE 11.4 in a VBox on a Win 7 host

is your VBox and CPU fully capable of fully supporting 64 bit VM
operations? (i’m thinking maybe you are running out of ability to
count (see) space past some hardware/software limit [like 32 bit can’t
see past 3.x gigs of RAM])

you might run the linux on bare metal (as host) and the Win7 in the VM
and see how it gets along with a 12GB+ hard drive!


DD Caveat
openSUSE®, the “German Engineered Automobile” of operating systems!

On Wed, 17 Aug 2011 08:16:03 +0000, stefaug wrote:

> Thanks for the reply, Mr Henderson. I did try all of the above
> utilities. openSUSE still sees the disk as 12GB with no unpartitioned
> space, no matter what tool I use. The present root partition is Ext4,
> no additional partitions other than swap. This should be the same as if
> you take the physical disk out of a machine, ghost it to a larger drive
> and replace it, not no?

What is the output of:

fdisk -l

(You’ll need to run this as root)

Second question, what process did you use to grow the virtual hard disk
in VirtualBox?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Wed, 17 Aug 2011 11:57:30 +0000, DenverD wrote:

> is your VBox and CPU fully capable of fully supporting 64 bit VM
> operations? (i’m thinking maybe you are running out of ability to
> count (see) space past some hardware/software limit [like 32 bit can’t
> see past 3.x gigs of RAM])

Don’t think that’s likely to be it - 12 GB is relatively small compared
to modern hard drives - otherwise we’d see problems installing openSUSE
on systems with 500 GB physical drives, wouldn’t we? (Perhaps I’m not
understanding your point here)

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

when you started the vm and elected to boot from your gparted boot disc… does it see a completely allocated 12GB drive or 12GB used of the 20GB that Vbox has supposed to have created?

this is beginning to sound like lvm2 was used during the install.

On 08/17/2011 07:25 PM, Jim Henderson wrote:
> (Perhaps I’m not understanding your point here)

no, i think you are probably right…dang i was thinking 12 GB was a lot

(i must have momentarily been living/thinkin in '92 with my 21 MB hard
drive and 8088, sigh)


DD
openSUSE®, the “German Engineered Automobile” of operating systems!

On Wed, 17 Aug 2011 18:17:38 +0000, DenverD wrote:

> On 08/17/2011 07:25 PM, Jim Henderson wrote:
>> (Perhaps I’m not understanding your point here)
>
> no, i think you are probably right…dang i was thinking 12 GB was a lot
>
> (i must have momentarily been living/thinkin in '92 with my 21 MB hard
> drive and 8088, sigh)

LOL, I remember my 10 MB hard drive way back ‘in the day’. Old Kaypro
“suitcase”, complete with a built-in CRT. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

The HW runs just fine with other VM’s with HDD space up to 100GB (on a 2TB bare metal disk). I cannot swap OS’es as the host is not a toy.

Ha, ha (Or as the kids says these days: LOL). Ja, those were them days. And then came Windoze, and the world was never the same again.

Anyway, I found the problem: It is in the way that VirtualBox stores “snapshots” in separate files. Before you enlarge the container in VirtualBox (VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB), you must “clone” the guest into one contiguous file with NO snapshots and enlarge the clone. The cloning wreaks havoc on your File Systems (marking /swap as type=unknown and / as type=linux-swap) but this can be rectified by a repair. After that you can use Gparted, expert partitioner, or whatever your poison is. I would, however, rather err on the side of caution and do the repair first, make sure the guest runs and then re-size the partition.

Being old and stupid and all, I do not know how to close a thread. Would one of the enlightened gentlemen please close this one?

On 08/18/2011 09:56 AM, stefaug wrote:
> the problem … the way that VirtualBox stores “snapshots” in separate files.

my earlier ‘swap host/guest places’ was another way saying i didn’t
think it was an openSUSE problem…

maybe you will log a bug with the VM maker, please…


DD
openSUSE®, the “German Engineered Automobile” of operating systems!

DD,
Thanx for the help. It is much appreciated.

Jim,
Thanx for the help. It is much appreciated.

On Thu, 18 Aug 2011 07:56:03 +0000, stefaug wrote:

> It is in the way that VirtualBox stores “snapshots” in separate files.
> Before you enlarge the container in VirtualBox (VBoxManage modifyhd
> YOUR_HARD_DISK.vdi --resize SIZE_IN_MB), you must “clone” the guest into
> one contiguous file with NO snapshots and enlarge the clone.

Ah, yes, that would do it - the same applies in VMware as well, and I
didn’t think to ask about that (indeed, I didn’t know vbox supported
snapshots).

Glad to hear you got it resolved.

We generally don’t ‘close’ threads here, DD’s changed the subject in his
reply to include “Solved” - on the web interface, you can also add a tag
that indicates it’s solved.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Glad you got it… I have been messed up on other operations with how snapshots work, so that makes total sense.