nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Enabling Swap Space - Redhat

This is a discussion on Enabling Swap Space - Redhat within the Linux software forums, part of the Linux Getting Started category; Hi All, i had problem with enabling swap space on " Boot Time ". while my Redhat Linux Booting into ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 09-24-2007, 06:55 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
My distro: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Rep Power: 0
aaru is on a distinguished road
Send a message via Yahoo to aaru Send a message via Skype™ to aaru
Red face Enabling Swap Space - Redhat

Hi All,

i had problem with enabling swap space on "Boot Time".

while my Redhat Linux Booting into run level 3 , then it suddenly got

struck up with swap space enabling. i couldn't find out the reason.

anybody can suggest me how to resolv this issue? The time is takes to enable

swap space is unpredictable.

thanks,

aaru
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-24-2007, 08:34 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,030
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Boot into single user mode and make sure /etc/fstab has correct entries. You can also format swap partition
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 09-24-2007, 09:01 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
My distro: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Rep Power: 0
aaru is on a distinguished road
Send a message via Yahoo to aaru Send a message via Skype™ to aaru
Default

hi nixcraft,

thanks for ur reply.

after this pbm happend, 1st step i did is using "single user" to boot the system.while the time we are entering into single user mode, its easily enable the swap space.means "Enabling Swap Space [ok] ".but, if i am trying to run into multi user mode say runlevel 3, it just hangs up.
i couldn't able to find out the reason. my /etc/fstab file is edited properly.if u need i can paste into this forum.give me any solution for this.b'cz i am trying to find out this answer from past 1 & half year.

thanks,
aaru
Reply With Quote
  #4 (permalink)  
Old 09-25-2007, 06:28 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,030
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Paste your fstab file. Have you tried to reformat swap only partition? Is hard disk free from any errors ?
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #5 (permalink)  
Old 09-25-2007, 07:03 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
My distro: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Rep Power: 0
aaru is on a distinguished road
Send a message via Yahoo to aaru Send a message via Skype™ to aaru
Cool

Hi nixcraft,

thanks for your reply.i didn't format my swap partition.my fstab file is below,

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/mnt/gp1 /mnt/gp1 ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/sda5 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0

thanks,

aaru.


~
Reply With Quote
  #6 (permalink)  
Old 10-12-2007, 10:03 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Just format swap partition using mkswap and turn on swap using swapon command it should work
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #7 (permalink)  
Old 03-20-2008, 02:13 PM
Junior Member
User
 
Join Date: Mar 2008
My distro: Redhat
Posts: 1
Rep Power: 0
sandeepr is on a distinguished road
Exclamation

I got the same problem on compiling new kernel..

its hangs on swap space

i tried to format mkswap -a /dev/hda5

but swapon /dev/hda5 says its busy...

mount shows no swap partition is mounted!!!

bu fstab has SWAP-hda5 entry..

Try to solve the problem asap??


Thanks...
Reply With Quote
  #8 (permalink)  
Old 03-20-2008, 03:52 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
My distro: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Rep Power: 0
aaru is on a distinguished road
Send a message via Yahoo to aaru Send a message via Skype™ to aaru
Cool

Hi Sandeep,

Before formatting swap partition please disable that partition.To do that,

#swapoff /dev/hda5 (your /etc/fstab entry for swap).

To Create new swap partition do the follow,

step1:

Create new partition by using "fdisk".Say here "/dev/hdaX"

step2:
Create Swap signature on that partition.to do that,

#mkswap -v1 /dev/hdaX

step3:

Enable swap partition,

#swapon /dev/hdaX

step4:

Check the status of swap partition.

#swapon -s

Filename Type Size Used Priority
/dev/hdbX partition 1052248 0 -2
__________________
thanks,
aaru
Reply With Quote
  #9 (permalink)  
Old 03-24-2008, 07:18 PM
Member
User
 
Join Date: Mar 2008
My distro: Debian, Slackware, LFS
Posts: 83
Rep Power: 1
Tux-Idiot is on a distinguished road
Lightbulb

create an extra swap partition. these days we got 500 GiB external and 1 TiB internal and max 32 TiB internal hdd. so if you are running mission critical things like database then you need 4x RAM = swap. yeah you may also have extra swap partitions. if you dont use them? disable them. or create a temporary swap space.
http://www.redhat.com/docs/manuals/l...ap-adding.html
man fstab on how to add more than one swap space. besides you got enough space my friend 40-80-120-300 GiB for swap. imagine me working on a 2 GiB USB which is encrypted and NO SWAP. dang! i have to create a file like that from that URL and run it when i am in a machine with incredible low ram and had to borrow some space from hdd where it is normally ntfs or fat.

if muhammad cant go to mountain, bring the mountain to muhammad? hell no, tie muhammad in a bed and carry muhammad to mountain. mountains in these days are heavy than the mountains in those days.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Why Swap=2 x RAM diptanjan Getting started tutorials 5 03-25-2008 02:14 AM
Swap piggy Getting started tutorials 3 07-17-2007 10:44 AM
Enabling Audit logs using psacct ccubed Getting started tutorials 1 06-25-2007 10:07 PM
Difference between Linux Swap partition & Swap file hrishikesh Linux software 9 03-16-2007 03:08 AM
enabling sshd ubuntu rajk Linux software 2 12-24-2005 12:21 AM


All times are GMT +5.5. The time now is 10:36 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36