[OpenIndiana-discuss] removing a disk after a replace

Peter Tribble peter.tribble at gmail.com
Thu Nov 7 09:51:50 UTC 2013


On Thu, Nov 7, 2013 at 9:31 AM, Laurent Blume <laurent+oi at elanor.org> wrote:

> On 07/11/13 10:21, Peter Tribble wrote:
>
>> No, detach is the appropriate option here. It's a little whacky,
>> but you're operating on the replacing vdev which is essentially a
>> mirror and you want to detach one component of it.
>>
>
> Really? And that works using nas as the pool name? Or do you tell it to
> use that replacing vdev? I've not seen that use so far. When replacing a
> disk that has been removed already, I don't see how that's a mirror, since
> the new disk must be reconstructed from the rest of the raidz, not from the
> removed disk. I find it confusing as hell, and redundant with the use of
> replace.
>

Yes, really. And on the pool, it will find the appropriate device and vdev
on its own. Normally, you don't need to do this, because zfs should
detach the replaced drive without intervention as soon as the resilver
finishes. But often it doesn't, and you have to manually detach the
replaced drive.

Note that I said essentially a mirror - it should contain identical data
to the old drive (modulo the fact that data has been modified since),
it's not going to be a real mirror obviously. It's not redundant with
replace, because replace initiates a resilver. As for remove vs detach,
the way I think about this is that remove works at the pool level,
whereas detach works at the vdev level, although given that they do
work at different layers I can't really see why they need to have
different names.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/


More information about the OpenIndiana-discuss mailing list