Archive for May 30th, 2007

I’ve just had a situation: I’ve defined a new Linux virtual machine with 512MB swap space and Oracle requirement was 1GB.

What do you need to do in order to increase the swap:
- shut down the virtual machine
- Add a new hard disk (either IDE or SCSI)
- start the virtual machine and wait to that hard disk to be discovered
- run:

#fdisk /dev/sdX
or
#fdisk /dev/hdX

where X is a-z, ussualy b. You will use hdX if your drive is IDE and sdX if your drive is SCSI
- click p to see the existing partitions
- if this is your new virtual hard drive, click n to create a new patition
- click t to change the partition type to “Linux Swap” (it is 82)
- click w to write changes
- run:

#mkswap /dev/sdX1
or
#mkswap /dev/hdX1

- change the swap location with the following command:

swapon /dev/sdX1
or
swapon /dev/hdX1

good luck

Comments 1 Comment »