Possible solution to random crashes
Jerry Feldman
gaf-mNDKBlG2WHs at public.gmane.org
Wed Sep 24 07:51:12 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Don't use fdisk alone to resize a Linux partition. To shrink a Linux
partition, you first must shrink the file system, then use fdisk. It is
better to use a tool, sich as gparted or qtparted that will do both.
There is an resize2fs for ext2/3.
One possibility for you is to reformat the swap partition by first
turning swap off with swapoff, then use mkswap on that partition. Did
you my any chance change the size of the swap partition?
But, this also might be an indication of an impending disk failure. In
any case, I would reformat the existing swap partition and see if there
is a recurrence.
On 09/23/2008 06:32 PM, Don Levey wrote:
| 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
- --
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFI2imvRgdDGVN8WEYRAksoAKCTBXhRLRlQ2Pa9DEQhsoPnTavARwCgjuC8
Y+4edXG8VEEAQHVafEzOfVc=
=kPI7
-----END PGP SIGNATURE-----
More information about the Discuss
mailing list