From owner-freebsd-current@FreeBSD.ORG Fri Sep 9 06:20:19 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74ECE106564A for ; Fri, 9 Sep 2011 06:20:19 +0000 (UTC) (envelope-from lehmann@ans-netz.de) Received: from avocado.salatschuessel.net (avocado.salatschuessel.net [78.111.72.186]) by mx1.freebsd.org (Postfix) with SMTP id A5FAE8FC19 for ; Fri, 9 Sep 2011 06:20:18 +0000 (UTC) Received: (qmail 86005 invoked by uid 80); 9 Sep 2011 06:20:17 -0000 Received: from 164.61.223.12 ([164.61.223.12]) by avocado.salatschuessel.net (Horde Framework) with HTTP; Fri, 09 Sep 2011 08:20:17 +0200 Date: Fri, 09 Sep 2011 08:20:17 +0200 Message-ID: <20110909082017.Horde.UMlxWaQd9PdOabAhYvwRS2o@avocado.salatschuessel.net> From: Oliver Lehmann To: current@freebsd.org, pjd@FreeBSD.org User-Agent: Internet Messaging Program (IMP) H4 (5.0.9) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Cc: Subject: gmirror: how to make your system reboot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 06:20:19 -0000 Hi, shouldn't there be a failsafe to not be able to destroy the gmirror as long as it is still in use like mounted? 1. create a gmirror with n>=1 disks 2. newfs the gmirror device 3. mount the gmirror device 4. remove all disks from the gmirror 5. system reboots (gmirror gone but still mounted) nudel# gmirror status nudel# gmirror label -b prefer test /dev/ada1p2 nudel# newfs /dev/mirror/test /dev/mirror/test: 4096.0MB (8388600 sectors) block size 32768, fragment size 4096 using 6 cylinder groups of 740.00MB, 23680 blks, 47360 inodes. super-block backups (for fsck -b #) at: 192, 1515712, 3031232, 4546752, 6062272, 7577792 nudel# mount /dev/mirror/test /mnt/tmp nudel# gmirror remove test ada1p2 > uname -a FreeBSD nudel.salatschuessel.net 9.0-BETA2 FreeBSD 9.0-BETA2 #0: Thu Sep 8 19:59:40 CEST 2011 olivleh1@nudel.salatschuessel.net:/usr/obj/usr/src/sys/GENERIC amd64 > I'm just having remote access right now to the system so I'm not able to provide any dumps but the system instantly reboots.