LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2011, 03:00 AM   #1
dhranraj.chilla
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
Red Hat Enterprise Linux Server release 5.5 (Tikanga) - swap


We have installed "Red hat Enterprise Linux 5.5" and while installation we have choosen "create custom layout" partition and created the blow partition:

Filesystem Size Used Avail Use% Mounted on
/dev/sda7 768M 558M 171M 77% /
/dev/sda8 105G 56G 44G 57% /u01
/dev/sda6 3.8G 161M 3.5G 5% /var
/dev/sda5 4.8G 3.3G 1.3G 72% /usr
/dev/sda3 5.7G 696M 4.7G 13% /tmp
/dev/sda2 12G 158M 11G 2% /swap
/dev/sda1 965M 24M 892M 3% /boot

Installation has been successfully completed.

But while checking the swap space in the system after installtion it showing nothing

# cat /proc/swaps

But we have created the 12GB /swap file

Please help me to active this swap space in the system.
 
Old 08-23-2011, 03:09 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,376

Rep: Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039
Interesting. Let's see the output from these (parted may need root on RHEL)
Code:
cat /etc/fstab
parted -l
 
Old 08-23-2011, 03:11 AM   #3
dhranraj.chilla
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
[root@nfs-prod-db ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/u01 /u01 ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/swap /swap ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
192.168.1.144:/NFSPRODDB1 /u02 nfs defaults 0 0
[root@nfs-prod-db ~]# parted -l

Model: IBM ServeRAID-MR10k (scsi)
Disk /dev/sda: 146GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 1045MB 1045MB primary ext3 boot
2 1045MB 13.6GB 12.6GB primary ext3
3 13.6GB 19.9GB 6284MB primary ext3
4 19.9GB 146GB 126GB extended
5 19.9GB 25.1GB 5239MB logical ext3
6 25.1GB 29.3GB 4187MB logical ext3
7 29.3GB 30.2GB 831MB logical ext3
8 30.2GB 146GB 116GB logical ext3


Error: Unable to open /dev/md0 - unrecognised disk label.

[root@nfs-prod-db ~]#
 
Old 08-23-2011, 04:30 AM   #4
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 262

Rep: Reputation: 59
Note
Code:
 LABEL=/swap /swap ext3 defaults 1 2
It looks as if your /swap partition is formatted as ext3 rather than swap.

For example, from my /etc/fstab
Code:
/dev/sdc2               swap                    swap    defaults        0 0
So, I think you want to take that swap partition, and reformat it as swap. (You should be able to use gparted for that without taking the machine offline).

Last edited by scottro11; 08-23-2011 at 04:31 AM.
 
Old 08-23-2011, 04:40 AM   #5
dhranraj.chilla
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Great and thanks you...
this is new machine installations and could you pleas help the steps how to reformat it as swap? Please help me. Thanks
 
Old 08-23-2011, 05:43 AM   #6
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 262

Rep: Reputation: 59
As, judging from your post, you seem a bit unfamiliar with partitioning, I would recommend you install gparted. Using that, you can then select partition /sda2 and choose to reformat it as swap. After that, I think it should work. To be honest, I haven't done this in awhile, so there may be additional steps that I'm overlooking. (Also, I'm not really familiar with the GUI tools--I just recommend them because they should be easier for you.)

After doing that, you might want to run


mkswap /dev/sda2

swapon /dev/sda2


Just be very sure that you haven't accidentally put anything in /dev/sda2 because this will wipe out anything in it.
 
Old 08-23-2011, 08:11 AM   #7
dhranraj.chilla
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you so much for your quick help and appreicate you... Thanks
 
Old 08-23-2011, 08:30 AM   #8
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 262

Rep: Reputation: 59
You're quite welcome. Also, you might want to first unmount /dev/sda2, to avoid any problems.


umount /dev/sda2


before running gparted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How To setup remote access server on Red Hat Enterprise Linux Server release 5.1 bagra Linux - Newbie 5 10-19-2011 08:04 PM
[SOLVED] want to download vsftpd for Red Hat Enterprise Linux Server release 5.1 (Tikanga) rupea Linux - Newbie 5 06-08-2011 10:23 AM
setup email server - Red Hat Enterprise Linux AS release 4 (Nahant Update 8) yentha.valla Linux - Newbie 1 09-27-2010 01:38 AM
Red Hat Enterprise Linux Server release 5.3 (Tikanga) htb.support Linux - Newbie 3 08-25-2010 03:05 PM
External HDD on Red Hat Enterprise Linux Server release 5.3 issue mdmazaza Linux - Newbie 7 04-09-2009 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration