From owner-freebsd-questions@FreeBSD.ORG Mon Mar 19 14:46:42 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 5152116A401 for ; Mon, 19 Mar 2007 14:46:42 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by mx1.freebsd.org (Postfix) with ESMTP id D92D413C4C4 for ; Mon, 19 Mar 2007 14:46:41 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by mu-out-0910.google.com with SMTP id g7so1800349muf for ; Mon, 19 Mar 2007 07:46:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=ETNaWQc4041C7kHOZWmZemVGaggj4VCeXOlIQ4LylI9OJ47Ston8kWOOBq7PYyVPK8OwOSNFr/ZEbA491TFJ90AcV4IDMWUUTVpIlebud7GtCnasRYeH4Lp88zaOgiZND3Bvwza7ShCllNHUV+ZCCB2huwVAuZMdvPXvJkcyr3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=seOr6INLxUUsS2SnC5CeJjGKO1JTNPIE/EutV3ZQj1de84QMYXPLLfzIi7lU8nWTlb1vHKBzm9GBwUh2PzqjL9v5lTWyI5Yg8LK/W2vF9adRQ8zzfh9FbKNn+xXPw1ZeG4KgVsbyrcWUWyXgIeqCFf0l6Cw8McsNDYruiCs2cGU= Received: by 10.82.178.11 with SMTP id a11mr10213512buf.1174315599734; Mon, 19 Mar 2007 07:46:39 -0700 (PDT) Received: by 10.82.175.3 with HTTP; Mon, 19 Mar 2007 07:46:39 -0700 (PDT) Message-ID: <539c60b90703190746t2b33bf8cr500cd289e0cbd6a1@mail.gmail.com> Date: Mon, 19 Mar 2007 07:46:39 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: ccc962f420073995 Subject: negative free blocks after mirror! [was: Re: mirror without destroying existing contents] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2007 14:46:42 -0000 On 3/17/07, Jonathan McKeown wrote: > On Friday 16 March 2007 21:48, Steve Franks wrote: > > On 3/16/07, John Nielsen wrote: > > > On Friday 16 March 2007 11:18, Steve Franks wrote: > > > > I get the following: > > > > > > > > #gmirror label -v -b split -s 1024 data ad0 > > > > can't store metadata on ad0: operation not permitted. > > > > > > That most likely means that you currently have a filesystem on ad0 > > > mounted. If that's the case you should be glad that the OS was smarter > > > than you. What steps had you taken prior to this? > > > > It appears to say in the manpage that you can do this on a disk with > > an existing filesys - would you expect it to work if the disk is > > unmounted first, then? > > The way to do this is potentially a little risky but I haven't had a problem > with it yet after setting up several mirrors on live fileservers. There is a > sysctl called kern.geom.debugflags: if you set this to 16 it will allow you > to change the mounted filesystem. Bear in mind that since the metadata for > the mirror is written to the last sector of the disk, there is a small risk > of data loss: if that sector contains data it will be overwritten. > > There's a thorough howto by Ralph Engelschall, and an OnLamp article by Dru > Lavigne, with more details: > > http://people.freebsd.org/~rse/mirror/ > http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html > > Jonathan > Yes, the origonal disk was pretty full, but, I suspect this is not a good thing: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 507630 95254 371766 20% / devfs 1 1 0 100% /dev /dev/ad0s1e 507630 30688 436332 7% /tmp /dev/ad0s1f 152451398 5956408 134298880 4% /usr /dev/ad0s1d 1444526 103600 1225364 8% /var /dev/mirror/rainstones1 151368706 141135278 -1876068 101% /rainstone How is that even possible? Steve