• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

RedHat 9: Swap not mounting

Hey!

I have a RedHat 9 machine (Intel) and everything seems to funcion fine, except the swap partition is not mounting which is slowing the machine way down.  I am wondering if it is because everything in fstab is mounting with "LABEL"?  If so, what do I need to correct?

Thanks!
M

# swapon -s
Filename                        Type            Size    Used    Priority
(nothing listed here)

# swapon -a
swapon: /dev/hda2: Invalid argument

#cat /etc/fstab
LABEL=/               /                       ext3     defaults        1 1
LABEL=/boot        /boot                 ext3     defaults        1 2
none                    /dev/pts             devpts  gid=5,mode=620  0 0
LABEL=/home      /home                ext3     defaults        1 2
none                    /proc                  proc     defaults        0 0
none                    /dev/shm            tmpfs   defaults        0 0
/dev/hda2            swap                   swap   defaults        0 0


0
Mike R.
Asked:
Mike R.
2 Solutions
 
ravenplCommented:
if the /dev/hda2 is really swap (verify it with: fdisk -l /dev/hda)
then propably swap got corrupted and needs to be rebuild: mkswap /dev/hda2
0
 
NelliosCommented:
Your fstab seems good to me, so I guess that ravenpl is right. You need to format your swap.
If that doesnt work, I would do an fdisk to delete and create the swap partition from scratch (luckily it is easy to be done in your case)
0
 
Mike R.Author Commented:
The mkswap /dev/hda2 worked.

Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now