Appliance:Adding disk space under VMware
From rPath Wiki
Adding more disk space (VMware)
If you're using the VMware ® version of this appliance, and you have VMware Workstation, you can add more disk space as follows:
- Take a snapshot of your existing VM as a safety precaution.
- Shutdown the VM cleanly.
- Add the new virtual disk in Workstation's VM -> Settings menu.
- Startup the VM.
- Login as root
- Create a partition table on the new disk using fdisk. This is an interactive tool, so you're going to need to answer a few questions.
- choose n for "new partition"
- choose p for "primary"
- type 1 for the partition number
- accept the default start and end options (hit Enter twice)
- choose w to "write the partition table"
- Make a filesystem on the new partition
- Mount the filesystem on a temporary location
- Copy all the /srv contents to the new partition
- Move the old contents out of the way
- Add a line to /etc/fstab to cause your new partition to be mounted at boot
- Reboot
Either use rPath Appliance Agent Web UI or login as root and issue:
shutdown -h now
Choose SCSI for the virtual hardware.
Make it growable to whatever maximum you desire.
fdisk /dev/sdb
mkfs.ext3 /dev/sdb1
mount /dev/sdb1 /mnt
cp -rp /srv/* /mnt
mkdir /srv.old; mv /srv/* /srv.old
Either use echo to append a line, or use vi to edit if you're comfortable with vi
echo '/dev/sdb1 /srv ext3 defaults 1 1' >> /etc/fstab
shutdown -r now
After rebooting, you can confirm that your disk setup now has the new disk on the /srv directory mount point by typing on the command line:
df -h
You should see something like
Filesystem Size Used Avail Use% Mounted on /dev/sda1 512M 256M 256M 50% / none 126M 0 126M 0% /dev/shm /dev/sdb1 7.9G 73M 7.5G 1% /srv
After confirming that the contents have all been copied correctly, you can remove the backup data:
rm -rf /srv.old
