From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 17:18:01 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A41E56F for ; Mon, 10 Nov 2014 17:18:01 +0000 (UTC) Received: from webmail2.jnielsen.net (webmail2.jnielsen.net [50.114.224.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C356F59 for ; Mon, 10 Nov 2014 17:18:00 +0000 (UTC) Received: from [10.10.1.196] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by webmail2.jnielsen.net (8.14.9/8.14.9) with ESMTP id sAAHHoMU000810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Nov 2014 10:17:54 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.net: Host office.betterlinux.com [199.58.199.60] claimed to be [10.10.1.196] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: zpool create on md hangs From: John Nielsen In-Reply-To: Date: Mon, 10 Nov 2014 10:17:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1DCE4DFC-45E9-491E-B6E5-77F328979A3B@jnielsen.net> References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> <546084FE.80300@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1990.1) Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 17:18:01 -0000 On Nov 10, 2014, at 2:32 AM, Andreas Nilsson wrote: >=20 > On Mon, Nov 10, 2014 at 10:27 AM, Steven Hartland = > wrote: >=20 >>=20 >> On 10/11/2014 06:48, Andreas Nilsson wrote: >>=20 >>> On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar = >>>=20 >>> wrote: >>>=20 >>> The following shell program produces a hang. Its reproducible = (hangs >>>> every time). >>>>=20 >>>> #!sh >>>>=20 >>>> set -e >>>> set -x >>>>=20 >>>> truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file >>>> md_unit=3D`mdconfig -a -n -t vnode -f /image-file` >>>> echo "md device is /dev/md$md_unit" >>>> zpool create test md$md_unit >>>>=20 >>>> The zpool command hangs. Kill or kill -9 has no effect. All >>>> filesystems are unaffected but any other zpool or zfs command will >>>> hang and be unkillable. A reboot is needed. >>>>=20 >>>> This is running on: >>>>=20 >>>> FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 = EDT >>>> 2014 >>>>=20 >>>> When I get a chance, I will try again with a 10.1 RC3 kernel I >>>> recently built. If this still doesn't work, I'll build an r11 = kernel >>>> since the code differs from 10.1, not having the svm code merged = in. >>>> I'm asking before poking around further in case anyone has insights >>>> into why this might happen. >>>>=20 >>>> BTW- The reason to create a zfs filesystem on an vnode type md is = to >>>> create an image that can run under bhyve using a zfs root fs. This >>>> works quite nicely for combinations geom types (gmirror, gstripe, >>>> gjournal, gcache) but zpool hangs when trying this with zfs. >>>>=20 >>>> Curtis >>>>=20 >>>> ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. >>>>=20 >>>> Freezes here on 10.1-RC2-p1 (amd64) as well. >>> ^T says: >>> load: 0.21 cmd: zpool 74063 [zio->io_cv] 8.84r 0.00u 0.00s 0% 3368k >>>=20 >>> I suspect your just seeing the delay as it trim's the file and it = will >> complete in time. >>=20 >> Try setting vfs.zfs.vdev.trim_on_init=3D0 before running the create = and see >> if it completes quickly after that. >>=20 >> I tested this on HEAD and confirmed it was the case there. >>=20 >> Regards >> Steve >>=20 >=20 > Sure enough, it has since completed on my box at least. Thanks! I've wondered why it always took so long to create zpools for VM = images. JN