Operating System - HP-UX
1819901 Members
2433 Online
109607 Solutions
New Discussion юеВ

Re: Bad superblock: Magic number wrong

 
Bakos Gy├╢rgy
Super Advisor

Bad superblock: Magic number wrong

fsck
BAD SUPER BLOCK: MAGIC NUMBER WRONG

How can I repair this error.
Some aplications doesn't work, CDE...
Please help.
32 REPLIES 32
Mark Grant
Honored Contributor

Re: Bad superblock: Magic number wrong

I assume this is a hfs filesystem.

try "fsck -F hfs -b 16 "

You need to use the raw device for the logical volume. I'm not entirely sure what you do if this is a vxfs filesystem as I cant see how a full fsck would work when the superblock is broken and I'm not sure if vxfs maintains alternative superblocks like HFS does.
Never preceed any demonstration with anything more predictive than "watch this"
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Yes it is a HFS
fsck -F hfs -b 16 /dev/vg00/lvol3

Alternate suber block location: 16
fsck: /dev/vg00/lvol3: root file system
continue: y
BAD SUPER BLOCK: MAGIC NUMBER WRONG
USE -b ...

Now what....
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Very interesant:
/etc/mnttab
/dev/vg00/lvol3 / vxfs log 0 1 1070617101

but in
/etc/fstab
/dev/vg00/lvol3 / hfs defaults 0 1


??????????????????????
Robert-Jan Goossens
Honored Contributor

Re: Bad superblock: Magic number wrong

Hi,

# mv /etc/mnttab /etc/mnttab.old
# mount -a
# more /etc/mnttab

Regards,
Robert-Jan
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Had maybe edit this the -b 16 option???

In fact: The problem was that the user can't login in the cde, in prompt yes.
After login in black screen sandhour and again the cde login...
The user said, that he had reseted the computer (There is no reset!!!)
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

There is no mnttab.old, maybe I edit it.
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

shall i edit it
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

vxfs to hfs log to defaults.
Mark Grant
Honored Contributor

Re: Bad superblock: Magic number wrong

Firstly, use the raw device i.e /dev/vg00/rlvol1 not /dev/vg00/lvol1. The number after the -b option is to specify the location of alternate copies of the super block. You should be able to find a list of alternate super blocks in /var/adm/sbtab You should be able to use any of these values for the -b.

I would point out that I have nver managed to get one of the alternative super blocks to actually work but it's worth a try.
Never preceed any demonstration with anything more predictive than "watch this"
Robert-Jan Goossens
Honored Contributor

Re: Bad superblock: Magic number wrong

DO NOT EDIT THE MNTTAB,

recreate it

# mv mnttab mnttab.old
# mount -a

Robert-Jan
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Ok I haven't mnttab.old
Maybe shall I:
cp /etc/mnttab /etc/mnttab.old
edit mnttab.old (vxfs to hfs log to defaults)
mv /etc/mnttab.old /etc/mnttab
??????????
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Mark Grant
Your answer seens to work.
After ............ /rlvol1
No magic number at /rlvol1

but there is the same problem at /rlvol6
and /lvol3
But i only see at sbtab
/rlvol1: super-block backups
Elmar P. Kolkman
Honored Contributor

Re: Bad superblock: Magic number wrong

You say you wanted to change vxfs to hfs for the filesystem in mnttab... Are you really certain the filesystem is hfs, and not by any chance vxfs ???

Because in that case, perhaps fsck determined the wrong filesystem type, which could lead to this problem.
Every problem has at least one solution. Only some solutions are harder to find.
Fabio Ettore
Honored Contributor

Re: Bad superblock: Magic number wrong

Hi Bakos,

Robert and other forum people are right!

# mv /etc/mnttab /etc/mnttab.old
This command just renames the mnttab file.

# mount -a
This command re-mount filesystems in base of /etc/fstab.
After these actions you will see that /etc/mnttab and /etc/fstab should look the same.

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

I have some clone (I think only, I am since a week here) machines and on this machines is lvol3 hfs in mntab and fstab.
But in this problemfull machine is in fstab hfs and in mnttab vxfs
Robert-Jan Goossens
Honored Contributor

Re: Bad superblock: Magic number wrong

Oke,

# fsadm -F hfs /dev/vg00/rlvol3
file system : /dev/vg00/rlvol3
magic number : 95014
feature bits : 1
file system supports : nolargefiles, longfilenames

# fsadm -F vxfs /dev/vg00/rlvol3
fsadm: not a valid vxfs file system

My filesystem is hfs

# cd /etc
# mv mnttab mnttab.rjg
# mount -a

Yoy mnttab wil be recreated witk the mount command.

Robert-Jan
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Ok I have this mv /etc/mnttab understand.
mount -a
...already mounted
at lvol6 that is the tmp : not a hfs file system, but in fstab yes.
On an another machine the mnttab and fstab are vxfs, also maybe the tmp is the problem for CDE.
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

# fsadm -F hfs /dev/vg00/rlvol3
is not a hfs file system


# fsadm -F vxfs /dev/vg00/rlvol3
nolargefiles, longfilenames

And now?...
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Now I have edited in the fstab of lvol6 /tmp hfs to vxfs, it is now mounted.
But the CDE runs still not.(dr_dt no problem)
syslog.log nothing

By fsck lvol3 / BAD superblock
rlvol1 Last mounted on /stand
*******Marking file system clean****
*** File system was modified
vxfs fsck /lvol4-8 is currently mounted
Mark Grant
Honored Contributor

Re: Bad superblock: Magic number wrong

Looks to me like your lvol1 is actually /stand and is hfs. Perhaps you are running 10.20 where I believe this was the only option. The other logical volumes don't have and entry in /etc/sbtab so are probably not hfs. If you are getting the same problems then I think you might need to do

fsck -F vxfs -n /dev/vgXX/lvol6 and then if errors no are reported do

fsck -F vxfs -o full,nolog /dev/vgXX/lvol6. If errors were reported by your first fsck, then do the same thing but without the ",nolog" bit.

Then fix /etc/fstab.
Never preceed any demonstration with anything more predictive than "watch this"
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

Mark, at the moment after fsck is only
lvol3 BAD SUPERBLOCK> MAGIC...

Shall I do your previus message, but with lvol3.
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

fsck -F vxfs -n /dev/vg00/lvol3

au 2 summary incorrect - fix (ynq) n

Shall i try without -n, or that is a bad idea
Mark Grant
Honored Contributor

Re: Bad superblock: Magic number wrong

Bakos,

yes, the "-n" just answers "no" to any question so now you should try

"fsck -F vxfs -o full /dev/vgXX/rlvol3"
Never preceed any demonstration with anything more predictive than "watch this"
Bakos Gy├╢rgy
Super Advisor

Re: Bad superblock: Magic number wrong

answer
vxfs fsck: /dev/vg00/rlvol3 is currently mounted