From owner-freebsd-fs@freebsd.org Wed Jun 7 10:56:35 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 943C7C0975B for ; Wed, 7 Jun 2017 10:56:35 +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 44A3D6F3DD; Wed, 7 Jun 2017 10:56:35 +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 7ABA777D; Wed, 7 Jun 2017 12:56:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at freebsd.systems Received: from mail.freebsd.systems ([5.196.167.1]) by mail.freebsd.systems (scan.freebsd.systems [5.196.167.1]) (amavisd-new, port 10026) with ESMTP id stNc5iQOyRU0; Wed, 7 Jun 2017 12:56:33 +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 7BBB777A; Wed, 7 Jun 2017 12:56:32 +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=1496832993; bh=S+OV9nAvOn+WbBQ6p4XbxgpNbjVj4gF2Ap0ZCuBkba0=; h=To:Cc:References:From:Date:In-Reply-To; b=HY7p2KoxgTX2TNsAm0eQZqzdU8RHxhVjkWevZaX9ePRVF5jHbqffkbm1ZjxTgQKup OqwJwrZS2GT63xcn7+rO8NsAKsufrCJcia6IsMjyXeZiT2nU+c52j2j9poZ/etuwuY vDIf33bVBmoDFkOOT49e3Ll/G4x39T1uzwBfQkcTX5lmO4Bb4CmBZfY4HAEDQiWYzv PbsOZodJNSQNdQcFHKnfvM9N00fG+cNRrf1HTpop7nvw9bxM1R3BdbfR8JSfdp/qwv fzZZfnnO8VuHJxD+T4BNs/0w40fUOHjSpqcGmhvrFFisCSdux3ny/7RnCwh11iXf+k XPOCtfE4P8vWA== 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> From: =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= Message-ID: <4df1ea6d-148e-f3ab-d204-9277c513a468@wasikowski.net> Date: Wed, 7 Jun 2017 12:56:30 +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: <0410af$1dldvp4@ipmail04.adl6.internode.on.net> Content-Type: text/plain; charset=utf-8 Content-Language: pl Content-Transfer-Encoding: 7bit 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: Wed, 07 Jun 2017 10:56:35 -0000 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?). >> >> # uname -a >> FreeBSD xxx.yyy.com 11.0-STABLE FreeBSD 11.0-STABLE #0 r316543: Thu Apr >> 6 08:22:43 CEST 2017 root@xxx.yyy.com:/usr/obj/usr/src/sys/YYY amd64 >> >> # zpool status tank >> [..snip..] >> >> NAME STATE READ WRITE CKSUM >> tank ONLINE 0 0 0 >> mirror-0 ONLINE 0 0 0 >> ada2p3 ONLINE 0 0 0 >> ada3p3 ONLINE 0 0 0 >> logs >> mirror-1 ONLINE 0 0 0 >> gpt/tankssdzil0 ONLINE 0 0 0 block size: 512B configured, 4096B native >> gpt/tankssdzil1 ONLINE 0 0 0 block size: 512B configured, 4096B native > >> When I try to remove log device operation ends without errors: >> >> # zpool remove tank mirror-1; echo $? >> 0 >> >> But the log device is still there: >> [..snip..] >> I'd like to remove it - how should I proceed? > > 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. > What does "zpool list -v" tell you? If you have a non-zero ALLOC > column for your log mirror and the log is no longer being used then > you may have hit an accounting bug in zfs that the zfsonlinux people > ran into a while ago. This can be it: # zpool list -v NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT tank 1.80T 1.55T 251G - 64% 86% 1.00x ONLINE - mirror 1.80T 1.55T 251G - 64% 86% ada2p3 - - - - - - ada3p3 - - - - - - log - - - - - - gpt/tankssdzil1 4.97G 142M 4.83G - 0% 2% > 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. -- best regards, Lukasz Wasikowski