bad partition on good disk won't mount or fsck (bad magic number/superblock)

bad partition on good disk won't mount or fsck (bad magic number/superblock)

Post by Jane Gra » Fri, 25 Feb 2000 04:00:00



I have never had this situation pop up before - but I have a * feeling
that the disk is not the problem (not corrupted).  One of the first things
that happen when you create a metadevice is a "state database replica" is
created on a "small slice" .
This info probably does not move around with the physical disk itself.  I
am not sure where this database replica information is saved either.  The
error message about "filesystem not of this type" refers to /dev/dsk vs.
/dev/md.
Can you put this disk back on the Ultra 60 & make a tape backup of the
partition (info) you want?

> Hello Admins!

> I have a partition I really, really need to get back.  The disk was
> taken out of an Ultra 60 proxy server running Solaris 2.6 full patched
> - when it was taken out the filesystem (/logs), etc. was fine/normal.
> That is it was not taken out because it was bad.  The partition with
> which I am having the problem was the cache directory created with
> newfs options -m 5 and -i 1024 or so (i.e. smaller number for more
> inodes since lots of tiny files).  The disk was taken out and now I
> have it in an Ultra 1, also running 2.6, and when I go to mount or
> fsck this disk is says "filesystem not this type" and/or "BAD MAGIC
> NUMBER/SUPERBLOCK) (sorry the exact error message got cut off when I
> mailed the stuff below to myself).  The filesystem was mounted as a
> Disksuite metadevice but not mirrored.  I have tried mounting it both
> as c0t4d0s4 and a d8 (ufs only device and metadevice) both fail.

> I tried several alternate SUERBLOCK numbers and ALL of them except the
> very last one (as reported by newfs -Nv) failed.  Even that one
> failed, but not before prompting me to fix a bad block.  I then went
> to docs.sun.com and followed their instructions for using format to
> analyze a bad disk - it found no defective blocks.

> I do have one question/problem with format:  there is a manage defects
> list option.  Going in, I select extract BOTH and when I print it
> gives me a big long list.  What am I supposed to do with this info?
> The only thing I can do at this menu is save it to a file, but do I
> need to feed all these blocks to the repair option?  I think not since
> aren't these the blocks the disk itself already knows to be bad and
> skips.

> Anyhow I don't think it is a bad block.  The error says filesystem not
> this type but a format/p/p shows the partition in question to be type
> wm which is the normal ufs type.  I am able to mount other filesystem/
> partitions on this disk so at least part of this disk is ok.  Any
> ideas?  If I have not checked/posted/or tried the right thing, please
> feel free to suggest something else.

> Also if there is a better reference/explanation on using the format
> command (or any other disk salvaging command), please point me to it.

> thanks,

> Adam

> Here is what I tried:
> analyze> config
>         Analyze entire disk? no
>         Starting block number: 1127500 (313/26/59)
>         Ending block number: 12392599 (3451/0/58)
>         Loop continuously? no
>         Number of passes: 1
>         Repair defective blocks? no
>         Stop after first error? no
>         Use random bit patterns? no
>         Number of blocks per transfer: 1 (0/0/1)
>         Verify media after formatting? yes
>         Enable extended messages? no
>         Restore defect list? yes
>         Restore disk label? yes

