From owner-freebsd-fs@freebsd.org Fri May 26 15:36:23 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 8FBC2D831BC for ; Fri, 26 May 2017 15:36:23 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49E161932 for ; Fri, 26 May 2017 15:36:23 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-qk0-x233.google.com with SMTP id y201so10179979qka.0 for ; Fri, 26 May 2017 08:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ErIrClBfxw+c4bE0AWwtunBMT2Py5ZCbL6yW/yOSktI=; b=IntaYE/3je0DGCMyjdOJpSs7dDkKo/cKI3mOtsk51S0+yv7gg+euaIcNHU9Z1b2QtS 1H1J2ebcJ6SefZ3wLjwPCKA3ly7YcWAcIdn8E9nKtUGITyTePgZVNMjpSe4sZB4sDuw8 XWjYQI1Ns8J+lXSqwO4w+fVWOtVKxhunHUkn+M5GP3GNzLo2ssYMGkfKQxUvbVcfswKF QNYAMDpHK6PfE+5wIX2RI0utAX+Jy2JRlvKcNz8QBOxw4U06Neq6dW5wASGNdHFIFRYf KoUyZ3FGu6J84On0CVTqrla2sIco7zmZA7UMamtQxEPwSDgWVELziIL+TY2TeJQocdhl N6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ErIrClBfxw+c4bE0AWwtunBMT2Py5ZCbL6yW/yOSktI=; b=I+LFMS6SR861u9t2/5s9pdnu96ZX3JeSguVBQ4Vc/v50SleupntcyA/tkc1negNVau VI0UNCn+d7juM1TymOsdhzpUufPFgN+V6E1KlzT7twIJavo49qwr/W9Zrixj8TsPmbHY mfaOx3+1URwa1A1HRJe3OklHg5zOUea7P3tmcwe+uFK9aWViwQ3nrt/6LCON6vYd29PR 3judBzw/ZNVDB9Tch9ROJYULnoGzTwqdlYy5sKzdkxg92WgfNN/1nCO5u+D2619+OTVC MzVVZeGJ5Tye6F0Cn89qx+SAHRLO8gW/33TiWpRaQA8fpr+VT5EdK1bmjMBSnCQtWmuL LxHA== X-Gm-Message-State: AODbwcBFI54Pb2aoKK+GCEc8B0S/2AX7WAg6Y2mO/6U+OLP1spCUw+f4 8VrkqbkzHsOBjd75zEAQQPTXX1CCfaQh X-Received: by 10.55.113.199 with SMTP id m190mr2598841qkc.176.1495812982366; Fri, 26 May 2017 08:36:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.20.206 with HTTP; Fri, 26 May 2017 08:36:21 -0700 (PDT) In-Reply-To: References: <7fc4a6f3-df1b-47b4-9399-0dd6614ddf94@email.android.com> From: Freddie Cash Date: Fri, 26 May 2017 08:36:21 -0700 Message-ID: Subject: Re: Problem with zpool remove of log device To: =?UTF-8?Q?=C5=81ukasz_W=C4=85sikowski?= Cc: =?UTF-8?Q?Karli_Sj=C3=B6berg?= , FreeBSD Filesystems Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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, 26 May 2017 15:36:23 -0000 On Fri, May 26, 2017 at 4:10 AM, =C5=81ukasz W=C4=85sikowski wrote: > W dniu 2017-05-26 o 12:46, Karli Sj=C3=B6berg pisze: > > > > > > Den 26 maj 2017 12:43 em skrev =C5=81ukasz W=C4=85sikowski >: > > > > W dniu 2017-05-26 o 12:37, Karli Sj=C3=B6berg pisze: > > > > > Den 26 maj 2017 12:30 em skrev =C5=81ukasz W=C4=85sikowski : > > > > > > W dniu 2017-05-26 o 12:20, Karli Sj=C3=B6berg pisze: > > > > > > > > > > > > Den 26 maj 2017 11:47 fm skrev =C5=81ukasz W=C4=85sikowski : > > > > > > > > Hi, > > > > > > > > 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 > > > > pool: tank > > > > state: ONLINE > > > > status: One or more devices are configured to use a non-native > block > > > > size. > > > > Expect reduced performance. > > > > action: Replace affected devices with devices that support the > > > > configured block size, or migrate data to a properly configured > > > > pool. > > > > scan: scrub repaired 0 in 22h21m with 0 errors on Thu May 25 > > > > 02:26:36 2017 > > > > config: > > > > > > > > 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 > > > > > > > > errors: No known data errors > > > > > > > > When I try to remove log device operation ends without errors: > > > > > > > > # zpool remove tank mirror-1; echo $? > > > > 0 > > > > > > > > > > > > You are missing the actual disk you want to remove from the > mirror: > > > > # zpool remove tank gpt/tankssdzil1 > > > > > > # zpool remove tank gpt/tankssdzil0 > > > cannot remove gpt/tankssdzil0: operation not supported on this ty= pe > > > of pool > > > > > > > > > Yeah, that's because you're booting off of it right? Boot from CD > or > > > whatev, should work. Or if it was the "bootfs" zpool option, can'= t > > > remember, but it's something along those lines. Really silly, but > > anyway... > > > > Yes, it's root-on-zfs. But as I said on other box with similar > > configuration it works. Strange. > > > > It's production box so boot from CD is not an easy option. I'll > check it > > during next service window. Thank you for your help. > > > > > > AFAIR you just need to null the bootfs zpool option, remove the log dis= k > > and then reset bootfs to what it was before. > > No luck. > > # zpool get bootfs > NAME PROPERTY VALUE SOURCE > tank bootfs tank/ROOTFS local > tankssd bootfs - default > > # zpool set bootfs=3D'' tank > > # zpool get bootfs tank > NAME PROPERTY VALUE SOURCE > tank bootfs - default > > # zpool remove tank mirror-1; echo $? > 0 > > # zpool status tank > pool: tank > state: ONLINE > status: One or more devices are configured to use a non-native block size= . > Expect reduced performance. > action: Replace affected devices with devices that support the > configured block size, or migrate data to a properly configured > pool. > scan: scrub repaired 0 in 22h21m with 0 errors on Thu May 25 02:26:36 > 2017 > config: > > 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 > > errors: No known data errors > > > # zpool remove tank gpt/tankssdzil0; echo $? > cannot remove gpt/tankssdzil0: operation not supported on this type of po= ol > 1 > =E2=80=8BYou have your log devices in a mirror vdev. First you need to "br= eak" the mirror: # zpool detach tank =E2=80=8Bgpt/tankssdzil1 That will make the log vdev into a single-disk vdev, and then you can remove it: # zpool remove tank =E2=80=8Bgpt/tankssdzil0 After that, you should be able to re-enable the bootfs option and reboot to make sure everything is still working. --=20 Freddie Cash fjwcash@gmail.com