Extending swap space

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Extending swap space
# 1  
Old 06-02-2015
Extending swap space

I've to install Oracle binaries (I'm oracle DBA) and for that I've extend swap space in my home computer. My situation is like this.

Code:
[root@rac1 ~]# parted -s /dev/sda print free
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 38.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
        32.3kB  1049kB  1016kB           Free Space
 1      1049kB  525MB   524MB   primary  ext4         boot
 2      525MB   21.5GB  20.9GB  primary               lvm
        21.5GB  21.5GB  1370kB           Free Space
 3      21.5GB  24.7GB  3216MB  primary
 4      24.7GB  32.2GB  7518MB  primary
        32.2GB  38.7GB  6445MB           Free Space

[root@rac1 ~]# pvs /dev/sda
  Failed to read physical volume "/dev/sda"
[root@rac1 ~]# pvs
  PV         VG      Fmt  Attr PSize  PFree
  /dev/sda2  vg_rac1 lvm2 a--  19.51g     0
  /dev/sda3  vg_rac1 lvm2 a--   2.99g     0
  /dev/sda4  vg_rac1 lvm2 a--   7.00g 92.00m

[root@rac1 ~]# vgs
  VG      #PV #LV #SN Attr   VSize  VFree
  vg_rac1   3   2   0 wz--n- 29.50g 92.00m
[root@rac1 ~]# pvs
  PV         VG      Fmt  Attr PSize  PFree
  /dev/sda2  vg_rac1 lvm2 a--  19.51g     0
  /dev/sda3  vg_rac1 lvm2 a--   2.99g     0
  /dev/sda4  vg_rac1 lvm2 a--   7.00g 92.00m
[root@rac1 ~]# lvs
  LV      VG      Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root vg_rac1 -wi-ao--- 27.75g
  lv_swap vg_rac1 -wi-ao---  1.66g
[root@rac1 ~]#

As you can see above that 6445MB is free above and I want to take 4 GB out of that to extend the swap space.

I tried this command but failed. Can you suggest please how to extend the space? Please let me know if you need more info.

Code:
[root@rac1 ~]# lvresize /dev/vg_rac1/lv_swap -L +4G
  Extending logical volume lv_swap to 5.66 GiB
  Insufficient free space: 1024 extents needed, but only 23 available

Thanks
# 2  
Old 06-02-2015
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Extending swap space

I've to install Oracle binaries (I'm oracle DBA) and for that I've extend swap space in my home computer. My situation is like this. # parted -s /dev/sda print free Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 38.7GB Sector size (logical/physical): 512B/512B Partition Table: msdos ... (8 Replies)
Discussion started by: Mukul Sharma
8 Replies

2. Red Hat

Swap space not getting used

CENT OS 5.8 server running with a huge java application which uses up all my ram (4GB) and requires excess of atleast 2GB.But the swap is not getting used up((8GB) of swap space left unused) leading a wierd error and stopping application to stop working. Any one here dealt with the same kind of... (2 Replies)
Discussion started by: shiek.kaleem
2 Replies

3. Solaris

Swap space

Dear All, I have a swap space of 16G available in Sol 10. I have allocated it as a seperate file system. But when the RAM Is full used , the system gets rebooted and the swap is not being used,. Any reasons for this. Rgds Rj (5 Replies)
Discussion started by: jegaraman
5 Replies

4. Linux

How to reclaim the space which i used to increse the swap space on Xen,

Hi, i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :- 1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 1057 ls -l /root/myswapfile 1058 chmod 600 /root/myswapfile 1059 mkswap /root/myswapfile 1060 swapon /root/myswapfile ... (1 Reply)
Discussion started by: apm
1 Replies

5. Solaris

Swap Space

Could someone please explain how you know how much swap space you have on your system. See below: # swap -s total: 8225048k bytes allocated + 4863488k reserved = 13088536k used, 4008032k available # swap -l swapfile dev swaplo blocks free /dev/dsk/c3t0d0s1 32,25 16... (2 Replies)
Discussion started by: jamba1
2 Replies

6. Linux

swap space

Hi, I want to know how can i free the swap space if it is completely full, 0 mb remaining, (1 Reply)
Discussion started by: manoj.solaris
1 Replies

7. UNIX for Dummies Questions & Answers

Swap space used???

Plz I need to know how much swap mem free and used i have. I'm using Compaq Tru64 UNIX V5.1A (rev 1885) Thanx (1 Reply)
Discussion started by: Lestat
1 Replies

8. AIX

swap space / paging space

how do you get the paging space reduced without rebooting the machine ? the os is aix (2 Replies)
Discussion started by: aaronh
2 Replies

9. UNIX for Dummies Questions & Answers

pageing space vs swap space

Hello, I would like to know if there is any difference between the pageing space and the swap space. Thank you in advance. (1 Reply)
Discussion started by: VeroL
1 Replies

10. UNIX for Dummies Questions & Answers

SWAP SPACE

All, I am using SOLARIS 7. I have formated my hard drive to consist of only 150MB of swap space. This isn't enough considering I am running Oracle. How do I create additional swap space? Please list sources or commands. PS mkswap doesn't work on my machine. ( I have swap and... (5 Replies)
Discussion started by: SmartJuniorUnix
5 Replies
Login or Register to Ask a Question