> analyze> read
> Ready to analyze (won't harm SunOS). This takes a long time,
> but is interruptable with CTRL-C. Continue? y

>         pass 0
>    3451/0/58

> Total of 0 defective blocks repaired.
> analyze> help
> partition> p
> Current partition table (original):
> Total disk cylinders available: 4924 + 2 (reserved cylinders)

> Part      Tag    Flag     Cylinders        Size            Blocks
>   0       root    wm       0 -   51       91.18MB    (52/0/0)
> 186732
>   1        var    wm      52 -  166      201.64MB    (115/0/0)
> 412965
>   2     backup    wm       0 - 4923        8.43GB    (4924/0/0)
> 17682084
>   3       swap    wu     167 -  313      257.75MB    (147/0/0)
> 527877
>   4 unassigned    wm     314 - 3450        5.37GB    (3137/0/0)
> 11264967
>   5 unassigned    wm    4407 - 4549      250.74MB    (143/0/0)
> 513513
>   6        usr    wm    4550 - 4920      650.52MB    (371/0/0)
> 1332261
>   7 unassigned    wm    3451 - 4406        1.64GB    (956/0/0)
> 3432996

> partition>

> Primary label contents:

> Volume name = <        >
> ascii name  = <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
> pcyl        = 4926
> ncyl        = 4924
> acyl        =    2
> nhead       =   27
> nsect       =  133
> Part      Tag    Flag     Cylinders        Size            Blocks
>   0       root    wm       0 -   51       91.18MB    (52/0/0)
> 186732
>   1        var    wm      52 -  166      201.64MB    (115/0/0)
> 412965
>   2     backup    wm       0 - 4923        8.43GB    (4924/0/0)
> 17682084
>   3       swap    wu     167 -  313      257.75MB    (147/0/0)
> 527877
>   4 unassigned    wm     314 - 3450        5.37GB    (3137/0/0)
> 11264967
>   5 unassigned    wm    4407 - 4549      250.74MB    (143/0/0)
> 513513
>   6        usr    wm    4550 - 4920      650.52MB    (371/0/0)
> 1332261
>   7 unassigned    wm    3451 - 4406        1.64GB    (956/0/0)
> 3432996

> format>
> format> current
> Current Disk = c0t4d0
> <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>

> format>
> 11089184, 11146784, 11204384, 11261984,
> gumby% sudo fsck -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> CANNOT READ: BLK 14655776
> gumby% sudo fsck -y -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> CANNOT READ: BLK 14655776
> CONTINUE?  yes

> THE FOLLOWING SECTORS COULD NOT BE READ: 14655776 14655777 14655778
> 14655779 14655780 14655781 14655782 14655783 14655784 14655785
> gumby% sudo fsck -y -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> CANNOT READ: BLK 14655776
> CONTINUE?  yes

> THE FOLLOWING SECTORS COULD NOT BE READ: 14655776 14655777 14655778
> 14655779 14655780 14655781 14655782 14655783 14655784 14655785
> gumby% sudo fsck -y -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> CANNOT READ: BLK 14655776
> CONTINUE?  yes

> THE FOLLOWING SECTORS COULD NOT BE READ: 14655776 14655777 14655778
> 14655779 14655780 14655781 14655782 14655783 14655784 14655785
> gumby% sudo fsck -y -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> post here so everyone can benefit, but to write me:
> a d a m - s a t p a c b e l l d o t n e t

 
 
 

bad partition on good disk won't mount or fsck (bad magic number/superblock)

Post by Oscar Goosen » Sat, 26 Feb 2000 04:00:00



>Jane,

>thanks for your input and perception.  Yes this filesystem did in fact
>have a metadb replica on it (layed on before the FS was created)
 and
>yes the disk itself is probably ok (see below).  Putting the disk back
>in the other system is not currently an option as it is back in
>production.  Is there any way to get the O/S to skip over that metadb
>or retake it into the current metadb pool on the new server?  In fact
>it surprises me that fsck or the O/S (since disksuite loads on boot
>up) aren't "metadb aware" and so skip that first section when
>accessing this filesystem.

Disksuite is add-on software; O/S knows nothing about it.
I agree it would have been easier if Disksuite functionality  was part of
kernel

Quote:> Normally I put metadb replicas on their
>own tiny filesystem

That would have given you the option of mounting the original Solaris
device. You don't have that now.

Quote:> but I needed all slices.
>I would still like to know how to get over/around the stale/bad metadb
>piece to mount this filesystem.

I think you could try to reproduce the steps you did on the Ultra 80 to
create this particular metadevice, probably something like;
1) Create state datebase on this disk;
2) then create Disksuite exactly the way it originally was.
3) mount etc.
Ofcourse you should make backups first of the disk
Oscar Goosens

 
 
 

bad partition on good disk won't mount or fsck (bad magic number/superblock)

Post by Michael Jooste » Sat, 26 Feb 2000 04:00:00


