Solaris Common Messages and Troubleshooting Guide

fsck & ufsdump - cannot read block/sector errors

Cause

If you have received the following messages from fsck(1M):


CANNOT READ: BLK 196896         
CONTINUE? y
THE FOLLOWING SECTORS COULD NOT BE READ: 196896 196897 196898 196899
Or the following warnings from ufsdump(1M):

DUMP: Warning - cannot read sector 164016 of /dev/vx/rdsk/newdg/vol02 
DUMP: Warning - cannot read sector 164017 of /dev/vx/rdsk/newdg/vol02 
DUMP: Warning - cannot read sector 164018 of /dev/vx/rdsk/newdg/vol02
It could be that the size of this file system in this volume does not match the size of the regular file system.

Action

To check this, follow the example below:

Run the command:


# fstyp -v /dev/vx/rdsk/newdg/vol02 | head -30 | grep ncg
to print the following line (disregard any error or warning messages you might get):

ncg     25      size    102400  blocks  95983
Disregard everything but the number after the word size. This number tells you the file system is 102,400 Kbytes in length.

Next, find out the size of the volume. Run the command:


# vxprint -g newdg -vt vol02
which prints:

V NAME  USETYPE  KSTATE  STATE  LENGTH READPOL PREFPLEX  
v vol02 fsgen    ENABLED ACTIVE 163840 SELECT
From this, you can see the volume is 163,840 sectors (divide this number by 2 to get it into Kbytes) or 81,920 Kbytes. As you can see from this example, the volume (80 Mbytes) is much smaller than the file system (100 Mbytes). This should be rectified immediately to avoid or minimize data loss.

To resolve this problem, back up the data as best you can, then either create a new volume or newfs this one and restore the data.

This problem can also occur on a DiskSuite metadevice. The difference is that you need to check the size of the metadevice using the metastat command. The metastat command shows the size of the metadevice in sectors, just like the vxprint does.