From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 09:49:45 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 BD3C9A12 for ; Mon, 10 Nov 2014 09:49:45 +0000 (UTC) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) (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 51C07971 for ; Mon, 10 Nov 2014 09:49:45 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id z12so8229490wgg.9 for ; Mon, 10 Nov 2014 01:49:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HdiXSAtsL4hP5w7iZykQX98lhGDhgUs162pqVOK9cM8=; b=h8YWhp0kKUmS4aKXVRdNa1R1DD66/Z8GCVkvXa6wvNdDVvX36Ux2vQ2kcNDMiN8jDm g24mMk67rW3IAypFAW/Jqjxb05tGAcZG29Q8k0+PFm21PjsgKmxbuDCwjJe8mOoD3uhO bf5ZV+d3mYFbQxiky+gKr1571LHvveZCRSMVTQEpj68ph3+7ZwbxAAUicuSrlb3pF6gz imfHLKFL6knBSF7mi++adeToLKpf5pl+1wIir9DhYB9CQMmALu+HdDJHmPF6YGiTpSsp o4nA3i33o5wXkLDBwHsjNbRuDgEeOOFvdGkQiOZGP2q+WP2pnOtnKlobDhpj8MFEfXlG VfsQ== X-Gm-Message-State: ALoCoQk3L4T6YY1LImVk9UrGkh62SNduGvaVzPwTaCrhE5Zd/DpMADDIBAP9HcQQ9zZdoPzlzyoh X-Received: by 10.181.27.230 with SMTP id jj6mr9611026wid.15.1415611629191; Mon, 10 Nov 2014 01:27:09 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id t16sm16880316wjr.28.2014.11.10.01.27.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Nov 2014 01:27:08 -0800 (PST) Message-ID: <546084FE.80300@multiplay.co.uk> Date: Mon, 10 Nov 2014 09:27:26 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Andreas Nilsson , curtis@ipv6.occnc.com Subject: Re: zpool create on md hangs References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 09:49:45 -0000 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