Possible solution to random crashes

Don Levey lug-TwWeWiF2EGRi+ztankeudA at public.gmane.org
Tue Sep 23 18:32:14 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some may recall that a while ago I had mentioned that my machine seemed
to crash at random times.  There were a number of suspects, all shot
down in turn: video driver, X settings, Thunar file manager.  I have a
new candidate, and so far it seems to fit the problem.

Careful examination of the log files revealed messages such as:

Sep 22 17:38:57 dauphin kernel: Read-error on swap-device (8:16:239638369)
Sep 22 17:38:57 dauphin kernel: ata1.01: error: { IDNF }
Sep 22 17:38:57 dauphin kernel: end_request: I/O error, dev sdb, sector
239638313

Sometimes I can be a little thick, but it looks to me like the partition
I'm using for swap has bad sectors that are interfering with proper
operation.  Sometimes this results in a hard freeze, sometimes in a
reboot, sometimes in a restart of X (as happened yesterday).

When I set up this machine, I set it up as a Windows/Linux dual-boot.  I
can't recall the last time I used the Windows partitions; I think
perhaps 4 years ago.  Clearly I don't need that.  I've got two hard
drives in the machine, /dev/sda is (mostly) for Windows.  I've got the
/boot partition there, and a partition originally intended as a shared
drive between the systems.  My /dev/sdb is where most of Linux lives:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1             59515524  12024396  44419100  22% /
/dev/sdb3             26027260  19614368   5069460  80% /home
/dev/sdb2             30701264  12715872  17985392  42% /export
/dev/sda3              1019240     46484    920144   5% /boot
tmpfs                   777532         0    777532   0% /dev/shm

The swap partition is, as can be seen in the errors above, on /dev/sdb
(sdb5).  The other drive looks like this (from fdisk):

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3060    24579418+   7  HPFS/NTFS
/dev/sda2            3061        4723    13358047+   f  W95 Ext'd (LBA)
/dev/sda3            4724        4854     1052257+  83  Linux
/dev/sda5            3061        4723    13358016    7  HPFS/NTFS

Is it reasonable to resize the sda5 partition down a gig or two and make
a new swap partition in the remainder?  I don't think there's any useful
data on the sda5 partition at the moment.  If this seems doable, the
plan would be to:

1) run 'swapoff'
2) run 'fdisk' to resize /dev/sda5
3) create swap partition on remainder of sda5
4) edit /etc/fstab to change the swap device from sdb5 to sda6
5) run 'swapon -a' to (re)mount the new swap partition
6) resume normal operation

Does this seem reasonable?  While I'm at it I may simply wipe the other
partitions on sda (other than /boot) and reformat for extra storage.

Thanks in advance,
 -Don

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFI2W5p2eQWgVKt880RArs1AKCxonqN5CTNG/33/nEcZALzzgmtvgCgoStm
x29ta4ORP02Hfy7iXNSA+aw=
=Tf22
-----END PGP SIGNATURE-----





More information about the Discuss mailing list