[ale] mint 13 vm running out of storage space

Ron Frazier (ALE) atllinuxenthinfo at techstarship.com
Sun Oct 13 21:55:39 EDT 2013


Hi all,

I thought I'd post an update in case anyone else needs the info.  I 
always try to share what I learn.

I successfully replaced the small virtual hdd with a larger one on my 
vm.  It was painful.  However, it wasn't as painful as a full vm 
reinstall would have been.  When the vm ran out of storage, I think some 
of the configuration options failed to get saved, so I have to recheck 
some things.  But, I think 95% of everything is still there.

Note, I originally tried to have clonezilla auto resize the file system. 
  That failed.  The new virtual hdd wouldn't boot.  Possibly, I had the 
settings wrong.  Anyway, I ended up making an exact clone of the drive 
partition table then resizing.  My virtual disk uses mbr partitioning. 
  I don't how this would differ on gpt, lvm, etc.

Here are the general steps I went through.  There may be a few 
intermediate steps here and there that I didn't list.  It's actually 
taking me about 2/3 as long to write this and proof it as to do it.  The 
procedure took about 1.5 hours.

01) Shut down the vm.
02) Use the virtualbox control panel to create a 2nd, larger, hdd on a 
second sata port.  Note the number of sata ports on the controller must 
be adequate.
03) So, I had something like mint13vm-small.vdi on port 0 and 
mint13vm-big.vdi on port 1.
04) Boot from a clonezilla iso or cd.
05) Set clonezilla to clone (exactly) from mint13vm-small.vdi to 
mint13vm-big.vdi.  Here are the essential setup steps.
    05a> start clonezilla
    05b> device to device
    05c> expert mode
    05d> disk to local disk
    05e> set source to the mint13vm-small.vdi disk (for example)
    05f> set target to the mint13vm-big.vdi disk (for example)
    05g> set advanced options - -g, -j2, -icds, -fsck-src-part, -v
    05h> set interactive fsck of source
    05i> set use partition table from source
06) Start the clone procedure.
07) Power off when done and remove the cd.
08) Use the virtualbox control panel to detach mint13vm-small.vdi.
09) Change the sata port for mint13vm-big.vdi to port 0.
10) Boot the vm.
11) Disable swap with sudo swapoff -a.
12) Use command such as sudo vim /etc/fstab or gksu pluma /etc/fstab to 
edit the fstab file.  Comment out the swap line with a # symbol.  Mint 
uses pluma as a graphical text editor rather than gedit.
13) Reboot the vm.
14) Verify that swap is inactive with swapon -s.  No swap should be 
listed.  You can also start system monitor, click resources, and look at 
swap.  It should say zero bytes.
15) Install gnome-disk-utility.
16) Run disk utility.
17) Delete the swap partitions.
18) Shut down the vm.
19) Note, gparted in Ubntu repositories is very outdated.  Download a 
gparted iso from their website and make a bootable cd.
20) Boot the vm with the gparted cd.
21) Access the vm's boot partition, which should be the big hdd with a 
small boot partition.
22) Resize the boot partition to be larger and leave a small amount of 
room for swap space, say 4096 MiB.
23) Create a 4096 MiB swap partition at the end of the drive and format 
it as such.
24) Shut down gparted and remove the cd.
25) Boot the vm.  Mint should boot normally.
26) Use system monitor or another command to check file system space 
available.  There should be lots of it, but no swap active.
27) Use the following command to find the UUID's of each partition, ls 
-l /dev/disk/by-uuid.
    This is documented here: 
http://liquidat.wordpress.com/2007/10/15/short-tip-get-uuid-of-hard-disks/
28) Keep this in one window.  In another window open /etc/fstab (as 
above, as superuser).  Put the windows side by side or above and below 
each other.
29) The UUID of your boot partition in /etc/fstab should match the uuid 
shown for that partition by the ls command.  Otherwise, you probably 
could not have booted the vm.
30) The UUID of the swap partition you previously commented out in 
/etc/fstab will probably NOT match the output of the ls command and must 
be changed.  Carefully copy the UUID of the SWAP partition from the 
output of the ls command.  If unsure which partition to use, load disk 
utility and look at the partition map.
31) In the window with /etc/fstab open, highlight the UUID of the swap 
partition and paste.  This will replace the old UUID with the new UUID.
32) Remove the # symbol you previously put at the beginning of the swap 
file line in fstab.
33)  Save the fstab file.
34) Reboot the vm.
35) Execute swapon -s to determine that the swap partition is active. 
  You can also run system monitor and click resources.  You should see a 
primary boot partition with lots of free space and an active 4 GiB swap 
partition.

Well, that's it.  It wasn't easy, but at least it worked.  Next time, 
I'll make the virtual HDD BIGGER in the first place.

Where was I?  Ah ... yes.

Now I can get back to trying to get the android emulator working.

Sincerely,

Ron


On 10/13/2013 7:29 PM, Ron Frazier (ALE) wrote:
> Hi Don,
>
> I like the way you think.  Maybe I can do this in one step.  Instead of a temporary virtual drive, I'll just create a 2nd bigger one.  I'll use clonezilla to clone the original to the 2nd one, shut down, swap the virtual sata connections, and detach the original drive.  It would be just like a hdd upgrade on a physical pc.  I think I'll try that.  It may be the simplest solution.  Thanks for the tip.
>
> Sincerely,
>
> Ron
>
>
>
> Don Kramer<donkramer at gmail.com>  wrote:
>
>    
>> My two cents: Create a temporary virtual drive, boot a Clonezilla .iso
>> in
>> VirtualBox to backup  the current VM drive to that temporary drive you
>> just
>> created. Once done create a larger virtual drive and then run
>> Clonezilla
>> again to restore the backup image from that temporary virtual drive to
>> the
>> new larger virtual drive. Then make the new larger virtual drive the
>> primary drive of the VM.
>>      

-snip-


-- 

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new email messages very quickly.)

Ron Frazier
770-205-9422 (O)   Leave a message.
linuxdude AT techstarship.com
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU



More information about the Ale mailing list