fsck does not mark as clean

Julian H. Stacey jhs at berklix.com
Mon Sep 2 10:25:49 UTC 2013


Hi, Reference:
> From:		"Ronald Klop" <ronald-freebsd8 at klop.yi.org> 
> Date:		Mon, 02 Sep 2013 10:35:49 +0200 

"Ronald Klop" wrote:
> Hello,
> 
> I have a usb stick which I mounted async and than removed it (without  
> writing anything). Of course its FS is marked dirty now.
> Running fsck gives this:
> 
> # fsck_ufs -y /dev/da5s2
> ** /dev/da5s2
> ** Last Mounted on /jails/mailserver/mnt/blabla
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 13178 files, 255459 used, 698006 free (238 frags, 87221 blocks, 0.0%  
> fragmentation)
> 
> ***** FILE SYSTEM STILL DIRTY *****
> 
> ***** PLEASE RERUN FSCK *****
> 
> #
> 
> How can I mark it as clean again? Fsck does not complain about specific  
> problems, but it does not fix anything either.
> NB: I'm running fsck on 9.2-STABLE/amd64 of Aug 5th.
> 
> Ronald.

If a 2nd fsck does Not fix it, have a look in /var/log/messages,
to see if eg you might have bad media, some blocks on USB failing to write.

If its not private data, make an image copy to hard disk with dd,
then gzip2 image, so if there is a real bug in fsck, you'll have
an image hopefully small enough to send a developer if they later
see your post & respond.

After that, there's fsdb in base from src/ & also
	cd /usr/ports/sysutils; echo *fs*
shows eg
	ffs2recov

If you play with fsdb its very likely you'll trash things,
& want to revert, so first make another copy of /dev/da5s2 with
dd, then use approx eg
	mdconfig -a -t vnode -f myusbimage.dd
	fsdb /dev/md0
& experiment/search/learn with fsdb

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with "> ".
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.


More information about the freebsd-fs mailing list