File System Error: BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE


 
Thread Tools Search this Thread
Operating Systems Solaris File System Error: BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE
# 1  
Old 05-13-2015
File System Error: BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE

Hi All,
we are having a file system error in one of our servers. The server failed to boot in usual user mode. Instead boot with single user mode and requesting to run a FSCK manually to repair the corrupted. see the below output.


Code:
Netra T2000, No Keyboard
Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.28.9, 8064 MB memory available, Serial #9dddddddae.
.
 
 
 
 
 
 
Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@1,0:a  File and args:
SunOS Release 5.10 Version Generic_142900-03 64-bit
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: SVR
The / file system (/dev/md/rdsk/d0) is being checked.
 
 
WARNING - Unable to repair the / filesystem. Run fsck
manually (fsck -F ufs /dev/md/rdsk/d0).
 
 
May 12 17:21:42 svc.startd[7]: svc:/system/filesystem/usr:default: Method "/lib/svc/method/fs-usr" failed with exit status 95.
May 12 17:21:42 svc.startd[7]: system/filesystem/usr:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run
 
 
Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
 
 
May 12 17:21:47 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
root@SVR #
root@SVR #
root@SVR # fsck -F ufs /dev/md/rdsk/d0
** /dev/md/rdsk/d0
BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE
 
 
LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS?
 
 
 
 
LOOK FOR ALTERNATE SUPERBLOCKS WITH NEWFS? Y
 
 
FOUND ALTERNATE SUPERBLOCK 32 WITH NEWFS
 
 
USE ALTERNATE SUPERBLOCK? y
 
 
FOUND ALTERNATE SUPERBLOCK AT 32 USING NEWFS
If filesystem was created with manually-specified geometry, using
auto-discovered superblock may result in irrecoverable damage to
filesystem and user data.
 
 
CANCEL FILESYSTEM CHECK? y
 
 
Please verify that the indicated block contains a proper
superblock for the filesystem (see fsdb(1M)).
root@SVR #



When we try to run the fsck it prompts to look for the superblocks using either MKFS or NEWFS, According to the oracle documentation, we need to select it correctly depending on the system. But we do not know from which command the file system is created. so with the warning given, we want get an advise on the best possible way to proceed for the file system repair.

Kindly advise on best possible way to proceed.


Thank You
Buddhike G
# 2  
Old 05-13-2015
You're sounding nervous. Do you have a backup of this filesystem?

You can usually tell where the superblock copies are by using:
# newfs -N <filesystem device>

Then run fsck using an alternative superblock:
# fsck -F ufs -o b=<block number> <filesystem device>

Usually the second superblock copy is at block 32.
# 3  
Old 05-13-2015
Thank You for your reply Smilie

There are no recent backups of the system.

here is my newfs output

Code:
root@SVR # newfs -N /dev/md/rdsk/d0
Warning: 4224 sector(s) in last cylinder unallocated
/dev/md/rdsk/d0:        209727360 sectors in 34136 cylinders of 48 tracks, 128 sectors
        102405.9MB in 2134 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..........................................
super-block backups for last 10 cylinder groups at:
 208799264, 208897696, 208996128, 209094560, 209192992, 209291424, 209389856,
 209488288, 209586720, 209685152
root@SVR #


Among the avilable super-block backups which one will be the best pick ?

Regards,
Buddhike G
# 4  
Old 05-14-2015
I'd always go for 32 first. DON'T use -y switch on fsck and just see how many questions it asks you. If too many eg. 30+ , then abort.

---------- Post updated 14-05-15 at 12:01 PM ---------- Previous update was 13-05-15 at 04:04 PM ----------

You could just put the -n switch on the fsck to prevent it modifying anything. It will then just list how much damage it thinks there is but won't try to fix anything.
# 5  
Old 05-14-2015
Hi hicksd8,

Good to know about the -n switch, So I will run with -n and see it first.

Regards,
Buddhike G
# 6  
Old 10-10-2015
Hi All,

None of the recovery methods work for my issue. So we have done a fresh installation of the system

Thank You all for your suggestions

Regards,
Buddhike G
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Linux bad superblock on /dev/mapper/VolGroup-lv_root

