LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Adding more swap made system hangs (https://www.linuxquestions.org/questions/linux-general-1/adding-more-swap-made-system-hangs-501605/)

ivanatora 11-14-2006 04:34 PM

Adding new hard drive made system hangs
 
See below for new information of that case
I just bought newer and bigger hard drive, and I decided to use part of it as a bigger swap. My memory now is 192MB and my old swap partition was 135MB. I made 470MB partition on the new hdd, and wrote into /etc/fstab:
/dev/hdb8 swap swap defaults 0 0
Additionaly I turned it on via swapon /dev/hdb8.
This partition is formated with mkswap /dev/hdb8.

After boot I got a message the swap is working:
Adding 136512k swap on /dev/hda5. Priority:-1 extents:1
Adding 465848k swap on /dev/hdb8. Priority:-2 extents:1

The problem is that when it is time to write in that new swap, the system hangs. It is OK when writing to the old swap.

Currently I have disabled this extra swap, but 130MB isn't enough sometimes. I want to use my other 470MB partition, too.
Do I have to turn off my old swap, and go only with the bigger partition?

NEW INFORMATION
It's not of the swap space - it is from the hard itself. Windows XP installed on that hard hangs too. Linux hangs too.
By 'hangs' I mean that the computer stops responding, picture freezes and no input is taken from kbd/mouse. I don't know if network daemons work. I can't see anything suspicious in /var/log/messages or syslog.
That ocurse after minutes of medium/heavy load. If I let torrents downloading - nothing happens for the whole night. Wathcing movie, or playing Half Life 1 made hang after 10-15 minutes of watch/play. Working on Linux (web, skype, samba, apache) made a hang after 1-2 hours.
It seems like a bus overflow error? S.M.A.R.T. values of the new hdd are OK - it is working. My system is pretty old (66Mhz FSB, ATA(33), BIOS updated in order to detect the bigger drive) - if that is important for this.
I copied a movie on my older hard, and disconnected the new one. Movie is watching OK.
I'm stuck now. Any ideas?

P.S. Current setup of IDE cables:
15GB Quantum (the old hdd) - IDE1 master - hda
120GB Seagate (the new one) - IDE1 slave - hdb
CD-RW Samsung - IDE2 slave - hdd

P.S. I'm trying to boot with new hard's power off, BUT its IDE cable connected (it shouldn't work in that way?). In that case I got DMA related errors on hda (the other hard):
Code:

hda: DMA timeout retry
hda: status error .... badcrc? seekdrive complete? don't remember exactly
.
.
.
hda: drive not ready for command

If I disconnect the IDE cable, I get no errors for hda.

gilead 11-14-2006 05:56 PM

Having more than swap partition is not a problem. When you created the partition (using fdisk?) did you set the partition type to Linux swap (type 82)?

ivanatora 11-15-2006 12:37 AM

Yes it is:
Code:

fdisk -l /dev/hdb

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1              1        1275    10241406    7  HPFS/NTFS
/dev/hdb2            1276      14592  106968802+  f  W95 Ext'd (LBA)
/dev/hdb5            1276        8924    61440561    7  HPFS/NTFS
/dev/hdb6            8925      11474    20482843+  b  W95 FAT32
/dev/hdb7          11475      14534    24579418+  83  Linux
/dev/hdb8          14535      14592      465853+  82  Linux swap


syg00 11-15-2006 01:15 AM

I wonder if you have a mix of old and new style of swap format.
Pat used to use the old style. Try the following, and compare the eyecatcher at the end.
Code:

dd if=/dev/hda5 count=1 skip=7
dd if=/dev/hdb8 count=1 skip=7

All modern kernel will work with SWAPSPACE2.

ivanatora 11-16-2006 08:47 AM

What do you mean by old and new style of swap?

[edit]
Code:

# dd if=/dev/hda5 count=1 skip=7                 
SWAPSPACE21+0 records in
1+0 records out
# dd if=/dev/hdb8 count=1 skip=7                 
SWAPSPACE21+0 records in
1+0 records out

I still wonder what is old and new style..

ivanatora 11-22-2006 03:23 PM

Newer information on that case is posted in the first post.
That hang problem really drives me crazy...

syg00 11-22-2006 03:50 PM

Can't help with the hardware - as for the different swap implementations, have a look at the manpage for mkswap.


All times are GMT -5. The time now is 06:06 PM.