Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 1997 12:52:57 +0930 (CST)
From:      Kris Kennaway <kkenn@bns.com.au>
To:        questions@freebsd.org (FreeBSD Questions)
Subject:   Corrupted swapspace
Message-ID:  <199704060322.MAA22496@topdown.bns.com.au>

next in thread | raw e-mail | index | archive | help
I've just been playing around with my hard disk partitions (resized the 
primary DOS partition on my first hard drive using partition magic and 
changed the cluster size), which is the only thing I can think of that 
was actually changed in the meantime. I added another FreeBSD partition 
on a second drive and moved around some directories, but I can't think 
how that could have caused the problem below:

The FreeBSD swap space on my first hard drive seems to be corrupt: this 
is what disklabel -r /wd0s2a makes of it:

[morden] 11:55 ~ disklabel -r /dev/wd0s2a
# /dev/wd0s2a:
type: ESDI
disk: wd0s2
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 64
sectors/cylinder: 4032
cylinders: 354
sectors/unit: 1427328
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    65536        0    4.2BSD        0     0     0   # (Cyl.    0 - 16*)
  b:    88256    65536      swap                        # (Cyl.   16*- 38*)
  c:  1427328        0    unused        0     0         # (Cyl.    0 - 353)
  e:    61440   153792    4.2BSD        0     0     0   # (Cyl.   38*- 53*)
  f:  1212096   215232    4.2BSD        0     0     0   # (Cyl.   53*- 353*)

[morden] 11:57 ~ disklabel -r /dev/wd0s2b
Bad pack magic number (label is damaged, or pack is unlabeled)

By contrast, disklabel -r on my other swap partition on the second hard 
drive correctly gives me the disklabel summary for the drive.

By rights, I should have 88M total swap with these two partitions, but 
top was reporting it as 133M total. Presumably as a consequence, my 
processes kept on dying with signal 10 and 11 (I'm assuming this is what 
hapened when they tried to enter the phantom swap-space). I've removed 
the first swapon entry from fstab and it seems to be working fine so far.

My questions are these:

a) How did this happen?

b) What can I do to fix it?

Many thanks,

Kris


|| ,-./\ Kris Kennaway || "Dead. Dead. Dead. Dead. Dead. Dead. Dead. Dead.   ||
||/     \              ||  Dead. Dead. Dead. How can you apologize to them?" ||
||\_,-*_/ kkenn@       || "I..can't" "Then how can I forgive?"               ||
||     v    bns.com.au || - G'Kar and Vir, "Comes the Inquisitor", Babylon 5 ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704060322.MAA22496>