Hey everyone!
So I have a VM disk running Ubuntu on a Windows 10 host (6.0.12 version of virtualbox). I'm running out of room on the 2tb vdi file. So I looked around and found the vboxmanage modifymedium command to increase the disk size to 3tb. All well and good so far but I'm unable to make the new, unallocated space accessible because the slider on the machine property settings for the image file only goes to 2tb.
Anyone know a workaround?
Thanks for help!
Increase disk size past 2tb?
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Increase disk size past 2tb?
Does the disk use GPT partitioning? Does the VM use an EFI BIOS?
If you answered no to either question then you have to live with 2TB. You can however add another drive to the VM.
I must say that I've never heard of anyone overflowing a 2TB virtual hard disk inside a VM, except when they accidentally downloaded the whole of Wikipedia or something. What size is the drive which hosts the VDI?
If you answered no to either question then you have to live with 2TB. You can however add another drive to the VM.
I must say that I've never heard of anyone overflowing a 2TB virtual hard disk inside a VM, except when they accidentally downloaded the whole of Wikipedia or something. What size is the drive which hosts the VDI?
Re: Increase disk size past 2tb?
It's an actual, functional database running a webserver. The database is heavy in jpegs and is being fed by a daily stream of records that are scraped. Bummer that it can't be expanded. Right now the host is a 4tb SSD.
Designers say "meh, 2tb limit will be good enough for everyone" then a few years later this happens and we wonder "what idiot cooked in such a low limit??"
Designers say "meh, 2tb limit will be good enough for everyone" then a few years later this happens and we wonder "what idiot cooked in such a low limit??"
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Increase disk size past 2tb?
2TB can hold an awful lot of JPEGs. Quick calculation: if the average size of the JPEG is 128KB, then a 2TB drive can store 17,179,869 of them. Of course text is readibly compressed (unlike JPEGs which are already compressed), so 2TB can store a huge amount of mixed text and graphics.
MBR (which includes the legacy partition map) was designed in the DOS era, sometime around DOS 2.11 as I seem to recall, when the first hard drives were installed in PCs. Hard drives were typically 10MB or 20MB at that time, so a 2TB drive is 100,000 times the size of one of those. So MBR managed to stay relevant (albeit with a mild tweak halfway to add LBA addressing) for 3 decades and during an incredible several orders of magnitude size increase, so I'd say that the designer of MBR did a damn good job. In fact my current PC has a 512GB SSD plus a 2TB HDD: it so happens that it uses EFI and therefore defaulted to GPT, but it could still be using MBR no problem.
MBR (which includes the legacy partition map) was designed in the DOS era, sometime around DOS 2.11 as I seem to recall, when the first hard drives were installed in PCs. Hard drives were typically 10MB or 20MB at that time, so a 2TB drive is 100,000 times the size of one of those. So MBR managed to stay relevant (albeit with a mild tweak halfway to add LBA addressing) for 3 decades and during an incredible several orders of magnitude size increase, so I'd say that the designer of MBR did a damn good job. In fact my current PC has a 512GB SSD plus a 2TB HDD: it so happens that it uses EFI and therefore defaulted to GPT, but it could still be using MBR no problem.
Re: Increase disk size past 2tb?
I am thinking LVM on Linux is the way to go. (Logical Volume Manager.)
The way to do it is add an additional virtual 2TB disk for the VM in question; then using LVM, add the new disk(s). The same process can be done to add as many 2TB virtual disks as you have available.
Adding additional disks to existing LVM:
$ pvcreate /dev/sdb /dev/sdc /dev/sde {Here i am adding 3 'disks': sdb, sdc, sde}
{Add newly created pv named /dev/sdb to an existing lv}
$ vgextend ubuntu-vg /dev/sdb /dev/sdc /dev/sde {Replace LVMVolGroup for the existing name}
$ lvm lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
$ mkfs.ext4 /dev/ubuntu-vg/ubuntu-lv {Already done, if re-typed, it will format disk *****}
$ mkdir -p /mnt/ubuntu-lv
$ mount /dev/ubuntu-vg/ubuntu-lv /mnt/ubuntu-lv
$ cp /etc/fstab /etc/fstab.bk
$ nano /etc/fstab
/dev/ubuntu-vg/ubuntu-lv /mnt/ubuntu-lv ext4 defaults,nofail 1 2
$ mount -a {Remount /etc/fstab Without Reboot in Linux}
The way to do it is add an additional virtual 2TB disk for the VM in question; then using LVM, add the new disk(s). The same process can be done to add as many 2TB virtual disks as you have available.
Adding additional disks to existing LVM:
$ pvcreate /dev/sdb /dev/sdc /dev/sde {Here i am adding 3 'disks': sdb, sdc, sde}
{Add newly created pv named /dev/sdb to an existing lv}
$ vgextend ubuntu-vg /dev/sdb /dev/sdc /dev/sde {Replace LVMVolGroup for the existing name}
$ lvm lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
$ mkfs.ext4 /dev/ubuntu-vg/ubuntu-lv {Already done, if re-typed, it will format disk *****}
$ mkdir -p /mnt/ubuntu-lv
$ mount /dev/ubuntu-vg/ubuntu-lv /mnt/ubuntu-lv
$ cp /etc/fstab /etc/fstab.bk
$ nano /etc/fstab
/dev/ubuntu-vg/ubuntu-lv /mnt/ubuntu-lv ext4 defaults,nofail 1 2
$ mount -a {Remount /etc/fstab Without Reboot in Linux}
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Increase disk size past 2tb?
LVM is a complex system with its own issues with compatibility and maintainability. IME, when you want robust reliability and repairability then the simplest filesystem is often the best.