From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 1 03:20:12 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52E9616A416 for ; Fri, 1 Dec 2006 03:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B01243CAB for ; Fri, 1 Dec 2006 03:19:59 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB13KAmo080282 for ; Fri, 1 Dec 2006 03:20:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB13KAkA080281; Fri, 1 Dec 2006 03:20:10 GMT (envelope-from gnats) Resent-Date: Fri, 1 Dec 2006 03:20:10 GMT Resent-Message-Id: <200612010320.kB13KAkA080281@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrej Binder Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24BDB16A403 for ; Fri, 1 Dec 2006 03:14:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7218043CA3 for ; Fri, 1 Dec 2006 03:14:13 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kB13EOWo027674 for ; Fri, 1 Dec 2006 03:14:24 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id kB13EO3J027672; Fri, 1 Dec 2006 03:14:24 GMT (envelope-from nobody) Message-Id: <200612010314.kB13EO3J027672@www.freebsd.org> Date: Fri, 1 Dec 2006 03:14:24 GMT From: Andrej Binder To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: misc/106107: left-over fsck_snapshot after unfinished background fsck if filesystem clean X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 03:20:12 -0000 >Number: 106107 >Category: misc >Synopsis: left-over fsck_snapshot after unfinished background fsck if filesystem clean >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 01 03:20:10 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Andrej Binder >Release: 6.1-RELEASE >Organization: Slovak Technical University >Environment: FreeBSD a.ab.sk 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat Nov 25 03:00:57 CET 2006 ab@a.ab.sk:/usr/src/sys/amd64/compile/CUSTOM amd64 >Description: Whenever fsck is run in background mode, a file called fsck_snapshot gets created in the .snap directory on the checked volume. Fsck then runs its check on this file instead of the live filesystem. Filesystem snapshots (which fsck_snapshot essentially is) are designed to persist over mounts and reboots thus if fsck does not terminate properly for some reason (hard reboot etc), the file gets left over. This is partially solved on the next background fsck run (commonly just after the system reboots if the fs is marked dirty) since fsck overwrites the left over fsck_snapshot whit a new one and removes it when its done. The prblem occours when you mark the filesystem clean before the next fsck background run (for example through fsck in singleuser mode). This way the fsck_snapshot file persists and possibly consumes most of the filesystem (depending on the state of the filesystem when the snapshot was made). >How-To-Repeat: 1) run fsck in background mode 2) halt -qn before fsck finishes (or otherwise terminate it unproperly ... sigkill does not seem to work since fsck is in biord state) 3) boot into singleuser mode 4) fsck to mark the filesystem clean 5) reboot into normal mode and watch the file grow with every change on the live filesystem >Fix: Implement a code (maybe into loader after the the fs is mounted) to check for left over fsck snapshots and remove them if appropriate. >Release-Note: >Audit-Trail: >Unformatted: