Problem with zpool remove of log device

Łukasz Wąsikowski lukasz at wasikowski.net
Fri Jun 9 10:15:42 UTC 2017


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 at 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


More information about the freebsd-fs mailing list