For me, the fsck trouble looks like the * sort of trouble you get if
the label's partitions do not match any more the filesystem info.
This happened once to me when I put a labeled disk in my box and
accidently stepped over format/type/auto and later labeled it. Slice 2
was suddenly a few blocks shorter than before and then hell broke lose.
There is some command (fsinfo ??) to analyse what exactly the superblock
says about the filesystem.

I just have had an install of a E450 with ODS, made by some consultants.
We had here also some trouble with mirrored disk on a mail server, so
this ODS still makes me a little nervous....

Quote:> CANNOT READ: BLK 14655776
> CONTINUE?  yes

> THE FOLLOWING SECTORS COULD NOT BE READ: 14655776 14655777 14655778
> 14655779 14655780 14655781 14655782 14655783 14655784 14655785
> gumby% sudo fsck -y -F ufs -o b=11261984 /dev/rdsk/c0t4d0s4
> Alternate super block location: 11261984.
> ** /dev/rdsk/c0t4d0s4

> CANNOT READ: BLK 14655776
> CONTINUE?  yes

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Michael Joosten   |       Tel.  : (+49) (+)
5251-60-6127                 |
| C-LAB             |       Fax   : (+49) (+)
5251-60-6065                 |
| Fuerstenalle 11   |       E-Mail:

| 33094 Paderborn   |      C-LAB is a cooperation
between                  |
| Germany           |    University Paderborn & SIEMENS
AG                 |

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 
 
 

bad partition on good disk won't mount or fsck (bad magic number/superblock)

Post by Logan Sh » Sat, 26 Feb 2000 04:00:00



Quote:>For me, the fsck trouble looks like the * sort of trouble you get if
>the label's partitions do not match any more the filesystem info.
>This happened once to me when I put a labeled disk in my box and
>accidently stepped over format/type/auto and later labeled it. Slice 2
>was suddenly a few blocks shorter than before and then hell broke lose.
>There is some command (fsinfo ??) to analyse what exactly the superblock
>says about the filesystem.

"fstyp -v" is the command.  fsinfo is also a command, but:

        $ whatis fsinfo
        fsinfo          fsinfo (1)      - X font server information utility
        $

So it's probably not what anybody wants[1].  :-)

  - Logan

[1] Yes, I realize that's ambiguous, but yes I also think font
    servers could be eliminated from the X11 world without too much
    suffering.

 
 
 

1. Bad Superblock -> Bad Magic Number ->Segmentation fault?

Okay.....Slakware 3.0 comes with e2fsck 0.5 (i think)

Installed and everything seemed to work okay including xfree etc.. but
on boot up e2fsck is slow in checking and doesn't seem happy

So I ran e2fsck manually and got "Bad Superblock" error.

Tried the -b8193 switch but no joy.

So tried mkefsck -S to just write the superblock then e2fsck again and
lots of problems (pages of stuff about bad inode's etc)

Ends up with Bad Magic Number.

Re-install (i'm getting good at this bit!)

Then I get e2fsck version 1.04 ( read in dejanews the old one had bugs,
(couldn't find version 1.06 as recommended))

Still not happy with superblock. Try mkefsck -S again. It goes haywire
and reports (eventually)

Segmentation fault.

Ermm.. what does this mean?

I recall I got this on the first install with a few of the packages (I
was using color.gz so they flashed by)

Also tried :
 installing on MBR
 e2fsck -b8193   and other superblock copies
 e2fsck -32

Virus: Just found boot sector virus on one of my floppies could it be
that? Can't remember the name - all it does is copy itself to any disk
in the floppy drive every hour.

If it could be this how can I remove it? I know mcaffee does, but under
windoze!

Any help would be greatly appreciated.

Thanks
--
Lee Morgan

2. Printing graphics on old Epson FX-80?

3. 'bad magic number in superblock' error

4. File dates: please help!

5. Bad magic number / Can't open disk label package / Can't open boot device

6. HELP: Problem with X Windows (won't run 800 x 600 @ 16bpp)

7. Bad magic number with Netscape: won't start

8. LaTeX book?

9. Bad superblock- floppy won't mount...HELP

10. Defrag reports bad magic number in superblock?

11. Bad magic number in superblock!!!

12. e2fs: bad magic number in superblock, help !!

13. BAD MAGIC NUMBER IN SUPERBLOCK