1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" CDDL HEADER START 3eda14cbcSMatt Macy.\" 4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7eda14cbcSMatt Macy.\" 8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11eda14cbcSMatt Macy.\" and limitations under the License. 12eda14cbcSMatt Macy.\" 13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18eda14cbcSMatt Macy.\" 19eda14cbcSMatt Macy.\" CDDL HEADER END 20eda14cbcSMatt Macy.\" 21eda14cbcSMatt Macy.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved. 22eda14cbcSMatt Macy.\" 2316038816SMartin Matuska.\" lint-ok: WARNING: sections out of conventional order: Sh SYNOPSIS 2416038816SMartin Matuska.\" 2516038816SMartin Matuska.Dd May 26, 2021 2616038816SMartin Matuska.Dt ZHACK 1 2716038816SMartin Matuska.Os 2816038816SMartin Matuska. 2916038816SMartin Matuska.Sh NAME 3016038816SMartin Matuska.Nm zhack 3116038816SMartin Matuska.Nd libzpool debugging tool 3216038816SMartin Matuska.Sh DESCRIPTION 33eda14cbcSMatt MacyThis utility pokes configuration changes directly into a ZFS pool, 34eda14cbcSMatt Macywhich is dangerous and can cause data corruption. 3516038816SMartin Matuska.Sh SYNOPSIS 3616038816SMartin Matuska.Bl -tag -width Ds 3716038816SMartin Matuska.It Xo 3816038816SMartin Matuska.Nm zhack 3916038816SMartin Matuska.Cm feature stat 4016038816SMartin Matuska.Ar pool 4116038816SMartin Matuska.Xc 42eda14cbcSMatt MacyList feature flags. 4316038816SMartin Matuska. 4416038816SMartin Matuska.It Xo 4516038816SMartin Matuska.Nm zhack 4616038816SMartin Matuska.Cm feature enable 4716038816SMartin Matuska.Op Fl d Ar description 4816038816SMartin Matuska.Op Fl r 4916038816SMartin Matuska.Ar pool 5016038816SMartin Matuska.Ar guid 5116038816SMartin Matuska.Xc 5216038816SMartin MatuskaAdd a new feature to 5316038816SMartin Matuska.Ar pool 5416038816SMartin Matuskathat is uniquely identified by 5516038816SMartin Matuska.Ar guid , 5616038816SMartin Matuskawhich is specified in the same form as a 5716038816SMartin Matuska.Xr zfs 8 5816038816SMartin Matuskauser property. 5916038816SMartin Matuska.Pp 6016038816SMartin MatuskaThe 6116038816SMartin Matuska.Ar description 6216038816SMartin Matuskais a short human readable explanation of the new feature. 6316038816SMartin Matuska.Pp 6416038816SMartin MatuskaThe 6516038816SMartin Matuska.Fl r 6616038816SMartin Matuskaflag indicates that 6716038816SMartin Matuska.Ar pool 6816038816SMartin Matuskacan be safely opened in read-only mode by a system that does not understand the 6916038816SMartin Matuska.Ar guid 70eda14cbcSMatt Macyfeature. 7116038816SMartin Matuska. 7216038816SMartin Matuska.It Xo 7316038816SMartin Matuska.Nm zhack 7416038816SMartin Matuska.Cm feature ref 7516038816SMartin Matuska.Op Fl d Ns | Ns Fl m 7616038816SMartin Matuska.Ar pool 7716038816SMartin Matuska.Ar guid 7816038816SMartin Matuska.Xc 7916038816SMartin MatuskaIncrement the reference count of the 8016038816SMartin Matuska.Ar guid 8116038816SMartin Matuskafeature in 8216038816SMartin Matuska.Ar pool . 8316038816SMartin Matuska.Pp 8416038816SMartin MatuskaThe 8516038816SMartin Matuska.Fl d 8616038816SMartin Matuskaflag decrements the reference count of the 8716038816SMartin Matuska.Ar guid 8816038816SMartin Matuskafeature in 8916038816SMartin Matuska.Ar pool 9016038816SMartin Matuskainstead. 9116038816SMartin Matuska.Pp 9216038816SMartin MatuskaThe 9316038816SMartin Matuska.Fl m 9416038816SMartin Matuskaflag indicates that the 9516038816SMartin Matuska.Ar guid 9616038816SMartin Matuskafeature is now required to read the pool MOS. 97*dae17134SMartin Matuska. 98*dae17134SMartin Matuska.It Xo 99*dae17134SMartin Matuska.Nm zhack 100*dae17134SMartin Matuska.Cm label repair 101*dae17134SMartin Matuska.Ar device 102*dae17134SMartin Matuska.Xc 103*dae17134SMartin MatuskaRepair corrupted labels by rewriting the checksum using the presumed valid contents of the label. 10416038816SMartin Matuska.El 10516038816SMartin Matuska. 10616038816SMartin Matuska.Sh GLOBAL OPTIONS 10716038816SMartin MatuskaThe following can be passed to all 10816038816SMartin Matuska.Nm 10916038816SMartin Matuskainvocations before any subcommand: 11016038816SMartin Matuska.Bl -tag -width "-d dir" 11116038816SMartin Matuska.It Fl c Ar cachefile 11216038816SMartin MatuskaRead 11316038816SMartin Matuska.Ar pool 11416038816SMartin Matuskaconfiguration from the 11516038816SMartin Matuska.Ar cachefile , 11616038816SMartin Matuskawhich is 11716038816SMartin Matuska.Pa /etc/zfs/zpool.cache 11816038816SMartin Matuskaby default. 11916038816SMartin Matuska.It Fl d Ar dir 12016038816SMartin MatuskaSearch for 12116038816SMartin Matuska.Ar pool 12216038816SMartin Matuskamembers in 12316038816SMartin Matuska.Ar dir . 12416038816SMartin MatuskaCan be specified more than once. 12516038816SMartin Matuska.El 12616038816SMartin Matuska. 12716038816SMartin Matuska.Sh EXAMPLES 12816038816SMartin Matuska.Bd -literal 1293ff01b23SMartin Matuska.No # Nm zhack Cm feature stat Ar tank 130eda14cbcSMatt Macyfor_read_obj: 131eda14cbcSMatt Macy org.illumos:lz4_compress = 0 132eda14cbcSMatt Macyfor_write_obj: 133eda14cbcSMatt Macy com.delphix:async_destroy = 0 134eda14cbcSMatt Macy com.delphix:empty_bpobj = 0 135eda14cbcSMatt Macydescriptions_obj: 136eda14cbcSMatt Macy com.delphix:async_destroy = Destroy filesystems asynchronously. 137eda14cbcSMatt Macy com.delphix:empty_bpobj = Snapshots use less space. 138eda14cbcSMatt Macy org.illumos:lz4_compress = LZ4 compression algorithm support. 13916038816SMartin Matuska 1403ff01b23SMartin Matuska.No # Nm zhack Cm feature enable Fl d No 'Predict future disk failures.' Ar tank com.example:clairvoyance 1413ff01b23SMartin Matuska.No # Nm zhack Cm feature ref Ar tank com.example:clairvoyance 14216038816SMartin Matuska.Ed 14316038816SMartin Matuska. 14416038816SMartin Matuska.Sh SEE ALSO 14516038816SMartin Matuska.Xr ztest 1 , 1463ff01b23SMartin Matuska.Xr zpool-features 7 , 14716038816SMartin Matuska.Xr zfs 8 148