Date: Wed, 10 Aug 2011 09:00:48 -0700 From: Ian Downes <ian@ndwns.net> To: joris dedieu <joris.dedieu@gmail.com> Cc: freebsd-jail@freebsd.org Subject: Re: umounting md backed jail filesystems - busy Message-ID: <20110810160047.GA74133@weta.stanford.edu> In-Reply-To: <CAPd55qAZ70OORvqe7RrKGKMaKworgoZsEa38-d=OwVbnvgC9zA@mail.gmail.com> References: <20110810021750.GA83262@weta.stanford.edu> <CAPd55qAZ70OORvqe7RrKGKMaKworgoZsEa38-d=OwVbnvgC9zA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joris, thanks for the suggestions but they don't appear to indicate anything unusual. > > 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. > > 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) ? $ jls JID IP Address Hostname Path $ top -S -n 10000 |grep -i zfs 5 root 6 -8 - 0K 88K tx->tx 2 0:01 0.00% zfskern It's entirely possible that this isn't due to a process related to the jail but it is zfs tying things up for a while. I'd like to understand what's going on though as I'd rather not just hack something together to schedule purges at some later time. > > > > 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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110810160047.GA74133>