(mods/admins/etc: This may or may not belong on Stack Overflow, let me know if putting it here was a mistake.)
I'm one of those guys that is always paranoid about disk space, so when my hard drive (Windows box) reached about 50% full, I decided it was time to expand. I stupidly chose to do so with a second hard drive and the Intel Matrix fake-RAID that came with the motherboard. The second hard drive is larger, so it isn't having the full space used. Unhappy with this, I bought another hard drive the same model as the second, and I am trying to move over to it without breaking the RAID 0 and losing everything.
I found a program that advertised its capability of backing up the whole hard drive or a partition thereof to one of four formats, among which is .vmdk. I told it to back up the usable partition that the fake RAID says exists, and the .vmdk successfully boots in VirtualBox. I have been doing this repeatedly for months, and only recently did I ever actually think to find out what the VM sees as its hard drive. It seems that when I told the program to back up the partition used (i.e. the actual hard drive), the program compelled itself to back up the entire hard drive, i.e. the whole RAID array.
This could have been fine and dandy, except that the entirety of the whole RAID array is a little more than .2 TiB greater than the capacity of the third hard drive. Since most of this is unused, I'm trying to cut it off, at which point I can migrate it to the third hard drive and then redo the RAID.
I'm using an Ubuntu live CD to do operations on the backup drive. I have converted the backup from .vmdk to .vdi (both disks boot properly in VirtualBox), I have converted it to raw and attempted to dd it to the new drive (reported that it ran out of space, and disk refused to boot).
VBoxManage is no help at reducing size, and I found somewhere that it is impossible. It seems that the only size I can reduce is the size that the host sees, which is problematic as the whole problem is cutting the logical size of the drive.
How exactly can I make the logical drive fit into 1 TB?
compact
. Or, you can shrink the partitions, write it out to an IMG withclonehd --format raw
,truncate
it, andconvertfromraw
. Failing that, you could swap out the clone and convert commands fordd
s from live media.