- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Swap file
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-06-2005 02:58 PM
10-06-2005 02:58 PM
I've created this huge swap file for my Itanium server (24GB) and now I read that you were only supposed to create a 2GB swap file. I was wondering if I can create another 2GB swap file out on the SANs and delete the original swap file?? Please help!!
Thank you in advance.
Ian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 05:51 PM
10-06-2005 05:51 PM
SolutionYou can create any number of Swap files as long as there is hard disk space.
Create a new swap file by:
* dd if=/dev/zero of=
* Make a swap file system out of it, 'mkswap
* Add this swap to the kernel by 'swapon
Now subsequent check to the memory (/proc/meminfo) should have this new swap memory also added to it.
Now coming to deleting the old swap file:
You have to unmount the swap file before that can be deleted, 'swapoff
Otherwise simply you can replace this swap-file entry in /etc/fstab with the new swap file (2GB swap file) and reboot the server, next time kernel will use only this new swap file and you can safely remove the old one.
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 12:30 AM
10-07-2005 12:30 AM
Re: Swap file
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=961656
And a swap file is different from a swap partition. You can have both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 04:00 AM
10-07-2005 04:00 AM
Re: Swap file
Again, thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 07:04 AM
10-07-2005 07:04 AM
Re: Swap file
In Tru64 Unix Administration manual, the "recommendation" is to have swap devices locally, not in the SAN. (Will apply to Linux too).
But as swap space is almost never used, and should not be used, I think that won't be a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 01:11 AM
10-10-2005 01:11 AM
Re: Swap file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 04:52 AM
10-11-2005 04:52 AM
Re: Swap file
1. Create the new swap partition
2. Change the priority with the FSTAB
3. Reboot the server
Now, the server should be seeing the new swap partition by running a command "free" - Now, I can safely unmount the old swap partition as my heart desire.
I am correct on these steps??
Thank you you guys for all the help!!
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 07:32 AM
10-11-2005 07:32 AM
Re: Swap file
First, partition the disk using fdisk or parted.
Then, set the partition type to swap.
Then use mkswap device
Activate the swap
swapon device
Edit fstab and add the new swap device.
If you tellme the device name, I can give you a more detailed instructions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 12:47 AM
10-12-2005 12:47 AM
Re: Swap file
What do I do?
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 01:30 AM
10-12-2005 01:30 AM
Re: Swap file
I will give you an example:
You currently have a swap partition right? Let's assume the following:
/dev/sda1 - boot
/dev/sda2 - 24GB swap (current)
/dev/sda3 - /
/dev/sda4 - /var
Create a new temporary swap in the SAN.
Create a new disk in the SAN, present to the host and configure as swap.
Set this new swap are in the fstab and remove the current. Reboot.
The old swap wont be used after reboot, so, do the following:
pvcreate /dev/sda2
vgcreate swapvg /dev/sda2
lvcreate -n swap1lv -L 2048M
lvcreate -n swap2lv -L 2048M
lvcreate -n swap3lv -L 2048M
lvcreate -n swap4lv -L 2048M
and so forth
Then run:
mkswap /dev/swapvg/swap1lv
mkswap /dev/swapvg/swap2lv
mkswap /dev/swapvg/swap3lv
mkswap /dev/swapvg/swap4lv
and so forth
Then edit fstab, remove the temporary swap area created in the san, and add the /dev/swapvg/swap*lv devices as swap devices.
Reboot.
In this way, using your current partition, you can create various partitions (logical volumes) without destroying any data.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 07:46 AM
10-12-2005 07:46 AM