From owner-freebsd-fs@freebsd.org Fri Jun 9 03:18:14 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 82EE3D89AE1 for ; Fri, 9 Jun 2017 03:18:14 +0000 (UTC) (envelope-from mckay@freebsd.org) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id D5D897BDE6; Fri, 9 Jun 2017 03:18:13 +0000 (UTC) (envelope-from mckay@freebsd.org) Message-Id: <0fc687$sij78n@ipmail05.adl6.internode.on.net> X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ApKgAOEjpZ/7u1Ag5eHAEBBAEBCgEBgmtuUoEdg3SKYSqQeYMikmCCEYYeBAICgnpCFgECAQEBAQEBAWsohRgBAQEBAgEjMyMQCAMYAgImAgI5HgYTiiMHsSiCJotrAQEIAoExiiI0h3wSgk8BBIlGiEqMLKVBlGgmBiuBCoEBCIdnLjaJSgECAw Received: from ppp14-2-181-187.bras1.hba2.internode.on.net (HELO localhost) ([14.2.181.187]) by ipmail05.adl6.internode.on.net with ESMTP; 09 Jun 2017 12:48:05 +0930 Content-Type: text/plain; charset=UTF-8 From: Stephen McKay To: =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= cc: Stephen McKay , freebsd-fs@freebsd.org Subject: Re: Problem with zpool remove of log device References: <9188a169-cd81-f64d-6b9e-0e3c6b4af1bb@wasikowski.net> <0410af$1dldvp4@ipmail04.adl6.internode.on.net><4df1ea6d-148e-f3ab-d204-9277c513a468@wasikowski.net> In-Reply-To: <4df1ea6d-148e-f3ab-d204-9277c513a468@wasikowski.net> from =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= at "Wed, 07 Jun 2017 12:56:30 +0200" Date: Fri, 09 Jun 2017 13:18:04 +1000 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 03:18:14 -0000 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. >> 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. Cheers, Stephen.