So i decide to move "/home" directory (also /var, /tmp, etc) to another partition, and this is how to do that :
1. creating new "vmware virtual disks" and adding it as a new partition to the ubuntu,
Select your virtual machine Ubuntu and then "right-click", choose "Settings" -> Add -> Hard Disk -> choose IDE/SCSI -> decide the capacity -> [your new virtual disk]
2. boot up your ubuntu
3. After login to your account, do ( do all the step below as root) :
- format your new partition(/dev/hdb1); use qtparted to make this works easier
- mount the partition to new directory
#mkdir /media/tmp
#mount /dev/hdb1 /media/tmp
- Copy all of your subdirectory under "/home" directory (user home directories) to "/media/tmp
cp -R -a /home/* /media/tmp/
- Delete your old subdirectories under your /home directory
#rm -rf /home/*
- Unmount your "/home" directory and unmount /media/tmp
#umount /home
#umount /media/tmp
- Mount your /dev/hdb1 to /home
#mount /dev/hdb1 /home
- modify your "/etc/fstab" file, and adding
/dev/hdb1 /home ext3 rw 0 0
- Remove /media/tmp
#rm -rf /media/tmp
4.Then reboot your machine, if everthings went ok. You wil have new /home directory under "new partition" with more free space.
note:
This also could be done to another directory, such as /var, /tmp or else
Cautions: : Backup All of Your Data first
Enjoy!!
I've installed VMWare to use a 2nd HD 80GB in size to use 70GB for the installation of SBS 2003 Standard. Within the OS disk manager, shows only 19GB of 80GB being used and over 50GB of unallocated space. However, VMWare is consuming the entire volume showing that only 74MB is available. As I test a recovery process, I know that I am going to run into problems reloading the VM SBS2003 after the recovery process. Does anyone know how I can make the available 50GB+ usable in VM for me to continue my testing? Any assistance is greatly appreciated. Thanks and Merry Christmas.
ReplyDelete