From owner-freebsd-fs@FreeBSD.ORG  Thu Jan 21 06:47:48 2010
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87E99106566B
	for <freebsd-fs@freebsd.org>; Thu, 21 Jan 2010 06:47:48 +0000 (UTC)
	(envelope-from ndenev@gmail.com)
Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com
	[209.85.220.218])
	by mx1.freebsd.org (Postfix) with ESMTP id 1B6228FC16
	for <freebsd-fs@freebsd.org>; Thu, 21 Jan 2010 06:47:47 +0000 (UTC)
Received: by fxm10 with SMTP id 10so2783441fxm.34
	for <freebsd-fs@freebsd.org>; Wed, 20 Jan 2010 22:47:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:content-type
	:content-transfer-encoding:subject:date:message-id:to:mime-version
	:x-mailer; bh=F5HSqAYc/ug/tgK5wUcgB0HecywasDDam998e7N5kzM=;
	b=gyfqxvMN9iPJ/evYmy+/3Mf25caAPQcvU9taHbrOwvW10xDMvln+k73IY5EosJRYg8
	vaDTubrdlcmmr6/rlSBIIh+1S/cTVQ5GgyNtz55DIe0THuiBJeIazJoUPPJFO9W/nB4/
	vPRHGQIar4qJoh2juFAFy0vLRrm+GKU1lCNcs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:content-type:content-transfer-encoding:subject:date:message-id
	:to:mime-version:x-mailer;
	b=JAMxoWc5XOShioZLLXEbpdLc6has1rdi/wSTXtdbPYoadhg/f805FOyxXkgWtd2B2Z
	xwF3iqA2RMzwLuo6WBaQb5MV1yBknp/nOXHAvTfXbyRBngHfuOoy9Hxf1wV6aA6ucECx
	gLDay1srdNOHtLqhXCOA+hq87WzlVJpaOf9xo=
Received: by 10.223.3.67 with SMTP id 3mr1019579fam.25.1264056467043;
	Wed, 20 Jan 2010 22:47:47 -0800 (PST)
Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg
	[93.152.151.19])
	by mx.google.com with ESMTPS id 18sm889209fks.4.2010.01.20.22.47.46
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Wed, 20 Jan 2010 22:47:46 -0800 (PST)
From: Nikolay Denev <ndenev@gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Date: Thu, 21 Jan 2010 08:47:43 +0200
Message-Id: <871ACE35-EC52-4573-B623-C1AEF609A8D3@gmail.com>
To: freebsd-fs@freebsd.org
Mime-Version: 1.0 (Apple Message framework v1077)
X-Mailer: Apple Mail (2.1077)
Subject: ZFS zpool replace issues (if vfs.zfs.debug is not set)
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2010 06:47:48 -0000

Hello,

I have 4 drives (ad4,ad5,ad6 and ad7) raidz1 pool with GPT partitions =
like this:

nas# gpart show ad6
=3D>        34  1953525101  ad6  GPT  (932G)
          34         128    1  freebsd-boot  (64K)
         162         350       - free -  (175K)
         512      400000    2  freebsd-swap  (195M)
      400512  1953124623    3  freebsd-zfs  (931G)

The freebsd-swap partition used to be UFS partition for /boot before
gptzfsboot was able to boot from raidz pools.
Then I've decided to get rid of these 195MB partitions by offlining
the devices in my pool one by one, deleting the swap and zfs partitons,
creating one new zfs partition that uses all the available space,=20
doing zpool replace and wait to resilver.

So what I did was :
  =20
   zpool offline zfs ad4p3 (so i can modify the disk with gpart)
   gpart delete -i2 ad4
   gpart delete -i3 ad4
   gpart add -b 512 -s 1953524623 -t freebsd-zfs ad4

and then when I've tried :
  =20
   zpool replace zfs ad4p3 ad4p2=20

I got "permission denied" error.
Strangely when I've enabled the sysctl "vfs.zfs.debug" and tried again
the zpool replace succeeded. And this happened on all of the drives I've =
replaced so far.
=20
The other probably unrelated issue is that when I've started replacing =
one of the vdevs in the pool
another vdev suddenly changed it's name from adXp3 to =
gptid/64149f82-44f0-11de-ae31-001ff3fc24c1
This seems really strange especially because I was not touching this =
particular vdev...



--
Regards,
Nikolay Denev