From owner-freebsd-jail@FreeBSD.ORG Wed Aug 10 13:16:54 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 A4509106564A for ; Wed, 10 Aug 2011 13:16:54 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id 722728FC18 for ; Wed, 10 Aug 2011 13:16:54 +0000 (UTC) Received: by iye7 with SMTP id 7so1196151iye.17 for ; Wed, 10 Aug 2011 06:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=4PmRZeImvvnE2jNI9oivbjSYpKXG5SnozqnnpfWxfXo=; b=BC73fMnDddvYKhBBODtazK54NEDzfaRWRxF+vi+afvhe6JvwklnljUvOt2dY5AUlUN yOlcbsO0TwOOvSYztq1DR9PNEd7HDa+ldKmNWEGS4uvpHnlIvcwhOqSEWpVPqx+zYm3o dkkcXRPX7kCPn/OVEIxF6ax9JluY3u0II4/Ao= MIME-Version: 1.0 Received: by 10.42.150.68 with SMTP id z4mr7951387icv.23.1312982213620; Wed, 10 Aug 2011 06:16:53 -0700 (PDT) Received: by 10.231.13.204 with HTTP; Wed, 10 Aug 2011 06:16:53 -0700 (PDT) In-Reply-To: <20110810021750.GA83262@weta.stanford.edu> References: <20110810021750.GA83262@weta.stanford.edu> Date: Wed, 10 Aug 2011 15:16:53 +0200 Message-ID: From: joris dedieu To: Ian Downes Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-jail@freebsd.org Subject: Re: 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 13:16:54 -0000 2011/8/10 Ian Downes : > Hi everyone, > > I'm trying to cleanup after shutting down some jails but I'm getting devi= ce > busy errors when trying to umount some of the filesystems. > > More specifically, I've got an ephemeral zfs filesystem that serves as th= e root > of the jail. On '/etc/rc.d/jail stop' the jail stops cleanly but when I t= ry 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 file= s. What gives top -S -n 10000 |grep -i zfs while system is not unmountable (could you see some processes in zfs state) ? What gives jls during this time (does it report anythink still alive) ? Regards Joris > > Details: > > $ uname -a > FreeBSD XXX.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue May 31 19:05:32 U= TC 2011 =A0 =A0 root@XXX.com:/usr/obj/usr/src/sys/XENHVM =A0amd64 > > '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 =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 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 > > _______________________________________________ > freebsd-jail@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-jail > To unsubscribe, send any mail to "freebsd-jail-unsubscribe@freebsd.org" >