Although this problem is not strictly oracle related, it may be useful for anyone who needs to increase the available disk space on a xubuntu (and ubuntu as well i guess) vmware virtual machine where an Oracle instance is running.
The following procedure has been carried out on VMWare Fusion 2.0 (for Apple Macs platforms).
Original problem: i had a rather small xubuntu VM with 1GB RAM and 8GB (7GB+1GB swap disk) and i wanted to increase the space of both sda1(the main partition) and sda5 (swap partition) up to a total of 32GB (28GB for sda1 and 4GB for sda5).
Before starting i recommend that you make a copy of your VM files, just in case and of course the usual disclaimers apply.
- Increase the virtual disk space setting to the desired amount in the configuration panel of the VM. This operation is currently allowed only if there are no VM snapshots, so, you'll have to delete them first;
- Download gparted;
- Use the gparted ISO image as a virtual CD in VMWare or burn a physical CD using the file image;
- Reboot xubuntu with the CD inserted and connected;
- If your VM doesn't boot from CD, then you need to change the device boot sequence in the BIOS. Restart the VM and keep pressing F2 until the BIOS screen shows up.
- Resize and/or move the existing partitions until you get the desired size for all the partitions and apply the changes;
- Eject the CD and restart the VM normally;
- By changing the partition properties of the swap area, most likely the existing UUID of the partition has changed as well: verify with the command sudo blkid the current UUID of the swap partion and compare it with the UUID stored in /etc/fstab;
- If the two UUIDs are different, perform the following three additional steps:
- sudo swapoff -U old_UUID where old_UUID is the value contained in /etc/fstab;
- update /etc/fstab by executing: sudo vi /etc/fstab in order to update the file (copy and paste the new UUID from the output of blkid);
- perform: sudo swapon -a;
- If no errors are returned, you should be able to see the updated amount of available memory with the command: free -m;
Actually it took me a while to figure out initially what was wrong with the command swapon -a, because i was getting the somewhat funny message "cannot canonicalize /dev/disk/by-uuid/...", at that point i realized that i had to update the UUID in /etc/fstab.
Shorter solutions are welcome :-)