# Usage and output of fsck



## lfloyd (May 4, 2011)

Running FreeBSD 8.2.

I had a power outage this morning, after which I ran fsck in multiuser mode and saw some errors.  So I rebooted into single user mode and ran *fsck -y*.  This resulted in cleaning things up, or at least so says the results: 
	
	



```
FILE SYSTEM IS CLEAN
```

Yet, when I return to multi-user mode and run fsck again, I see the same errors (only on /var):


```
** /dev/ad10s1d (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=306179  OWNER=mysql MODE=100600
SIZE=0 MTIME=May  3 15:30 2011 
CLEAR? no

UNREF FILE I=306180  OWNER=mysql MODE=100600
SIZE=0 MTIME=May  3 15:30 2011 
CLEAR? no

UNREF FILE I=306181  OWNER=mysql MODE=100600
SIZE=0 MTIME=May  3 15:30 2011 
CLEAR? no

UNREF FILE I=306182  OWNER=mysql MODE=100600
SIZE=0 MTIME=May  3 15:30 2011 
CLEAR? no

UNREF FILE I=306193  OWNER=mysql MODE=100600
SIZE=0 MTIME=May  3 15:30 2011 
CLEAR? no

** Phase 5 - Check Cyl groups
21152 files, 161760 used, 1841159 free (1799 frags, 229920 blocks, 0.1% fragmentation)
```

1.  How do I make these go away?
2.  How serious are the errors?
3.  Why am I seeing a difference between single- and multi-user modes?

Thanks!

- larry


----------



## phoenix (May 4, 2011)

Don't run fsck on a mounted filesystem if it's mounted read-write.  You will get errors like the above, as files are changing while the checker is running.

Only run fsck on unmounted filesystems, or filesystems mounted read-only.


----------



## lfloyd (May 4, 2011)

Thanks, Freddie.  That answers all my questions!


----------

