I built a Basic Ubuntu 14.03 machine - nothing fancy.
In VirtualBox I choose to allocate 8Gb of storage.
Looking in the Machine
The machine reboots - and I check the disk space...
Create a Disk
With the Machine powered down create a new Drive and Attach it via VirtualBox
Adding The Storage
Boot the machine - and as root
df Take note of the mounted devices (/dev/sda1)
Now see what devices you have
Take note of the filesystem partition of your physical volume sits (ex. /dev/sda2)
Creating a New Device
NOW BE VERY VERY CAREFULE THIS CAN GO HORRIBLY WRONG
Let us assumes that the new device shows up as /dev/sdb.
fdisk /dev/sdb We need to organise the partitions
Select your partition (we are creating from new from /dev/sdb)
Create a new partition
Make it a primary partition
The partition number to make it on (same as we deleted)
reboot We must reboot in order to have the new partition table loaded
Shows /dev/sdb and is 2.6 Gb is size.
o create new Partition Table
n New Partition
1 Partition No
return Start Block
return End Block
w Write and Exit
Create a File System
Now we need to make a file system
mkfs -t ext4 /dev/sdb1
At this point we can mount the disk
- by Device Name
- by BLKID
BLKID is more reliable, DeviceID is a little simpler.