Help - Search - Members - Calendar
Full Version: Swap partition
The Planet Forums > Control Panels > cPanel/WHM
Wenters.com
I ordered a new server 2 weeks ago, and had some trouble with stability.
Yesterday I removed auditd as I've read that CPanel had problems with it.

It hasn't crashed since, but today I noticed that my server has no Swap space/ partition.

In top it says:
CODE
Swap:       0k av,       0k used,       0k free


I checked /etc/fstab, which looks normal:
CODE
/dev/hda3 /       ext3    defaults,usrquota 1 1

/dev/hda1 /boot   ext3    defaults 1 2

none      /dev/pts devpts gid=5,mode=620 0 0

none      /proc   proc    defaults 0 0

none      /dev/shm tmpfs  defaults 0 0

/dev/hda2 swap    swap    defaults 0 0

/dev/fd0   /mnt/floppy auto noauto,owner,kudzu 0 0

/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0

/dev/hdb1 /hdd2 ext3 defaults,usrquota 1 2


/dev/hda2 is mounted as swap and /dev/hda3 is mounted as /

But when I do "fdisk -l /dev/hda" I see this:
CODE
Disk /dev/hda: 80.0 GB, 80000000000 bytes

255 heads, 63 sectors/track, 9726 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes



  Device Boot    Start       End    Blocks   Id  System

/dev/hda1   *         1        13    104391   83  Linux

/dev/hda2            14      9471  75971385   83  Linux

/dev/hda3          9472      9726   2048287+  82  Linux swap


/dev/hda3 is type swap? This doesn't look right to me.
How do I correct this without losing important data on hda3?
Should I make a trouble ticket, or do you guys have other options for me.

Thanks in advance.
rackAID
What do you get from running

df -h

cat /etc/mtab
Wenters.com
df -h returns:
CODE
Filesystem            Size  Used Avail Use% Mounted on

/dev/hda3              72G   28G   40G  42% /

/dev/hda1              99M   15M   80M  16% /boot

none                  501M     0  501M   0% /dev/shm

/dev/hdb1              74G   26G   45G  37% /hdd2


And cat /etc/mtab returns:
CODE
/dev/hda3 / ext3 rw,usrquota 0 0

none /proc proc rw 0 0

none /dev/pts devpts rw,gid=5,mode=620 0 0

usbdevfs /proc/bus/usb usbdevfs rw 0 0

/dev/hda1 /boot ext3 rw 0 0

none /dev/shm tmpfs rw 0 0

/dev/hdb1 /hdd2 ext3 rw,usrquota 0 0


in /var/log/boot.log it states:
CODE
swapon: swapon: /dev/hda2: Device or resource busy


I hope you can help me.
Wenters.com
The server crashed again this morning, so the removal of auditd didn't solve the problem.

Does anyone have tips on how to correct the partitions?
Yivit
That sure looks like there's some kind of problem with the image to me, with the conflicting reports from fdisk and df. If it were my server, I'd get an off-server backup done ASAP and get a restore.
theuruguayan
i just see a problem here, in /etc/fstab hda2 is swap. and in your partition definitions(fdisk) swap is hda3.. that dosent looks right to me..
rackAID
Generally fdisk is correct on these issues.

Looks like your drive was not parititoned properly.


/dev/hda3 9472 9726 2048287+ 82 Linux swap

Is listed as linux swap but is mounted as /

My advise is to make a backup and then restore. You could try to fix /dev/hda3 but it may fail, so best to have a backup.
xerophyte
1) Someone wrongly partition the disk and made the /dev/hda3 as 82(linux swap), You can put an ext3 filesystem on a partition that's marked with type 82 (Linux swap) in fdisk.

2) I don't think your server crash because of that, possible reasons could be

1) Since you dont have swap space, check the memory, because when the server run out of memory it crashes

11) Some time the stock redhat kernel wich RHEL has some problem it crashed on random time, please rebuild your kernel, mostly that will fix.

hope that helps,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.