From owner-freebsd-fs@freebsd.org Fri Jun 9 10:15:42 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E446BF14D6 for ; Fri, 9 Jun 2017 10:15:42 +0000 (UTC) (envelope-from lukasz@wasikowski.net) Received: from mail.freebsd.systems (mail.freebsd.systems [IPv6:2001:41d0:2:1276::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3709F1BCD; Fri, 9 Jun 2017 10:15:42 +0000 (UTC) (envelope-from lukasz@wasikowski.net) Received: from mail.freebsd.systems (mail.freebsd.systems [IPv6:2001:41d0:2:1276::1]) by mail.freebsd.systems (Postfix) with ESMTP id 87557316; Fri, 9 Jun 2017 12:15:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at freebsd.systems Received: from mail.freebsd.systems ([IPv6:2001:41d0:2:1276::1]) by mail.freebsd.systems (scan.freebsd.systems [IPv6:2001:41d0:2:1276::1]) (amavisd-new, port 10026) with ESMTP id j83_mLhyBAPH; Fri, 9 Jun 2017 12:15:40 +0200 (CEST) Received: from [192.168.138.100] (unknown [194.181.68.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.freebsd.systems (Postfix) with ESMTPSA id A8723313; Fri, 9 Jun 2017 12:15:39 +0200 (CEST) Authentication-Results: mail.freebsd.systems; dmarc=none header.from=wasikowski.net Authentication-Results: mail.freebsd.systems; spf=pass smtp.mailfrom=lukasz@wasikowski.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wasikowski.net; s=default; t=1497003339; bh=P0fCTh/j5/9ezO5OhyVPNavpQDH7D3EX3jh0ECLKOfI=; h=To:Cc:References:From:Date:In-Reply-To; b=G+9HUMWiyUP7N7IwIPpvBFgal4x3GdMuRT5UzfLG+cEKfXC7ly37Rhka/gnmOrBfz 95S577a6ByRnGMSYbEkCpZQEe5R7ILgQt5NMcNoypeYfKZkokThE9T8D201E3qJ5Nc lMTq/AFvxKqgK2WuQTKRi37m5pVeKE2m70QW03iPcZTGZNQVsMVfZScTJMhAB4AX8i JxPo2pt/1k4to0RFiJU131JCNYEH6XDLorBvuoTRX30sO/roJzWQIJs0WXTYkX+V/P att9MKNyX0m+UKHSYxPxFnzh0cRME5nmtx9Vv1YBZaHY+WRo9C60fpjmYB4+ssVb38 oXZey/t6CJ5EA== Subject: Re: Problem with zpool remove of log device To: Stephen McKay Cc: freebsd-fs@freebsd.org References: <9188a169-cd81-f64d-6b9e-0e3c6b4af1bb@wasikowski.net> <0410af$1dldvp4@ipmail04.adl6.internode.on.net> <4df1ea6d-148e-f3ab-d204-9277c513a468@wasikowski.net> <0fc687$sij78n@ipmail05.adl6.internode.on.net> From: =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= Message-ID: Date: Fri, 9 Jun 2017 12:15:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <0fc687$sij78n@ipmail05.adl6.internode.on.net> Content-Type: text/plain; charset=utf-8 Content-Language: pl Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2017 10:15:42 -0000 W dniu 2017-06-09 o 05:18, Stephen McKay pisze: > On Wednesday, 7th June 2017, =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= wrote: > >> W dniu 2017-06-07 o 10:21, Stephen McKay pisze: >> >>> On Friday, 26th May 2017, lukasz@wasikowski.net wrote: >>> >>>> I cant remove log device from pool - operation ends ok, but log device >>>> is still in the pool (bug?). > >>> Does your system still write to the log? Use "zfs iostat -v 1" to >>> check. I think it is probably no longer be in use and only the final >>> disconnection failed. >> >> zpool iostat -v 1 shows no activity on the log drive. I tried to remove >> it after booting to livecd - no luck. > > I hope I haven't mislead you there (more than misspelling zpool, that is). > > In normal operation the log is idle unless there are synchronous writes > to log. So, to be sure your log is active, use something like this (within > the target pool) to generate sync writes: > > while : > do > date > foo > fsync foo > done > > With this running, my system does 600 writes per second to the log > according to zpool iostat. That drops to zero once I kill the script. Zero, so no writes to log are performed during execution of this script. >>> I had this problem when I tried to remove a log mirror from a pool >>> I have been using for years. I solved it by tweaking the zfsonlinux >>> hack a bit and slotting it into 9.3. >> >> Thank you for this info. It seems that it's no longer an issue for me - >> this box will be soon retired. I'll move some data from it and wipe it down. > > If you are feeling public spirited this is an ideal opportunity to check > the theory against reality. I'm curious about how widespread this accounting > bug is, so if you can keep the machine intact for a while after it has > been decommissioned, you could build a patched kernel and try to remove the > log again. All it would cost in this case is a little time. I applied this patch to 11.1-PRERELASE, nothing changed. Still zpool remove exits with errcode 0, but log device is still attached to pool. -- Z poważaniem, Łukasz Wąsikowski