zfs/man/man1
buzzingwires a46001adb9
Allow zhack label repair to restore detached devices.
This commit expands on the zhack label repair command in d04b5c9 by
adding the -u option to undetach a device by regenerating uberblocks,
in addition to the existing functionality of fixing checksums, now
represented by -c. Previous behavior is retained in the case of no
options.

The changes are heavily inspired by Jeff Bonwick's labelfix
utility, as archived at:

https://gist.github.com/jjwhitney/baaa63144da89726e482

Additionally, it is now capable of properly determining the size of
block devices and other media, as well as handling sizes which are
not divisible by 2^18. This should make it viable for use on physical
devices and partitions, in addition to files.

These changes should make it possible to import zpools that have had
their uberblocks erased, such as in the case of pools rendered
inaccessible by erroneous detach commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: buzzingwires <buzzingwires@outlook.com>
Closes #14773
2023-05-03 09:03:57 -07:00
..
arcstat.1 Update arc_summary and arcstat outputs 2023-01-05 09:29:13 -08:00
cstyle.1 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
raidz_test.1 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
test-runner.1 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zhack.1 Allow zhack label repair to restore detached devices. 2023-05-03 09:03:57 -07:00
ztest.1 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zvol_wait.1 Lint most manpages 2021-06-04 12:48:31 -07:00