UFS: How to resolve situations where the fsck command cannot find the superblock (Doc ID 1004847.1)

Last updated on MAY 18, 2017

Applies to:

Solaris Operating System - Version 8 6/00 U1 and later
All Platforms
***Checked for relevance on 27-Jan-2014***

Goal

This document describes how to resolve situations where the ufs filesystems contains the following types of blocks:

  • boot block : The boot block stores information used to boot the system.

  • super-block : Much of the filesystems internal information is stored in superblocks.

  • inode : The inode stores location information about a file -- everything except for the file name. The number of inodes in a filesystem can be changed from the default if newfs -i is used to create the filesystem.

  • data block : The file's data is stored in data blocks.

Filesystem corruption can be detected and often repaired by fsck(1M) command. Sometimes the fsck (1M) command complains that it cannot find the superblock. Alternative superblock locations were created by newfs(1M) at the time that the filesystem was created. The newfs -Nv command can be  invoked to nondestructively discover the superblock locations for the filesystem.

Here are errors you can get:

  • clean flag in superblock is wrong: fix 

  • File system state in superblock is wrong fix 

  • Bad magic number

  • wrong magic number

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms