- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to extend /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
05-29-2001 12:32 AM
05-29-2001 12:32 AM
How to extend /swap
i have to extend my /swap area...there are 3 gb of LVM unused..
how can i do??
- Tags:
- swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 12:43 AM
05-29-2001 12:43 AM
Re: How to extend /swap
Extending your primary swap area isnt going to be easy, as it needs to be contiguous and in the first 2GB of your disk. This will be a long and tricky job.
Much easier to simply add another swap area, you can do this online without a reboot (first option above will need a reboot).
Simply create a new logical volume, to whatever size you need. Then add it to the /etc/fstab file;
/dev/vg00/lvolX / swap defaults 0 0
Then issue the command swapon -a
and your done. swapinfo -mt command will now show the new swap area activated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 12:43 AM
05-29-2001 12:43 AM
Re: How to extend /swap
#lvcreate -L xxx /dev/vg00
insert in /etc/fstab:
/dev/vg00/lvolxx ... swap pri=2 0 0
#swapon -a
#swapinfo -mt (verify)
Try also with SAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 01:18 AM
05-29-2001 01:18 AM
Re: How to extend /swap
You should definittely follow Stefan's advice.
But there is something I would like to add.
You can already have, beside primary swap, some extra swap in for example /dev/vg01/swaplv. If you want to extend this Lv you can use lvextend command, and then you must reboot your system.
Although it is much better to have a number of smaller swap areas instead of one huge swap area - performance reasons.
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 01:36 AM
05-29-2001 01:36 AM
Re: How to extend /swap
i'm not very expert in this..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 01:58 AM
05-29-2001 01:58 AM
Re: How to extend /swap
insert in /etc/fstab:
/dev/vg00/lvolxx ... swap pri=2 0 0
#swapon -a (enabled secondary sap)
#swapinfo -mt (verify if your swap is enabled)
Or with SAM select disk and file system -> swap
Eran Moran not cut and paste my reply please !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 02:38 AM
05-29-2001 02:38 AM
Re: How to extend /swap
you are rigth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 02:40 AM
05-29-2001 02:40 AM
Re: How to extend /swap
lvcreate -L 1024 dev/vg00
swapon -a
and i added it in the /etc/fstab
/dev/vg00/lvol5 / swap defaults 0 0
but when i open sam - disk and file systems -
swap i have :
/dev/vg00/lvol2 device 1 4096 of 4096 now/on boot
/dev/vg00/lvol5 device 0 of 0 on boot
Is it ok or i have to do something else??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 02:42 AM
05-29-2001 02:42 AM
Re: How to extend /swap
I would go for new swap space on another VG (or at least another disk within VG00) and give it the SAME priority (again for performance reasons).
Vincenzo: no copy & paste ?? Where did you get all your knowledge from?? you also got it (=copied it) from someone else, that's how you learn something! Remember: plagiarism is maybe the greatest compliment one can get.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 03:27 AM
05-29-2001 03:27 AM
Re: How to extend /swap
You can add swap using the following commands:
1. # lvcreate -n lv... /dev/vg00
2. #lvextend -L
NB: lv... stand for a name to logical volume.
c1t1d0 stand for the path name to the active disk.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 04:38 AM
05-29-2001 04:38 AM
Re: How to extend /swap
one what is the cut and paste.
Tarek see also http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xc4b4e7613948d5118fef0090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 04:45 AM
05-29-2001 04:45 AM
Re: How to extend /swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 05:44 AM
05-29-2001 05:44 AM
Re: How to extend /swap
but i don't know if it's working or not....
nobody has answered the reply i made before...
now i have lvol5 associated with swap, but under swap (disks and FS) i have for the new swap:
Device File/Mount Directory: /dev/vgoo/lvol5
Type: Device
Current Priority:
Mbytes Available: 0 of 0
Enabled: on boot
In the /etc/fstab i put:
/dev/vg00/lvol5 / swap defaults 0 0
If i do swapinfo -mt i have:
TYPE MB AVAIL MB USED MB FREE PCT USED START/LIMIT MB RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
reserve - 62 -62
memory 1543 29 1514 2%
total 5639 91 5548 2% - 0 -
Is it working or not??
Please help...and why under Sam - disk and FS - swap i have 0 of 0 available??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2001 06:29 AM
05-29-2001 06:29 AM
Re: How to extend /swap
/usr/sbin/sam
go to disks->swap->actions->create
If you want better performance, set both priorities to the same number! If you have 2 swap chunks of 1GB each, and the same number, the system uses syncronous read/write to both...otherwise, the lowest number is filled first, then the second lowest number, etc....
As for people cutting and pasting, I see people here ranked as wizards that do exactly that, and paste URL's all day long.......Knowlege? not, smart enough to find knowlege? maybe!
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2001 01:01 AM
05-30-2001 01:01 AM
Re: How to extend /swap
lvcreate -L 1024 /dev/vg00
then i added in the /etc/fstab:
/dev/vg00/lvol5 / swap defaults 0 0
then
swapon -a and i have this message:
Enabling device paging on /dev/vg00/lvol5
swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to add paging on device /dev/vg00/lvol5.
What should i do? Do i have to reboot the system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2001 01:17 AM
05-30-2001 01:17 AM
Re: How to extend /swap
But on the hand if you add swap space then swapchunks are added as much as possible, if you can live with the current swap space you can delay your reboot til the moment which suits you best. (in other words if maxswapchunks is just 10 swapchunks too low, there's little benefit in booting immediately)
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2001 01:24 AM
05-30-2001 01:24 AM
Re: How to extend /swap
i have rebooted the system but i don't think the new swap area is enabled.
It gives me the same error message of maxswapchunks that needs to be increased. Where can i increse it?? It's two days i'm trying all things that were written in this forum, but no one solved my problem.
What can i do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2001 01:42 AM
05-30-2001 01:42 AM
Re: How to extend /swap
when you add the swapspace your system tells you how much your maxswapchunks need to be increased. You can change this kernel parameter through SAM (sorry not to have mentionned this explicitely before) and increase it to the number required (and take a nice margin for future expansion).
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2001 04:02 AM
05-30-2001 04:02 AM
Re: How to extend /swap
Firstly, I agree with Stehpan,the best way is to create anew LV for the swap.
Secondly as long as you're new you do'nt ve enough experience so I recommend for you to use a save way to accomplish this task,the best way is to use SAM.
goodluck
Hamdy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2001 11:09 AM
06-05-2001 11:09 AM
Re: How to extend /swap
edit the file and add following line
maxswapchunks 2048
now run these commands
mk_kernel
kmupdate ( if you are running 11.x and above) or copy /stand/build/vmunix_test /stand/vmunix
shutdown the system with -r -y now option