Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2017 12:56:30 +0200
From:      =?UTF-8?Q?=c5=81ukasz_W=c4=85sikowski?= <lukasz@wasikowski.net>
To:        Stephen McKay <mckay@FreeBSD.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Problem with zpool remove of log device
Message-ID:  <4df1ea6d-148e-f3ab-d204-9277c513a468@wasikowski.net>
In-Reply-To: <0410af$1dldvp4@ipmail04.adl6.internode.on.net>
References:  <9188a169-cd81-f64d-6b9e-0e3c6b4af1bb@wasikowski.net> <0410af$1dldvp4@ipmail04.adl6.internode.on.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4df1ea6d-148e-f3ab-d204-9277c513a468>