From owner-freebsd-questions@FreeBSD.ORG Tue Nov 13 23:41:03 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31DFD5C6 for ; Tue, 13 Nov 2012 23:41:03 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id E68418FC08 for ; Tue, 13 Nov 2012 23:41:02 +0000 (UTC) Received: from www.dweimer.net (webmail.dweimer.net [192.168.5.1]) by webmail.dweimer.net (8.14.5/8.14.5) with ESMTP id qADNRovM003394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 13 Nov 2012 17:27:50 -0600 (CST) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 13 Nov 2012 17:27:50 -0600 From: dweimer To: FreeBSD Questions Subject: Custom ISO mount script problem Organization: dweimer.net Mail-Reply-To: Message-ID: X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/0.8.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dweimer@dweimer.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 23:41:03 -0000 I have a server that I use to host ISO images, and mount them so they are available via network shares. I ran into a problem today, I temporarily made an ISO image accessible via a md device and mounted it under /mnt just to check the data on the ISO image. My ISO mount script ran its updated check while this was there, and hung up because of it. Now the obvious solution is to fix my script, but as I am baffled as to why it hung-up, it does do a query on md devices, and will try to dismount any that are mounted if they don't match its criteria, and delete the md device as well. However as it would have found this one in use, it should have just returned a failure and continued on. However it didn't and then when I tried to manually umount it, my umount command hung as well. What I was left with was two umount commands attempting to umount /dev/md1000 both stuck, they wouldn't respond to a kill -9 I couldn't use mdconfig -d -u 1000 to delete the md device, even with a -o force (had yet another process stuck). After 1 hour all processes were still hung, killing the shell left them zombied, but still hung there, tying up the md device. I was left with rebooting the server, until I can figure out why my script broke and didn't just error and continue the remaining checks in its list. Does anyone have any idea how if this happens again to kill these hung-up umount processes, without rebooting the server? This could be a fun one to fix, because so far attempting to duplicate the problem hasn't worked, think I just have to time something just right, or wrong depended how you look at it. -- Thanks, Dean E. Weimer http://www.dweimer.net/