Results 1 to 2 of 2
All:
I am trying to increase the size of the Swap space on an existing system in order to perform Oracle Upgrade from 10gR2 to 11gR1. But due to lack ...
- 02-28-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 1
Swap space - how to increase size
All:
I am trying to increase the size of the Swap space on an existing system in order to perform Oracle Upgrade from 10gR2 to 11gR1. But due to lack of space, unable to perform it.
Current Swap space:
/etc/security> grep SwapTotal /proc/meminfo
SwapTotal: 2031608 kB
Total memory:
/etc/security> grep MemTotal /proc/meminfo
MemTotal: 7914496 kB
/etc/security> more /proc/swaps
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 2031608 121640 -1
Requirement: Need to increase the swap space to 8 GB (same as physical memory)
I tried following procedure to increase it:
swapoff -v /dev/VolgGroup00/LogVol01 # Disable active swap file
lvm lvresize /dev/Volgroup00/LogVol01 -L 8G # Add the swap space
mkswap /dev/VolGroup00/LogVol01 # Format it
swapon –va # Enable the extended volume
grep SwapTotal /proc/meminfo # check the swap space
It failed with following error message:
/tmp> lvm lvresize /dev/mapper/VolGroup00-LogVol01 -L 8G
/dev/hda: open failed: No medium found
Extending logical volume LogVol01 to 8.00 GB
Insufficient free space: 194 extents needed, but only 0 available
I checked the logical and physical volume but all space is allocated.
/tmp> lvdisplay
/dev/hda: open failed: No medium found
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID ARhpeP-c4Iv-bFka-emjH-EOCy-ZUNz-pXGDlS
LV Write Access read/write
LV Status available
# open 1
LV Size 268.91 GB
Current LE 8605
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID I95JBG-2UnM-20qu-d395-ofGH-9HUc-d9jawA
LV Write Access read/write
LV Status available
# open 0
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
/tmp> pvdisplay
/dev/hda: open failed: No medium found
--- Physical volume ---
PV Name /dev/sda3
VG Name VolGroup00
PV Size 270.86 GB / not usable 12.58 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 8667
Free PE 0
Allocated PE 8667
PV UUID vOV0c6-Y0dK-ZcQU-rMvU-4XQE-b2xW-XLsl1r
-bash-3.2$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
273135752 98169080 160868240 38% /
/dev/sda2 101105 29187 66697 31% /boot
tmpfs 3957240 0 3957240 0% /dev/shm
none 3957152 104 3957048 1% /var/lib/xenstored
Question: Can I resize the /dev/VolGroup00/LogVol00 Logical Volume to free up the space and use it for the other existing logical volume (/dev/VolGroup00/LogVol01) or create new Logical volume.
Please let me know how to resolve it in order to add additional swap space.
Thanking you in advance.
Ramesh Vasudevan
- 02-28-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
See the manpages for mkswap and swapon. The mkswap command allows you to create a swap file in normal user space, and the swapon command allows you to enable that as swap space. It will be used in addition to your usual swap partition, etc. That means you can expand your available virtual memory swap space as needed, without restarting your system.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote