[zfs-discuss] Removing log device from existing pool

Uwe Sauter uwe.sauter.de at gmail.com
Fri Dec 8 07:16:33 EST 2017


@Durval
I'm running ZFS on Gentoo, from Git HEAD from a few days ago (just for version info).

The quotation is from the zpool man page's "Intent log" section, not from one of the zpool subcommands.

But yes, you are right, "attach" and "detach" only apply to mirror sub-devices. Apologies…

@Marco
It would be beneficial if you could provide some kind of log so others can retrace exactly what you tried to do…



Am 08.12.2017 um 13:03 schrieb Durval Menezes:
> Hello Uwe,
> 
> On Fri, Dec 8, 2017 at 9:48 AM, Uwe Sauter via zfs-discuss <zfs-discuss at list.zfsonlinux.org
> <mailto:zfs-discuss at list.zfsonlinux.org>> wrote:
> 
>     Could you be a bit more specific (commands and output)? 
> 
> 
> Not sure whether you are talking to Marco or to me, but I've included everything in the github issue I mentioned in my
> last message (again: https://github.com/zfsonlinux/zfs/issues/6677) .
> 
>  
> 
>     The man page states:
> 
>          Log devices can be added, replaced, attached, detached, and imported and exported as part of the
>          larger pool.  Mirrored log devices can be removed by specifying the top-level mirror for the log.
> 
> 
> Interesting. Not sure about what man page you're referring to, but here (ZoL 0.7.3) my "man zpool" page shows the
> following:
> 
>        zpool remove pool device ...
> 
>            Removes  the  specified  device  from the pool. *This command currently only supports* removing hot spares,
> cache, *and log devices*. A
>            mirrored log device can be removed by specifying the top-level mirror for the log. Non-log devices that are
> part of a mirrored con-
>            figuration can be removed using the zpool detach command. Non-redundant and raidz devices cannot be removed
> from a pool.
> 
>  
> 
>     No mention of "removing" a log file. Why don't you try to detach the log device?
> 
> 
> Because it's not in a mirror, and the same man page above says it's just for mirrors:
> 
>        zpool detach pool device
> 
>            Detaches  device  *from  a  mirror*. The operation is refused if there are no other valid replicas of the
> data.  If device may be re-
>            added to the pool later on then consider the "zpool offline" command instead.
> 
> I just tried the 'detach' anyway and, as expected, it failed complaining the device is not in a mirror:
> 
> zpool status
>   pool: pool01
>         [...]
>         NAME                                               STATE     READ WRITE CKSUM
>         pool01                                             ONLINE       0     0     0
>           mirror-0                                         ONLINE       0     0     0
>             ata-HGST_REDACTED            ONLINE       0     0     0
>             ata-HGST_REDACTED            ONLINE       0     0     0
>         logs
>           ata-M4-CT256M4SSD3_REDACTED    ONLINE       0     0     0
> errors: No known data errors
> 
> zpool detach pool01 ata-M4-CT256M4SSD3_REDACTED
> cannot detach ata-M4-CT256M4SSD3_REDACTED: only applicable to mirror and replacing vdevs
> 
> If you need any further info, please let me know.
> 
> Cheers,
> -- 
>    Durval.
> 
>  
> 
> 
> 
>     Am 08.12.2017 um 12:45 schrieb Durval Menezes via zfs-discuss:
>     > Hello Marco,
>     >
>     > When (if) you find out, please let me know. AFAIK there's a bug in ZoL (and perhaps on FreeBSD ZFS too) that prevents
>     > log devices from being removed, so your only solution would be to re-create the pool.
>     >
>     > I have even opened a GitHub ticket for that some time ago, but so far no solution has been forthcoming:
>     > https://github.com/zfsonlinux/zfs/issues/6677 <https://github.com/zfsonlinux/zfs/issues/6677>
>     >
>     > Cheers, and good luck,
>     > --
>     >    Durval.
>     >
>     >
>     >
>     > On Fri, Dec 8, 2017 at 9:28 AM, Marco Glavas via zfs-discuss <zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>
>     > <mailto:zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>>> wrote:
>     >
>     >     Hi everybody
>     >
>     >     When I moved my pool from Linux (Ubuntu 16.04) to FreeBSD (NAS4Free), I had to leave the log partition behind
>     >     (noticed it only after the fact of course).
>     >
>     >     So the pool was in a degraded state. since NAS4free is a vm, I just added a thin provisioned disk and replaced the
>     >     faulty one. So far so good.
>     >
>     >     Only I'd like to give it another, smaller disk to use for logs. Therefore I'd like to know if it is at all possible
>     >     to remove the log partition from the pool. It is mounted as da1 at the moment and I get "pool already exists" error
>     >     when trying to remove it.
>     >
>     >     Anybody have a good idea on how to proceed?
>     >
>     >     Regards and thank you,
>     >
>     >     Marco
>     >     _______________________________________________
>     >     zfs-discuss mailing list
>     >     zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>
>     <mailto:zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>>
>     >     http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>     <http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss>
>     >     <http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>     <http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss>>
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > zfs-discuss mailing list
>     > zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>
>     > http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>     <http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss>
>     >
>     _______________________________________________
>     zfs-discuss mailing list
>     zfs-discuss at list.zfsonlinux.org <mailto:zfs-discuss at list.zfsonlinux.org>
>     http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>     <http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss>
> 
> 


More information about the zfs-discuss mailing list