From owner-freebsd-jail@FreeBSD.ORG Wed Aug 10 02:36:34 2011 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD09E1065675 for ; Wed, 10 Aug 2011 02:36:34 +0000 (UTC) (envelope-from ian@weta.stanford.edu) Received: from smtp.stanford.edu (smtp2.Stanford.EDU [171.67.219.82]) by mx1.freebsd.org (Postfix) with ESMTP id 96C518FC17 for ; Wed, 10 Aug 2011 02:36:34 +0000 (UTC) Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 8307D8161 for ; Tue, 9 Aug 2011 19:17:51 -0700 (PDT) Received: from weta.stanford.edu (weta.Stanford.EDU [128.12.181.231]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id 1A8C78076 for ; Tue, 9 Aug 2011 19:17:51 -0700 (PDT) Received: from ian by weta.stanford.edu with local (Exim 4.74 (FreeBSD)) (envelope-from ) id 1QqyMh-000MQ6-04 for freebsd-jail@freebsd.org; Tue, 09 Aug 2011 19:17:51 -0700 Date: Tue, 9 Aug 2011 19:17:50 -0700 From: Ian Downes To: freebsd-jail@freebsd.org Message-ID: <20110810021750.GA83262@weta.stanford.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: Ian Downes Subject: umounting md backed jail filesystems - busy X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2011 02:36:34 -0000 Hi everyone, I'm trying to cleanup after shutting down some jails but I'm getting device busy errors when trying to umount some of the filesystems. More specifically, I've got an ephemeral zfs filesystem that serves as the root of the jail. On '/etc/rc.d/jail stop' the jail stops cleanly but when I try to destroy the zfs filesystem the initial umount fails, claiming it's busy. This happens everytime. I can't for the life of me work out who's tying it up. I've tried fstat, lsof and fuser but nothing is reported as active! No processes, no active files. Details: $ uname -a FreeBSD XXX.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue May 31 19:05:32 UTC 2011 root@XXX.com:/usr/obj/usr/src/sys/XENHVM amd64 'data' is a md backed zpool $ mount | grep data/path/to/jail/root on /path/to/jail/root (zfs, local) $ fstat -f /path/to/jail/root USER CMD PID FD MOUNT INUM MODE SZ|DV R/W $ unmount /path/to/jail/root cannot unmount '/path/to/jail/root': Device busy Some time later, measured in minutes, something frees up and I can umount/destroy the filesystem ok. Can anyone offer some suggestions on what it could be or other ways to determine what's going on? Thanks, Ian