Nils Goroll
2008-Aug-15 20:48 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..." ?
Hi, I thought that this question must have been answered already, but I have not found any explanations. I''m sorry in advance if this is redundant, but: Why exactly doesn''t ZFS let me detach a device from a degraded mirror? haggis:~# zpool status pool: rmirror state: DEGRADED status: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected. action: Determine if the device needs to be replaced, and clear the errors using ''zpool clear'' or replace the device with ''zpool replace''. see: http://www.sun.com/msg/ZFS-8000-9P scrub: none requested config: NAME STATE READ WRITE CKSUM rmirror DEGRADED 0 0 0 c15t0d0s0 ONLINE 0 0 0 c16t0d0s0 DEGRADED 0 0 0 too many errors errors: No known data errors haggis:~# zpool detach rmirror c16t0d0s0 cannot detach c16t0d0s0: only applicable to mirror and replacing vdevs Background: My system was crashing twice during a zpool scrub, so I thought I should avoid a third scrubbing attemt and rather detach and re-attach the mirror to achieve a full re-sync. this is snv_93 Ref: http://docs.sun.com/app/docs/doc/817-2271/gcfhe?l=en&a=view&q=%22only+applicable+to+mirror+and+replacing+vdevs%22 This message posted from opensolaris.org
Mattias Pantzare
2008-Aug-15 21:08 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..." ?
2008/8/15 Nils Goroll <nils.goroll at hamburg.de>:> Hi, > > I thought that this question must have been answered already, but I have > not found any explanations. I''m sorry in advance if this is redundant, but: > > Why exactly doesn''t ZFS let me detach a device from a degraded mirror? > > haggis:~# zpool status > pool: rmirror > state: DEGRADED > status: One or more devices has experienced an unrecoverable error. An > attempt was made to correct the error. Applications are unaffected. > action: Determine if the device needs to be replaced, and clear the errors > using ''zpool clear'' or replace the device with ''zpool replace''. > see: http://www.sun.com/msg/ZFS-8000-9P > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rmirror DEGRADED 0 0 0 > c15t0d0s0 ONLINE 0 0 0 > c16t0d0s0 DEGRADED 0 0 0 too many errors >That is not a mirror. This is an example of a mirror (3-way): NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c1d0s0 ONLINE 0 0 1 c2d0s0 ONLINE 0 0 1 c4t0d0s0 ONLINE 0 0 0
Eric Schrock
2008-Aug-15 21:14 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..." ?
The fact that it''s DEGRADED and not FAULTED indicates that it thinks the DTL (dirty time logs) for the two sides of the mirrors overlap in some way, so detaching it would result in loss of data. In the process of doing this, it seems the error message got lost, and you ended up with something completely non-sensical. If you do a ''zpool scrub'', does it complete without any errors? - Eric On Fri, Aug 15, 2008 at 01:48:48PM -0700, Nils Goroll wrote:> Hi, > > I thought that this question must have been answered already, but I have > not found any explanations. I''m sorry in advance if this is redundant, but: > > Why exactly doesn''t ZFS let me detach a device from a degraded mirror? > > haggis:~# zpool status > pool: rmirror > state: DEGRADED > status: One or more devices has experienced an unrecoverable error. An > attempt was made to correct the error. Applications are unaffected. > action: Determine if the device needs to be replaced, and clear the errors > using ''zpool clear'' or replace the device with ''zpool replace''. > see: http://www.sun.com/msg/ZFS-8000-9P > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rmirror DEGRADED 0 0 0 > c15t0d0s0 ONLINE 0 0 0 > c16t0d0s0 DEGRADED 0 0 0 too many errors > > errors: No known data errors > > haggis:~# zpool detach rmirror c16t0d0s0 > cannot detach c16t0d0s0: only applicable to mirror and replacing vdevs > > Background: My system was crashing twice during a zpool scrub, > so I thought I should avoid a third scrubbing attemt and rather detach > and re-attach the mirror to achieve a full re-sync. > > this is snv_93 > > Ref: > > http://docs.sun.com/app/docs/doc/817-2271/gcfhe?l=en&a=view&q=%22only+applicable+to+mirror+and+replacing+vdevs%22 > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Eric Schrock, Fishworks http://blogs.sun.com/eschrock
Eric Schrock
2008-Aug-15 21:17 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..." ?
On Fri, Aug 15, 2008 at 02:14:02PM -0700, Eric Schrock wrote:> The fact that it''s DEGRADED and not FAULTED indicates that it thinks the > DTL (dirty time logs) for the two sides of the mirrors overlap in some > way, so detaching it would result in loss of data. In the process of > doing this, it seems the error message got lost, and you ended up with > something completely non-sensical. If you do a ''zpool scrub'', does it > complete without any errors?Ooops, points to Mattias to paying more attention than I was :-) - Eric -- Eric Schrock, Fishworks http://blogs.sun.com/eschrock
Nils Goroll
2008-Aug-15 22:05 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..
Matthias, that does not answer my question. The question is: Why can''t I decide that I consciously want to destroy the (two way) mirror (and, yes, do away with any redundancy). Nils This message posted from opensolaris.org
Ronald Kuehn
2008-Aug-15 22:59 UTC
[zfs-discuss] zpool detach from degraded mirror : why "only applicable to mirror ..
On Saturday, August 16, 2008 at 00:05:17 CEST, Nils Goroll wrote:> Matthias, > > that does not answer my question. > > The question is: Why can''t I decide that I consciously want to destroy the (two way) > mirror (and, yes, do away with any redundancy). >Hi, this pool does not have any redundancy because it is not a mirror. Hence you can''t detach anything from it. The pool is named "rmirror". That does not make it a mirror.> NAME STATE READ WRITE CKSUM > rmirror DEGRADED 0 0 0 > c15t0d0s0 ONLINE 0 0 0 > c16t0d0s0 DEGRADED 0 0 0 too many errorsThis is an unmirrored pool consisting of two vdevs: c15t0d0s0 and c16t0d0s0. Ronald
Nils Goroll
2008-Aug-16 05:16 UTC
[zfs-discuss] Oops: zpool detach from degraded mirror "only applicable to mirror ..
Hi all, especially Matthias, I am very sorry for having bothered you with this stupid question, I am embarrassed by the fact that I did not realize it''s not a mirror. The fact that I named it "rmirror" definitely added confusion on my side. Apologies in particular for not having taken Mathias'' initial hint for what it was. By the way, I could finally scrub the pool, no problems remaining (except for the task to make it a real mirror). Thanks again, Nils This message posted from opensolaris.org