- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Increase Swap
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 10:37 PM
10-09-2003 10:37 PM
How can I increase Swap area in a Linux?
I don´t know the commands to do it and the steps.
free -k
total used free
Swap: 4194192 317388 3876804
sfdisk -s
total: 35561280 blocks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 10:56 PM
10-09-2003 10:56 PM
Re: Increase Swap
#fdisk -l
this will show you your partition on of the is a swap parttion.
If you want to increase this it means re partioning your disk ... that is if there is some space left to partition/use.
If you need more swap for some reason you can always use swap to a file read man swapon
swapon -s
will tell you what swap you are using
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 10:59 PM
10-09-2003 10:59 PM
SolutionDEVICE SWAP
using fdisk, make a partition and give it an id of Linux Swap (82).
run mkswap /dev/hdaX where X is your partition number
run "swapon -p X" where X is a priority between 0 and 32767 (low number are higher priorirty) though you can leave this step off if you want it to have the same priority as your existing swap
run "swapon -a"
edit /etc/fstab and pretty much copy the exisiting entry for swap but changing the device.
FILE SWAP
Choose a place to put your file swap
run "dd if=/dev/zero of=/swapfile bs=1024 count=XXXX" where XXXX is the size of the swapfil in Kilobytes
"mkswap /swapfile"
"swapon -p X" if you want ot set priority X
Edit /etc/fstab as above.
I think that's everything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 11:22 PM
10-09-2003 11:22 PM
Re: Increase Swap
Thanks for your help.
Ok,,the swap space has been increased, but doing a:
fdisk -l /dev/cciss/c0d0
I can´t see the new swap partition.
Thanks
Harstad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 11:29 PM
10-09-2003 11:29 PM
Re: Increase Swap
should show that
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 11:42 PM
10-09-2003 11:42 PM
Re: Increase Swap
It´s Ok,,
swapon -s
Filename Type Size Used Priority
/dev/cciss/c0d0p7 partition 2097096 0 -1
/dev/cciss/c0d0p10 partition 2097096 0 -2
/dev/cciss/c0d0p11 partition 2097136 0 -3
but executing:
#fdisk -l /dev/cciss/c0d0
/dev/cciss/c0d0p11 550 1320 3145664 83 Linux
is strange..
Thank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 12:02 AM
10-10-2003 12:02 AM
Re: Increase Swap
Yes that is strange !
I dont know the why ??
what does the sfdisk -l see
there should be an entry for swap file in there
or else something is wrong !
what does the command fdisk -l /dev/cciss not /dev/cciss/c0d0p11 show ?
Sorry I do not have cciss devices so can not check myself
J-P ( 0 points for this answer pls, more questions then answers really)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 12:39 AM
10-10-2003 12:39 AM
Re: Increase Swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:54 AM
10-10-2003 01:54 AM
Re: Increase Swap
Answering your questions:
fdisk -l /dev/cciss not /dev/cciss/c0d0p11
Disk /dev/cciss/c0d0p11: 255 heads, 32 sectors, 770 cylinders
Units = cylinders of 8160 * 512 bytes
Disk /dev/cciss/c0d0p11 doesn't contain a valid partition table
sfdisk -l
nting from 0
Device Boot Start End #cyls #blocks Id System
/dev/cciss/c0d0p1 * 9 33 25 102000 83 Linux
/dev/cciss/c0d0p2 34 162 129 526320 83 Linux
/dev/cciss/c0d0p3 0+ 8 9- 36704 12 Compaq diagnostics
/dev/cciss/c0d0p4 163 8715 8553 34896240 5 Extended
/dev/cciss/c0d0p5 163+ 291 129- 526304 83 Linux
/dev/cciss/c0d0p6 292+ 548 257- 1048544 83 Linux
/dev/cciss/c0d0p7 1320+ 1833 514- 2097104 82 Linux swap
/dev/cciss/c0d0p8 1834+ 2347 514- 2097104 83 Linux
/dev/cciss/c0d0p9 2348+ 2861 514- 2097104 83 Linux
/dev/cciss/c0d0p10 2862+ 3375 514- 2097104 82 Linux swap
/dev/cciss/c0d0p11 549+ 1319 771- 3145664 83 Linux
/dev/cciss/c0d0p12 3376+ 8715 5340- 21787184 83 Linux
# ^H
ksh:: not found
# fdisk -l /dev/cciss not /dev/cciss/c0d0p11
Disk /dev/cciss/c0d0p11: 255 heads, 32 sectors, 770 cylinders
Units = cylinders of 8160 * 512 bytes
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 02:16 AM
10-10-2003 02:16 AM
Re: Increase Swap
for ex: your patition 07 is a valid swap partition
dev/cciss/c0d0p7 1320+ 1833 514- 2097104 82 Linux swap
If c0d0p11 is the "new" swap partition you wanted to use and is not used/mounted on your file system as a linux valid mount point then
do
#swapoff dev/cciss/c0d0p11
After that follow Mark Grant advised and change file type using fdisk t option on partition, when this is written to disk do as you did previously so to use it.
Then check agains fdisk -l
Keep us informed of progress.
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 02:34 AM
10-10-2003 02:34 AM
Re: Increase Swap
I will keep you informed.
Thanks for your hekp.