From owner-freebsd-questions@FreeBSD.ORG Thu Oct 25 01:52:35 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D6B16A417 for ; Thu, 25 Oct 2007 01:52:35 +0000 (UTC) (envelope-from fbsd06+PT=09b3190e@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id 3679413C491 for ; Thu, 25 Oct 2007 01:52:35 +0000 (UTC) (envelope-from fbsd06+PT=09b3190e@mlists.homeunix.com) Received: from mxout-04.mxes.net (mxout-04.mxes.net [216.86.168.179]) by turtle-in.mxes.net (Postfix) with ESMTP id 9CA191642AB for ; Wed, 24 Oct 2007 21:28:01 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id D2D68D05B4 for ; Wed, 24 Oct 2007 21:27:50 -0400 (EDT) Date: Thu, 25 Oct 2007 02:27:48 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20071025022748.417d8c37@gumby.homeunix.com.> In-Reply-To: <471FE5B8.8080806@cran.org.uk> References: <20071025005103.29d5040c@gumby.homeunix.com.> <471FE5B8.8080806@cran.org.uk> X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Can't overwrite a particular swap partition 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: Thu, 25 Oct 2007 01:52:35 -0000 On Thu, 25 Oct 2007 01:39:20 +0100 Bruce Cran wrote: > RW wrote: > > I have two swap partitions, ad4s1b is part of my main slice, and > > ad6s1b is on a second drive. The permissions are the same, but I > > can't overwrite the second one. The same thing happens whether I > > use swapoff or reboot into single user mode. > > > > What's the difference? > > > > # dd if=/dev/random of=/dev/ad4s1b bs=1m > > dd: /dev/ad4s1b: end of device > > 4097+0 records in > > 4096+0 records out > > 4294967296 bytes transferred in 245.745739 secs (17477281 bytes/sec) > > > > # dd if=/dev/random of=/dev/ad6s1b bs=1m > > dd: /dev/ad6s1b: Operation not permitted > > 1+0 records in > > 0+0 records out > > 0 bytes transferred in 0.053829 secs (0 bytes/sec) > > > > # ls -l /dev/ad*1b > > crw-r----- 1 root operator 0, 125 Oct 25 00:25 /dev/ad4s1b > > crw-r----- 1 root operator 0, 132 Oct 24 20:23 /dev/ad6s1b > > > > This looks like a geom permission problem, though it sounds like it > should't be occurring. Does setting > > kern.geom.debugflags=16 > > solve this? Not unless it needs a reboot. # sysctl kern.geom.debugflags=16 kern.geom.debugflags: 0 -> 16 gumby# dd if=/dev/zero of=/dev/ad6s1b bs=1m dd: /dev/ad6s1b: Operation not permitted 1+0 records in 0+0 records out 0 bytes transferred in 0.001970 secs (0 bytes/sec)