I failed to increase the actual size of that disk with 30G so I created another drive but I don't know how to access it. How can I access this other hard disk with 100.7G so that the other doesn't complain of space no more.
In your current setup the only way is to create filesystem and mount it somewhere and use it.
mkfs -t <your preferred filesystem> /dev/sdb1 mount /dev/sdb1 /some/mountpoint
(the above commands must be executed as root or via sudo)
If you had LVM then you can just add this disk to the VG and extend and/or add LV/filesystems
This does not exactly answer your question "How do I use 2 drives on linux on virtualbox?”, but may answer the root problem.
The running OS , looks like Ubuntu, and running programs may not use the newly mounted hard drive for space it needs. Locations like
/home/user are some of the locations used by linux and the Gnome desktop.
If the new drive is mounted at
/mnt/more_space that will not prevent the OS from complaining that it is running out of space.
You could move some files from the small drive to the larger to free up space on the smaller drive.
You could change the location of your home directory or the tmp directory to the larger drive.
You could increase the size of the smaller drive if it is in VDI or VHD format and dynamically allocated with the cli command
VBoxManage modifyhd --resize 100GB.
NOTE: VDI and dynamically allocated are the defaults.
Then resize the partition to fill the new disk space.
If your small drive is not VDI or VHD format and dynamically allocated...
You could create a new virtual drive. Attach it to the VM. (looks as if you have already done this) Clone the smaller drive to the larger drive with a program like Clonezilla.
- Attach a bootable DVD to the VM like a older version of Parted Magic. I like it because it has all the tools needed in one place like
- Set up new larger HD similar to the older small one. Example the first partition as ext3. Extended partition with a linux swap partition, generally the size of installed RAM. Tool used: Partition editor.
- Create an image of the smaller drive. I recommend device-image vs. device-device in Clonezilla. You will need a third place to put the image. It will be compressed so should be much smaller than the 26GB size of the drive. Tool used: Clonezilla. (device-image) (location of place to put image) (Beginner) (saveparts) (...)
- Restore the image to the larger drive. Tool used: Clonezilla.
- Fix new drive UUIDs in
etc/fstab/. Tools used:
blkidto get new drive UUIDs. Text editor for fstab.
vi /etc/fstab. NOTE: You can do these changes in Parted Magic before you reboot.