From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 09:32:56 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9424D328 for ; Mon, 10 Nov 2014 09:32:56 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 131FA7FD for ; Mon, 10 Nov 2014 09:32:56 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id pn19so7252989lab.4 for ; Mon, 10 Nov 2014 01:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5yr8X0kDCyrAnjf1wQEOdmVMpsrRb6LMaUKE0le+4vI=; b=blQB+fAJayF9soMcR4+bpjyeZ5FAFVJWSHmFMlqLs4bv/wNxsCox4Dp7cnCeQMSkh5 eZn23+NgELceiaHw92osJiRA48DWTyHIi9GLQ/FcCrltqVilaoKV2IJyQaPq4khyaTIs IueF5EXr/RTfJr9ZmFHEJ40b/Nb4DXtI7sS3ox4htudn43qessJKPeNqQeLIuLlpj87d xNnuxwTp1IjDxRvwjHX0JReBRYyi+TO5uWSVzrQHQJ/poNQJO4u9iw6opCVnJX2SsKok gNk3jmLBG/nJoBC10XDOLu5i7iKKt64PutynF6HzZkcawEAwkfbAd+Hyk2jiK0h95+BO 5viQ== MIME-Version: 1.0 X-Received: by 10.113.5.7 with SMTP id ci7mr28822363lbd.9.1415611974215; Mon, 10 Nov 2014 01:32:54 -0800 (PST) Received: by 10.25.78.134 with HTTP; Mon, 10 Nov 2014 01:32:54 -0800 (PST) In-Reply-To: <546084FE.80300@multiplay.co.uk> References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> <546084FE.80300@multiplay.co.uk> Date: Mon, 10 Nov 2014 10:32:54 +0100 Message-ID: Subject: Re: zpool create on md hangs From: Andreas Nilsson To: Steven Hartland Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-fs@freebsd.org" , curtis@ipv6.occnc.com 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 09:32:56 -0000 On Mon, Nov 10, 2014 at 10:27 AM, Steven Hartland wrote: > > On 10/11/2014 06:48, Andreas Nilsson wrote: > >> On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar > > >> wrote: >> >> The following shell program produces a hang. Its reproducible (hangs >>> every time). >>> >>> #!sh >>> >>> set -e >>> set -x >>> >>> truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file >>> md_unit=`mdconfig -a -n -t vnode -f /image-file` >>> echo "md device is /dev/md$md_unit" >>> zpool create test md$md_unit >>> >>> 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. >>> >>> This is running on: >>> >>> FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 EDT >>> 2014 >>> >>> 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. >>> >>> 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. >>> >>> Curtis >>> >>> ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. >>> >>> 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 >> >> I suspect your just seeing the delay as it trim's the file and it will > complete in time. > > Try setting vfs.zfs.vdev.trim_on_init=0 before running the create and see > if it completes quickly after that. > > I tested this on HEAD and confirmed it was the case there. > > Regards > Steve > Sure enough, it has since completed on my box at least. Best regards Andreas