Advertisements

Running fsck and automatically fix any errors encountered

Tried to mount a filesystem but the OS requested to run fsck

root@solaris:/ # mount /1a
mount: the state of /dev/md/dsk/d7 is not okay
and it was attempted to be mounted read/write
mount: Please run fsck and try again

To run fsck and try to automatically fix any errors encountered, pass the flag -y

root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
UNREF FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009
RECONNECT? yes

LINK COUNT FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009 COUNT 0 SHOULD BE 1
ADJUST? yes

UNREF FILE I=2376356 OWNER=patrol MODE=10700
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977939 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977940 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977941 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

** Phase 5 – Check Cylinder Groups

CORRECT BAD CG SUMMARIES FOR CG 34? yes

CORRECTED SUPERBLOCK SUMMARIES FOR CG 34
CORRECTED SUMMARIES FOR CG 34
FILE BITMAP WRONG
FIX? yes

FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 69
CORRECTED SUMMARIES FOR CG 69
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 146
CORRECTED SUMMARIES FOR CG 146
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 147
CORRECTED SUMMARIES FOR CG 147
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 165
CORRECTED SUMMARIES FOR CG 165
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 168
CORRECTED SUMMARIES FOR CG 168
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 175
CORRECTED SUMMARIES FOR CG 175
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 202
CORRECTED SUMMARIES FOR CG 202
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 224
CORRECTED SUMMARIES FOR CG 224
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 233
CORRECTED SUMMARIES FOR CG 233
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 264
CORRECTED SUMMARIES FOR CG 264
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 269
CORRECTED SUMMARIES FOR CG 269
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 275
CORRECTED SUMMARIES FOR CG 275
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 286
CORRECTED SUMMARIES FOR CG 286
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 311
CORRECTED SUMMARIES FOR CG 311
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 316
CORRECTED SUMMARIES FOR CG 316
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 380
CORRECTED SUMMARIES FOR CG 380
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 386
CORRECTED SUMMARIES FOR CG 386
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 388
CORRECTED SUMMARIES FOR CG 388
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 395
CORRECTED SUPERBLOCK SUMMARIES FOR CG 495
CORRECTED SUPERBLOCK SUMMARIES FOR CG 516
CORRECTED SUMMARIES FOR CG 516
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 519
CORRECTED SUMMARIES FOR CG 519
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 539
CORRECTED SUMMARIES FOR CG 539
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 546
CORRECTED SUMMARIES FOR CG 546
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 576
CORRECTED SUMMARIES FOR CG 576
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 578
CORRECTED SUMMARIES FOR CG 578
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 579
CORRECTED SUMMARIES FOR CG 579
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 588
CORRECTED SUMMARIES FOR CG 588
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 631
CORRECTED SUMMARIES FOR CG 631
FRAG BITMAP WRONG (CORRECTED)
CORRECT GLOBAL SUMMARY
SALVAGE? yes

90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****

Since fsck encountered errors, we pass once again and see if more errors are encountered

root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
** Phase 5 – Check Cylinder Groups
90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)

Since no more errors were encountered, we try to mount the filesystem once again

root@solaris:/ # mount /1a
root@solaris:/ # df -k /1a
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d7 56450750 5690552 50195691 11% /1a

Advertisements
%d bloggers like this: