Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Moved here from StackOverflow

I made my VirtualBox (4.3.0) Ubuntu VM (on Win 7 host) too small. I have the choice of enlarging the virtual disk (all I read makes that sound dangerous and complicated) or to add a second "drive" (which sounds easier). I chose the second drive.

I shut down and cloned my VM. On the clone VM I went to the storage setting and added another, much larger, SATA drive (350 GiB). I set it to dynamically allocate space.

I booted up the VM and used ffdisk to make a partition table (primary partition using the whole drive). Seemed to work and fdisk /dev/sdb, p command says:

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1       734003199   734003199        0+  83  Linux

Now to put a filesystem on the disk. I issue the command:

sudo mkfs.ext4 -L /data /dev/sdb1

and get the message

mke2fs 1.42 (29-Nov-2011)
mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
    partition table wasn't reread after running fdisk, due to
    a modified partition being busy and in use.  You may need to reboot
    to re-read your partition table.

Rebooting did not fix the problem.

The description of the second drive from the VBox Manager reads:

Type:             normal (VDI)
Virtual Size:     350.00 GB
Actual Size:      3.00 MB
Details:          Dynamically allocated st...

Can someone advise me on how to approach this problem? Google nor StackOverflow have yielded any useful answers.

share|improve this question
Looks like you're going hardcore with the low-level commands. In the Ubuntu VM, why not use 'gparted' to create and initialize your new HD – rickhg12hs Nov 11 '13 at 13:33
The partition you created is 0 blocks long. Remove it and create a proper new partition. – Oliver Salzburg Nov 11 '13 at 14:03
Thanks to both of you. It was 0 bytes long and gparted was a big help. Problem fixed. – Wes Miller Nov 11 '13 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.