Hi Friends . my linux try to start very slowly after give it this error: mount: wrong fs type, bad option, bad superblock on /dev/mapper/VolGroup-lv_root, missing codepage or helper program, or other error in some cases useful info is found in syslog - try dmesg : tail or so Kernel panic... (3 Replies)
Discussion started by: blackjuan
3 Replies

2. Solaris

Bad magic number error

So we have a new to us v240 server with no OS installed. It has an outdated version of OB and ALOM so before we install the OS we want to update both. We have a DVD with the latest OB patch burned on it. We do the boot cdrom command but receive the Bad Magic Number Error. Does an OS need to... (2 Replies)
Discussion started by: dunkpancakes
2 Replies

3. Filesystems, Disks and Memory

Can't repair super block, bad magic number

Hello all, I have a hard drive that I can't repair. The drive is WD15EARS - Filesystem ext4 ( not 100% sure ) It's used in a Synology DS110j NAS. I try to run fsck -p /dev/sdb on the HD and I get this: Bad magic number in super-block while trying to open /dev/sdb /dev/sdb: The superblock... (4 Replies)
Discussion started by: dallasw1983
4 Replies

4. Solaris

Bad File Number

System Solaris 8 When I open a CONSOLE window the following starts scrolling: "ServiceCommand: :write: Bad FIle Number" This will continue to scroll without stopping. However, you can type while it is scrolling and login into root and even conduct business within the CONSOLE window. The... (1 Reply)
Discussion started by: Kevin1166
1 Replies

5. Filesystems, Disks and Memory

Bad super block: Magic number wrong

Whenever i run, # fsck -F ufs /dev/dsk/c0t0d0s7 The following error prompt out:- ** /dev/dsk/c0t0d0s7 BAD SUPER BLOCK: MAGIC NUMBER WRONG USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; eg. fsck -o b=# where # is the alternate super block. SEE fsck_ufs(1M). ... (3 Replies)
Discussion started by: beginningDBA
3 Replies

6. Filesystems, Disks and Memory

Bad Super Block: Magic Number Wrong

I had a power outage a day ago and when the power came back on my FreeBSD 4.6 webserver had problems. It said it was unable to mount /var and made me start in single user mode and said to run fsck MANUALY. So i did and this is now what i get. www# fsck /dev/ad0s1e ** /dev/ad0s1e BAD SUPER... (4 Replies)
Discussion started by: matthewbane
4 Replies

7. Shell Programming and Scripting

Error Message - ./dsp_svrconn.sh[41]: MBHD1: bad number

Hi Experts, I have a shell script in which I have the following if condition. if then CHLREP=`echo "$DSPLINE MCAUSER" | \ \opt\mqm\bin\runmqsc -e $QMGRNAME | \ "ALTER CHANNEL($CHANNEL) CHLTYPE(SVRCONN) MCAUSER('HAK')"` echo "$CHLREP" fi When I run this... (1 Reply)
Discussion started by: hkhan12
1 Replies

8. HP-UX

BAD SUPER BLOCK - Run fsck with alternate super block number

Error received when I tried to restore a blank disk with an 'auto recovery' DDS tape via HP-UX recovery system 2.0 onto a 1Gb SCSI. I assumed it would do the setup, wrong. Could someone tell me the procedure to initial disk for recovering files using cpio. The system is a HP-UX 9.04 version on a... (1 Reply)
Discussion started by: admin wanabee
1 Replies

9. UNIX for Advanced & Expert Users

Bad Number Error

What is wrong with my syntax, I am getting bad number error. The following lines of code get the value from INI file but the variable is a combination of multiple variables. When compiling all together, I get a bad number error or changing the '((' with '{{' gets me bad substitution error. The... (2 Replies)
Discussion started by: moan71
2 Replies

10. UNIX for Dummies Questions & Answers

Bad magic number in super-block

I am running mandrake 8.2 and when booting I get the message: e2fschk: Bad magic number in super-block while trying to open /dev/hda8. The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and really contains a valid an ext2 filesystem (and... (1 Reply)
Discussion started by: Jay
1 Replies
Login or Register to Ask a Question