From owner-freebsd-bugs@freebsd.org Fri Mar 22 08:32:22 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6640155ECF2 for ; Fri, 22 Mar 2019 08:32:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 77C85703F9 for ; Fri, 22 Mar 2019 08:32:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 35F29155ECF1; Fri, 22 Mar 2019 08:32:21 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11D85155ECF0 for ; Fri, 22 Mar 2019 08:32:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8058B703F5 for ; Fri, 22 Mar 2019 08:32:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id AF24310322 for ; Fri, 22 Mar 2019 08:32:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x2M8WJsS014768 for ; Fri, 22 Mar 2019 08:32:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x2M8WJdp014766 for bugs@FreeBSD.org; Fri, 22 Mar 2019 08:32:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236710] zfs: clone + resize = dataset is busy Date: Fri, 22 Mar 2019 08:32:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: olevole@olevole.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 08:32:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236710 Bug ID: 236710 Summary: zfs: clone + resize =3D dataset is busy Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: olevole@olevole.ru ( copy of the problem published in freebsd-fs@ ) I see the following problem on FreeBSD 13.0-CURRENT r345087M amd64, zpool version 28, zfs version 5 If you create a ZVOL, fill in specific data, take a snapshot, clone and resize, you will get a blocked pool (device busy for : export -f, destroy -f ..)--- what i found: a) the problem only appears on clone/snapshot, there is no problem on a simple zvol resize; b) the nature of the data affects the problem: - when zvol no data, problem is missing - If you try to fill zvol with random data, for example: dd if=3D/dev/random of=3D there are also no problems. But problem exist if I try to fill in with cloud images data ( http://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/12.0-RELEASE/amd64/La= test/ , http://cloud-images.ubuntu.com/xenial/current/ ) - in fact, these are raw images of the installed OS. c) The problem only occurs when creating zvol + resizing (in two commands). If you try to do atomically and simultaneously: /sbin/zfs clone -o volsize=3D ... there is no problem, but with this: /sbin/zfs clone .. /sbin/zfs set volsize=3D problem exist. Maybe this is not a ZFS problem and GEOM-related ? Step-by-step how to reproduce (where z01 - active ZFS pool): --- % wget http://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/12.0-RELEASE/amd64/La= test/FreeBSD-12.0-RELEASE-amd64.raw.xz % xz -d FreeBSD-12.0-RELEASE-amd64.raw.xz > ( /usr/bin/stat -f "%z" FreeBSD-12.0-RELEASE-amd64.raw -- get size) > 33286062080 % /sbin/zfs create -sV 33286062080 -o volmode=3Ddev z01/test1 % dd bs=3D1m if=3DFreeBSD-12.0-RELEASE-amd64.raw of=3D/dev/zvol/z01/test1 > 31744+1 records in > 31744+1 records out > 33286062080 bytes transferred in 127.530635 secs (261004441 bytes/sec) % /sbin/zfs snapshot z01/test1 at snap % /sbin/zfs clone z01/test1 at snap > ( resizing. For example, double up ) > bc -e '33286062080 * 2' > 66572124160 % /sbin/zfs set volsize=3D66572124160 z01/test2 % /sbin/zfs destroy z01/test2 > cannot destroy 'z01/test2': dataset is busy % zpool export -f z01 > cannot export 'z01': pool is busy --- with truss i can see: .. ioctl(3,0xc0185a15 { IORW 0x5a('Z'), 21, 24 },0x7fffffffcd78) ERR#3 'No such process' ioctl(3,0xc0185a15 { IORW 0x5a('Z'), 21, 24 },0x7fffffffcd78) ERR#3 'No such process' ioctl(6,0xc0185a18 { IORW 0x5a('Z'), 24, 24 },0x7fffffffcdb8) ERR#16 'Device busy' --=20 You are receiving this mail because: You are the assignee for the bug.=