From owner-freebsd-i386@FreeBSD.ORG Sun Oct 1 13:00:44 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96F8416A416 for ; Sun, 1 Oct 2006 13:00:44 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FB5C43D5F for ; Sun, 1 Oct 2006 13:00:40 +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 k91D0ejb079436 for ; Sun, 1 Oct 2006 13:00:40 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k91D0emt079435; Sun, 1 Oct 2006 13:00:40 GMT (envelope-from gnats) Resent-Date: Sun, 1 Oct 2006 13:00:40 GMT Resent-Message-Id: <200610011300.k91D0emt079435@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, HonestQiao Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 512CB16A407 for ; Sun, 1 Oct 2006 12:58:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 527C843D80 for ; Sun, 1 Oct 2006 12:58:08 +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 k91Cw8tO092408 for ; Sun, 1 Oct 2006 12:58:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k91Cw7c3092407; Sun, 1 Oct 2006 12:58:07 GMT (envelope-from nobody) Message-Id: <200610011258.k91Cw7c3092407@www.freebsd.org> Date: Sun, 1 Oct 2006 12:58:07 GMT From: HonestQiao To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: i386/103867: rm swapfile after swapoff can't release the disk space X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Oct 2006 13:00:44 -0000 >Number: 103867 >Category: i386 >Synopsis: rm swapfile after swapoff can't release the disk space >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 01 13:00:39 GMT 2006 >Closed-Date: >Last-Modified: >Originator: HonestQiao >Release: FreeBSD 6.1-PRERELEASE >Organization: iGOGO8 >Environment: FreeBSD www141.igogo8.com 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Fri May 12 12:12:17 CST 2006 HonestQiao@www141.igogo8.com:/usr/src/sys/i386/compile/iGOGO8-PAE i386 >Description: Several months ago , I read the follow article, and add a 12G swapfile. The article url is http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html The swapfile is /usr/swap0 , and I have a swap mount which size is 2G. top show: Swap: 14G Total, 14G Free Today , I use swapoff /usr/swap0 to disable swapfile , and then rm /usr/swap0. /usr/swap0 was deleted, but its disk space can't release. Now, top show: Swap: 2048M Total, 2048M Free www141# df -hi Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/amrd0s1a 248M 41M 187M 18% 1609 31413 5% / devfs 1.0K 1.0K 0B 100% 0 0 100% /dev /dev/amrd0s1f 19G 965M 17G 5% 1737 2636085 0% /db /dev/amrd0s1g 19G 12G 5.6G 69% 769803 1868019 29% /home /dev/amrd0s1d 248M 43M 185M 19% 585 32437 2% /tmp /dev/amrd0s1h 25G 19G 3.4G 85% 354372 3013562 11% /usr /dev/amrd0s1e 248M 65M 163M 29% 6430 26592 19% /var www141# du -csh /usr 9.3G /usr 9.3G total www141# mount /dev/amrd0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/amrd0s1f on /db (ufs, local, soft-updates) /dev/amrd0s1g on /home (ufs, local, soft-updates) /dev/amrd0s1d on /tmp (ufs, local, soft-updates) /dev/amrd0s1h on /usr (ufs, local, soft-updates) /dev/amrd0s1e on /var (ufs, local, soft-updates) from , df -hi show /usr use 19G but, du -csh /usr show use use 9.3G Why there has a big difference size between df and du? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: