[nycbug-talk] drives swapped around - bad superblock
Judd Maltin
nycbug at maltin.org
Fri Aug 31 12:31:24 EDT 2007
Hi Folks,
I come, hat in hand, trying to fix a messed up FreeBSD system. I cut my
Unix teeth on FreeBSD 2.2.5. I see a few things have changed since
then. Now more /dev/wd0. :)
I'm running:
FreeBSD 6.1-RELEASE-p16 FreeBSD 6.1-RELEASE-p16 #0: Mon Apr 30 10:44:59
PDT 2007
My disks started to die, or get messed up or something, so my hosting
facility put in a new drive, put their typical root partition image on
it, and now I have this:
# mount
/dev/ad7s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad4s1a on /mnt/ad4s1a (ufs, local, soft-updates)
/dev/ad6s1c on /mnt/ad6s1c (ufs, local, soft-updates)
That's all fine and dandy, but dmesg shows me I have more goodies:
...snip..
ad4: 476940MB <Seagate ST3500630AS 3.AAC> at ata2-master SATA150
ad5: 715404MB <Seagate ST3750640AS 3.AAD> at ata2-slave SATA150
ad6: 715404MB <Seagate ST3750640AS 3.AAD> at ata3-master SATA150
ad7: 476940MB <Seagate ST3500630AS 3.AAK> at ata3-slave SATA150
And so I checked up on them with bsdlabel:
# bsdlabel ad4
bsdlabel: /dev/ad4: no valid label found
# bsdlabel ad4s1
# /dev/ad4s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 155877293 4194304 4.2BSD 0 0 0
b: 4194304 0 swap
c: 160071597 0 unused 0 0 # "raw" part,
don't edit
# bsdlabel ad5s1
# /dev/ad5s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 1465144002 0 unused 2048 16384 # "raw" part,
don't edit
# bsdlabel ad6s1
# /dev/ad6s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 1465144002 0 unused 2048 16384 # "raw" part,
don't edit
# bsdlabel ad7s1
# /dev/ad7s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 972565697 0 4.2BSD 2048 16384 28512
b: 4194304 972565697 swap
c: 976760001 0 unused 0 0 # "raw" part,
don't edit
I find it very interesting that I can mount /dev/ad6s1c just fine, that
/dev/ad5s1c also mounts just fine.. but not when I reboot. I get bad
superblocks.
So, I've been a Linux guy for some time, so I try to fsck -t 4.2bsd
/dev/ad5s1 (guessing at the type from the above):
# fsck -t 4.2bsd /dev/ad5s1c
** /dev/ad5s1c
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST
ALTERNATE
/dev/ad5s1c: NOT LABELED AS A BSD FILE SYSTEM (unused)
That partition holds all of our backups for the past 6 months. I can't
lose it. Oh, and it's in California.
Uh-oh. This is where I stop. I need a FreeBSD superhero at this point.
I need to perform a little surgery here on this disk, slice and
partition, and I don't want to mess up.
Help?
More information about the talk
mailing list