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.