From owner-freebsd-fs@FreeBSD.ORG Mon Sep 2 10:25:49 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BCBE5BCB for ; Mon, 2 Sep 2013 10:25:49 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 330B62FC4 for ; Mon, 2 Sep 2013 10:25:49 +0000 (UTC) Received: from park.js.berklix.net (pD9FBF3C8.dip0.t-ipconnect.de [217.251.243.200]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id r829Y4J2041050; Mon, 2 Sep 2013 09:34:04 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.14.3/8.14.3) with ESMTP id r829Xs28043903; Mon, 2 Sep 2013 11:33:54 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost.js.berklix.net [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id r829XVGu020704; Mon, 2 Sep 2013 11:33:53 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201309020933.r829XVGu020704@fire.js.berklix.net> To: "Ronald Klop" Subject: Re: fsck does not mark as clean From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Mon, 02 Sep 2013 10:35:49 +0200." Date: Mon, 02 Sep 2013 11:33:31 +0200 Sender: jhs@berklix.com Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 10:25:49 -0000 Hi, Reference: > From: "Ronald Klop" > 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.