diff --git a/man/man1/arcstat.1 b/man/man1/arcstat.1 index a0240e40e4b8..a69cd8937bdf 100644 --- a/man/man1/arcstat.1 +++ b/man/man1/arcstat.1 @@ -1,182 +1,184 @@ .\" .\" This file and its contents are supplied under the terms of the .\" Common Development and Distribution License ("CDDL"), version 1.0. .\" You may only use this file in accordance with the terms of version .\" 1.0 of the CDDL. .\" .\" A full copy of the text of the CDDL should have accompanied this .\" source. A copy of the CDDL is also available via the Internet at .\" http://www.illumos.org/license/CDDL. .\" .\" Copyright 2014 Adam Stevko. All rights reserved. .\" Copyright (c) 2015 by Delphix. All rights reserved. .\" Copyright (c) 2020 by AJ Jordan. All rights reserved. .\" .Dd May 26, 2021 .Dt ARCSTAT 1 .Os . .Sh NAME .Nm arcstat .Nd report ZFS ARC and L2ARC statistics .Sh SYNOPSIS .Nm .Op Fl havxp -.Op Fl f Ar field Ns Op , Ns Ar field Ns ... +.Op Fl f Ar field Ns Op , Ns Ar field Ns … .Op Fl o Ar file .Op Fl s Ar string .Op Ar interval .Op Ar count . .Sh DESCRIPTION .Nm prints various ZFS ARC and L2ARC statistics in vmstat-like fashion: -.Bl -tag -width "l2asize" +.Bl -tag -compact -offset Ds -width "l2asize" .It Sy c ARC target size .It Sy dh% Demand data hit percentage .It Sy dm% Demand data miss percentage .It Sy mfu MFU list hits per second .It Sy mh% Metadata hit percentage .It Sy mm% Metadata miss percentage .It Sy mru MRU list hits per second .It Sy ph% Prefetch hits percentage .It Sy pm% Prefetch miss percentage .It Sy dhit Demand data hits per second .It Sy dmis Demand data misses per second .It Sy hit% ARC hit percentage .It Sy hits ARC reads per second .It Sy mfug MFU ghost list hits per second .It Sy mhit Metadata hits per second .It Sy miss ARC misses per second .It Sy mmis Metadata misses per second .It Sy mrug MRU ghost list hits per second .It Sy phit Prefetch hits per second .It Sy pmis Prefetch misses per second .It Sy read Total ARC accesses per second .It Sy time Current time .It Sy size ARC size .It Sy arcsz Alias for .Sy size .It Sy dread Demand data accesses per second .It Sy eskip evict_skip per second .It Sy miss% ARC miss percentage .It Sy mread Metadata accesses per second .It Sy pread Prefetch accesses per second .It Sy l2hit% L2ARC access hit percentage .It Sy l2hits L2ARC hits per second .It Sy l2miss L2ARC misses per second .It Sy l2read Total L2ARC accesses per second .It Sy l2pref L2ARC prefetch allocated size per second .It Sy l2pref% L2ARC prefetch allocated size percentage .It Sy l2mfu L2ARC MFU allocated size per second .It Sy l2mfu% L2ARC MFU allocated size percentage .It Sy l2mru L2ARC MRU allocated size per second .It Sy l2mru% L2ARC MRU allocated size percentage .It Sy l2data L2ARC data (buf content) allocated size per second .It Sy l2data% L2ARC data (buf content) allocated size percentage .It Sy l2meta L2ARC metadata (buf content) allocated size per second .It Sy l2meta% L2ARC metadata (buf content) allocated size percentage .It Sy l2size Size of the L2ARC .It Sy mtxmis mutex_miss per second .It Sy l2bytes Bytes read per second from the L2ARC .It Sy l2miss% L2ARC access miss percentage .It Sy l2asize Actual (compressed) size of the L2ARC .It Sy grow ARC grow disabled .It Sy need ARC reclaim needed .It Sy free The ARC's idea of how much free memory there is, which includes evictable memory in the page cache. Since the ARC tries to keep .Sy avail above zero, .Sy avail is usually more instructive to observe than .Sy free . .It Sy avail The ARC's idea of how much free memory is available to it, which is a bit less than .Sy free . May temporarily be negative, in which case the ARC will reduce the target size .Sy c . .El . .Sh OPTIONS .Bl -tag -width "-v" .It Fl a Print all possible stats. .It Fl f Display only specific fields. See -.Sy DESCRIPTION +.Sx DESCRIPTION for supported statistics. .It Fl h Display help message. .It Fl o Report statistics to a file instead of the standard output. .It Fl p Disable auto-scaling of numerical fields (for raw, machine-parsable values). .It Fl s Display data with a specified separator (default: 2 spaces). .It Fl x -Print extended stats (same as -.Fl f Ar time,mfu,mru,mfug,mrug,eskip,mtxmis,dread,pread,read Ns No ). +Print extended stats +.Pq same as Fl f Sy time , Ns Sy mfu , Ns Sy mru , Ns Sy mfug , Ns Sy mrug , Ns Sy eskip , Ns Sy mtxmis , Ns Sy dread , Ns Sy pread , Ns Sy read . .It Fl v Show field headers and definitions .El . .Sh OPERANDS The following operands are supported: -.Bl -tag -width "interval" +.Bl -tag -compact -offset Ds -width "interval" .It Ar interval Specify the sampling interval in seconds. .It Ar count -Display only \fIcount\fR reports. +Display only +.Ar count +reports. .El diff --git a/man/man1/cstyle.1 b/man/man1/cstyle.1 index 16f47ba35c1f..f5f9ec78f827 100644 --- a/man/man1/cstyle.1 +++ b/man/man1/cstyle.1 @@ -1,161 +1,160 @@ .\" Copyright 2009 Sun Microsystems, Inc. All rights reserved. .\" Use is subject to license terms. .\" .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" CDDL HEADER END .\" .Dd May 26, 2021 .Dt CSTYLE 1 .Os . .Sh NAME .Nm cstyle .Nd check for some common stylistic errors in C source files .Sh SYNOPSIS .Nm .Op Fl chpvCP .Op Fl o Ar construct Ns Op , Ns Ar construct Ns … -.Op Ar file… +.Oo Ar file Oc Ns … .Sh DESCRIPTION .Nm inspects C source files (*.c and *.h) for common stylistic errors. It attempts to check for the cstyle documented in .Lk http://www.cis.upenn.edu/~lee/06cse480/data/cstyle.ms.pdf . Note that there is much in that document that .Em cannot be checked for; just because your code is .Nm Ns -clean does not mean that you've followed Sun's C style. .Em Caveat emptor . . .Sh OPTIONS The following options are supported: .Bl -tag -width "-c" .It Fl c Check continuation line indentation inside of functions. Sun's C style states that all statements must be indented to an appropriate tab stop, and any continuation lines after them must be indented .Em exactly four spaces from the start line. This option enables a series of checks designed to find continuation line problems within functions only. The checks have some limitations; see .Sy CONTINUATION CHECKING , below. .It Fl h Performs heuristic checks that are sometimes wrong. Not generally used. .It Fl p Performs some of the more picky checks. Includes ANSI .Sy #else and .Sy #endif rules, and tries to detect spaces after casts. Used as part of the putback checks. .It Fl v Verbose output; includes the text of the line of error, and, for .Fl c , the first statement in the current continuation block. .It Fl C Ignore errors in header comments (i.e. block comments starting in the first column). Not generally used. .It Fl P Check for use of non-POSIX types. Historically, types like .Sy u_int and .Sy u_long were used, but they are now deprecated in favor of the POSIX types .Sy uint_t , .Sy ulong_t , etc. This detects any use of the deprecated types. Used as part of the putback checks. .It Fl o Ar construct Ns Op , Ns Ar construct Ns … Available constructs include: .Bl -tag -compact -width "doxygen" .It Sy doxygen Allow doxygen-style block comments .Pq Sy /** No and Sy /*!\& . .It Sy splint Allow splint-style lint comments -.Pq Sy /*@...@*/ . +.Pq Sy /*@ Ns ... Ns Sy @*/ . .El .El . .Sh CONTINUATION CHECKING The continuation checker is a reasonably simple state machine that knows something about how C is laid out, and can match parenthesis, etc. over multiple lines. It does have some limitations: .Bl -enum .It Preprocessor macros which cause unmatched parenthesis will confuse the checker for that line. To fix this, you'll need to make sure that each branch of the .Sy #if statement has balanced parenthesis. .It Some .Xr cpp 1 -macros do not require \fB;\fPs after them. +macros do not require +.Sy ;\& Ns s after them. Any such macros .Em must be ALL_CAPS; any lower case letters will cause bad output. .Pp -The bad output will generally be corrected after the next \fB;\fP, -.Sy { , -or -.Sy } . +The bad output will generally be corrected after the next +.Sy ;\& , { , No or Sy } . .El Some continuation error messages deserve some additional explanation: .Bl -tag -width Ds .It Sy multiple statements continued over multiple lines A multi-line statement which is not broken at statement boundaries. For example: -.Bd -literal +.Bd -literal -compact -offset Ds if (this_is_a_long_variable == another_variable) a = b + c; .Ed .Pp Will trigger this error. Instead, do: -.Bd -literal +.Bd -literal -compact -offset Ds if (this_is_a_long_variable == another_variable) a = b + c; .Ed .It Sy empty if/for/while body not on its own line For visibility, empty bodies for if, for, and while statements should be on their own line. For example: -.Bd -literal +.Bd -literal -compact -offset Ds while (do_something(&x) == 0); .Ed .Pp Will trigger this error. Instead, do: -.Bd -literal +.Bd -literal -compact -offset Ds while (do_something(&x) == 0) ; .Ed .El diff --git a/man/man1/raidz_test.1 b/man/man1/raidz_test.1 index 1c61c7a8772b..4283a4b527f3 100644 --- a/man/man1/raidz_test.1 +++ b/man/man1/raidz_test.1 @@ -1,101 +1,101 @@ .\" .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" CDDL HEADER END .\" .\" Copyright (c) 2016 Gvozden Nešković. All rights reserved. .\" .Dd May 26, 2021 .Dt RAIDZ_TEST 1 .Os . .Sh NAME .Nm raidz_test .Nd raidz implementation verification and benchmarking tool .Sh SYNOPSIS .Nm .Op Fl StBevTD .Op Fl a Ar ashift .Op Fl o Ar zio_off_shift .Op Fl d Ar raidz_data_disks .Op Fl s Ar zio_size_shift .Op Fl r Ar reflow_offset . .Sh DESCRIPTION The purpose of this tool is to run all supported raidz implementation and verify the results of all methods. It also contains a parameter sweep option where all parameters affecting a RAIDZ block are verified (like ashift size, data offset, data size, etc.). The tool also supports a benchmarking mode using the .Fl B option. . .Sh OPTION .Bl -tag -width "-B(enchmark)" .It Fl h Print a help summary. -.It Fl a Ar ashift No (default: Sy 9 ) +.It Fl a Ar ashift Pq default: Sy 9 Ashift value. -.It Fl o Ar zio_off_shift No (default: Sy 0 ) +.It Fl o Ar zio_off_shift Pq default: Sy 0 ZIO offset for each raidz block. The offset's value is -.Sy 1 << zio_off_shift . -.It Fl d Ar raidz_data_disks No (default: Sy 8 ) +.Em 2^zio_off_shift . +.It Fl d Ar raidz_data_disks Pq default: Sy 8 Number of raidz data disks to use. Additional disks will be used for parity. -.It Fl s Ar zio_size_shift No (default: Sy 19 ) +.It Fl s Ar zio_size_shift Pq default: Sy 19 Size of data for raidz block. The real size is -.Sy 1 << zio_size_shift . -.It Fl r Ar reflow_offset No (default: Sy uint max ) +.Em 2^zio_size_shift . +.It Fl r Ar reflow_offset Pq default: Sy uint max Set raidz expansion offset. The expanded raidz map allocation function will produce different map configurations depending on this value. -.It Fl S Ns No (weep) +.It Fl S Ns Pq weep Sweep parameter space while verifying the raidz implementations. This option will exhaust all most of valid values for the .Fl aods options. Runtime using this option will be long. -.It Fl t Ns No (imeout) +.It Fl t Ns Pq imeout Wall time for sweep test in seconds. The actual runtime could be longer. -.It Fl B Ns No (enchmark) +.It Fl B Ns Pq enchmark All implementations are benchmarked using increasing per disk data size. Results are given as throughput per disk, measured in MiB/s. -.It Fl e Ns No (xpansion) +.It Fl e Ns Pq xpansion Use expanded raidz map allocation function. -.It Fl v Ns No (erbose) +.It Fl v Ns Pq erbose Increase verbosity. -.It Fl T Ns No (est the test) +.It Fl T Ns Pq est the test Debugging option: fail all tests. This is to check if tests would properly verify bit-exactness. -.It Fl D Ns No (ebug) +.It Fl D Ns Pq ebug Debugging option: attach .Xr gdb 1 when .Sy SIGSEGV or .Sy SIGABRT are received. .El . .Sh "SEE ALSO" .Xr ztest 1 diff --git a/man/man1/zhack.1 b/man/man1/zhack.1 index b18b3a4c0996..83046ee8f515 100644 --- a/man/man1/zhack.1 +++ b/man/man1/zhack.1 @@ -1,142 +1,140 @@ .\" .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" CDDL HEADER END .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" .\" lint-ok: WARNING: sections out of conventional order: Sh SYNOPSIS .\" .Dd May 26, 2021 .Dt ZHACK 1 .Os . .Sh NAME .Nm zhack .Nd libzpool debugging tool .Sh DESCRIPTION This utility pokes configuration changes directly into a ZFS pool, which is dangerous and can cause data corruption. .Sh SYNOPSIS .Bl -tag -width Ds .It Xo .Nm zhack .Cm feature stat .Ar pool .Xc List feature flags. . .It Xo .Nm zhack .Cm feature enable .Op Fl d Ar description .Op Fl r .Ar pool .Ar guid .Xc Add a new feature to .Ar pool that is uniquely identified by .Ar guid , which is specified in the same form as a .Xr zfs 8 user property. .Pp The .Ar description is a short human readable explanation of the new feature. .Pp The .Fl r flag indicates that .Ar pool can be safely opened in read-only mode by a system that does not understand the .Ar guid feature. . .It Xo .Nm zhack .Cm feature ref .Op Fl d Ns | Ns Fl m .Ar pool .Ar guid .Xc Increment the reference count of the .Ar guid feature in .Ar pool . .Pp The .Fl d flag decrements the reference count of the .Ar guid feature in .Ar pool instead. .Pp The .Fl m flag indicates that the .Ar guid feature is now required to read the pool MOS. .El . .Sh GLOBAL OPTIONS The following can be passed to all .Nm invocations before any subcommand: .Bl -tag -width "-d dir" .It Fl c Ar cachefile Read .Ar pool configuration from the .Ar cachefile , which is .Pa /etc/zfs/zpool.cache by default. .It Fl d Ar dir Search for .Ar pool members in .Ar dir . Can be specified more than once. .El . .Sh EXAMPLES .Bd -literal -# zhack feature stat tank +.No # Nm zhack Cm feature stat Ar tank for_read_obj: org.illumos:lz4_compress = 0 for_write_obj: com.delphix:async_destroy = 0 com.delphix:empty_bpobj = 0 descriptions_obj: com.delphix:async_destroy = Destroy filesystems asynchronously. com.delphix:empty_bpobj = Snapshots use less space. org.illumos:lz4_compress = LZ4 compression algorithm support. -# zhack feature enable -d 'Predict future disk failures.' \\ - tank com.example:clairvoyance - -# zhack feature ref tank com.example:clairvoyance +.No # Nm zhack Cm feature enable Fl d No 'Predict future disk failures.' Ar tank com.example:clairvoyance +.No # Nm zhack Cm feature ref Ar tank com.example:clairvoyance .Ed . .Sh SEE ALSO .Xr ztest 1 , .Xr zpool-features 7 , .Xr zfs 8 diff --git a/man/man5/vdev_id.conf.5 b/man/man5/vdev_id.conf.5 index 1268114bdbc6..a2d38add4ee0 100644 --- a/man/man5/vdev_id.conf.5 +++ b/man/man5/vdev_id.conf.5 @@ -1,251 +1,249 @@ .\" .\" This file and its contents are supplied under the terms of the .\" Common Development and Distribution License ("CDDL"), version 1.0. .\" You may only use this file in accordance with the terms of version .\" 1.0 of the CDDL. .\" .\" A full copy of the text of the CDDL should have accompanied this .\" source. A copy of the CDDL is also available via the Internet at .\" http://www.illumos.org/license/CDDL. .\" .Dd May 26, 2021 .Dt VDEV_ID.CONF 5 .Os . .Sh NAME .Nm vdev_id.conf -.Nd Configuration file for vdev_id +.Nd configuration file for vdev_id(8) .Sh DESCRIPTION .Nm is the configuration file for -.Nm vdev_id Ns Sy (8) . +.Xr vdev_id 8 . It controls the default behavior of -.Nm vdev_id Ns Sy (8) +.Xr vdev_id 8 while it is mapping a disk device name to an alias. .Pp The .Nm file uses a simple format consisting of a keyword followed by one or more values on a single line. Any line not beginning with a recognized keyword is ignored. Comments may optionally begin with a hash character. .Pp The following keywords and values are used. .Bl -tag -width "-h" .It Sy alias Ar name Ar devlink Maps a device link in the .Pa /dev directory hierarchy to a new device name. The udev rule defining the device link must have run prior to -.Nm vdev_id Ns Sy (8) . +.Xr vdev_id 8 . A defined alias takes precedence over a topology-derived name, but the two naming methods can otherwise coexist. For example, one might name drives in a JBOD with the .Sy sas_direct topology while naming an internal L2ARC device with an alias. .Pp .Ar name is the name of the link to the device that will by created under .Pa /dev/disk/by-vdev . .Pp .Ar devlink is the name of the device link that has already been defined by udev. This may be an absolute path or the base filename. . .It Sy channel [ Ns Ar pci_slot ] Ar port Ar name Maps a physical path to a channel name (typically representing a single disk enclosure). . .It Sy enclosure_symlinks Sy yes Ns | Ns Sy no Additionally create .Pa /dev/by-enclosure symlinks to the disk enclosure .Em sg devices using the naming scheme from .Pa vdev_id.conf . .Sy enclosure_symlinks is only allowed for .Sy sas_direct mode. . .It Sy enclosure_symlinks_prefix Ar prefix Specify the prefix for the enclosure symlinks in the form .Pa /dev/by-enclosure/ Ns Ao Ar prefix Ac Ns - Ns Ao Ar channel Ac Ns Aq Ar num .Pp Defaults to .Dq Em enc . . .It Sy slot Ar prefix Ar new Op Ar channel Maps a disk slot number as reported by the operating system to an alternative slot number. If the .Ar channel parameter is specified then the mapping is only applied to slots in the named channel, otherwise the mapping is applied to all channels. The first-specified .Ar slot rule that can match a slot takes precedence. Therefore a channel-specific mapping for a given slot should generally appear before a generic mapping for the same slot. In this way a custom mapping may be applied to a particular channel and a default mapping applied to the others. . .It Sy multipath Sy yes Ns | Ns Sy no Specifies whether -.Nm vdev_id Ns Sy (8) +.Xr vdev_id 8 will handle only dm-multipath devices. If set to .Sy yes then -.Nm vdev_id Ns Sy (8) +.Xr vdev_id 8 will examine the first running component disk of a dm-multipath device as provided by the driver command to determine the physical path. . .It Sy topology Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi Identifies a physical topology that governs how physical paths are mapped to channels: .Bl -tag -compact -width "sas_direct and scsi" .It Sy sas_direct No and Sy scsi channels are uniquely identified by a PCI slot and HBA port number .It Sy sas_switch channels are uniquely identified by a SAS switch port number .El . .It Sy phys_per_port Ar num Specifies the number of PHY devices associated with a SAS HBA port or SAS switch port. -.Nm vdev_id Ns Sy (8) +.Xr vdev_id 8 internally uses this value to determine which HBA or switch port a device is connected to. The default is .Sy 4 . . .It Sy slot Sy bay Ns | Ns Sy phy Ns | Ns Sy port Ns | Ns Sy id Ns | Ns Sy lun Ns | Ns Sy ses Specifies from which element of a SAS identifier the slot number is taken. The default is .Sy bay : .Bl -tag -compact -width "port" .It Sy bay read the slot number from the bay identifier. .It Sy phy read the slot number from the phy identifier. .It Sy port use the SAS port as the slot number. .It Sy id use the scsi id as the slot number. .It Sy lun use the scsi lun as the slot number. .It Sy ses use the SCSI Enclosure Services (SES) enclosure device slot number, as reported by .Xr sg_ses 8 . Intended for use only on systems where .Sy bay is unsupported, noting that .Sy port and .Sy id may be unstable across disk replacement. .El .El . .Sh FILES .Bl -tag -width "-v v" .It Pa /etc/zfs/vdev_id.conf The configuration file for -.Nm vdev_id Ns Sy (8) . +.Xr vdev_id 8 . .El . .Sh EXAMPLES A non-multipath configuration with direct-attached SAS enclosures and an arbitrary slot re-mapping: -.Bd -literal -offset Ds +.Bd -literal -compact -offset Ds multipath no topology sas_direct phys_per_port 4 slot bay # PCI_SLOT HBA PORT CHANNEL NAME channel 85:00.0 1 A channel 85:00.0 0 B channel 86:00.0 1 C channel 86:00.0 0 D # Custom mapping for Channel A # Linux Mapped # Slot Slot Channel slot 1 7 A slot 2 10 A slot 3 3 A slot 4 6 A # Default mapping for B, C, and D slot 1 4 slot 2 2 slot 3 1 slot 4 3 .Ed .Pp A SAS-switch topology. Note, that the .Ar channel -keyword takes only two arguments in this example. -.Bd -literal -offset Ds +keyword takes only two arguments in this example: +.Bd -literal -compact -offset Ds topology sas_switch # SWITCH PORT CHANNEL NAME channel 1 A channel 2 B channel 3 C channel 4 D .Ed .Pp A multipath configuration. -Note that channel names have multiple -definitions - one per physical path. -.Bd -literal -offset Ds +Note that channel names have multiple definitions - one per physical path: +.Bd -literal -compact -offset Ds multipath yes # PCI_SLOT HBA PORT CHANNEL NAME channel 85:00.0 1 A channel 85:00.0 0 B channel 86:00.0 1 A channel 86:00.0 0 B .Ed .Pp -A configuration with enclosure_symlinks enabled. -.Bd -literal -offset Ds +A configuration with enclosure_symlinks enabled: +.Bd -literal -compact -offset Ds multipath yes enclosure_symlinks yes # PCI_ID HBA PORT CHANNEL NAME channel 05:00.0 1 U channel 05:00.0 0 L channel 06:00.0 1 U channel 06:00.0 0 L .Ed -.Pp In addition to the disks symlinks, this configuration will create: -.Bd -literal -offset Ds +.Bd -literal -compact -offset Ds /dev/by-enclosure/enc-L0 /dev/by-enclosure/enc-L1 /dev/by-enclosure/enc-U0 /dev/by-enclosure/enc-U1 .Ed .Pp -A configuration using device link aliases. -.Bd -literal -offset Ds +A configuration using device link aliases: +.Bd -literal -compact -offset Ds # by-vdev # name fully qualified or base name of device link alias d1 /dev/disk/by-id/wwn-0x5000c5002de3b9ca alias d2 wwn-0x5000c5002def789e .Ed . .Sh SEE ALSO .Xr vdev_id 8 diff --git a/man/man8/fsck.zfs.8 b/man/man8/fsck.zfs.8 index b88dd847b1bb..0ce7576ebe63 100644 --- a/man/man8/fsck.zfs.8 +++ b/man/man8/fsck.zfs.8 @@ -1,73 +1,77 @@ .\" .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" CDDL HEADER END .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" .Dd May 26, 2021 .Dt FSCK.ZFS 8 .Os . .Sh NAME .Nm fsck.zfs .Nd dummy ZFS filesystem checker .Sh SYNOPSIS .Nm .Op Ar options .Ar dataset Ns No … . .Sh DESCRIPTION .Nm is a thin shell wrapper that at most checks the status of a dataset's container pool. It is installed by OpenZFS because some Linux distributions expect a fsck helper for all filesystems. .Pp If more than one .Ar dataset is specified, each is checked in turn and the results binary-ored. . .Sh OPTIONS Ignored. . .Sh NOTES ZFS datasets are checked by running .Nm zpool Cm scrub on the containing pool. An individual ZFS dataset is never checked independently of its pool, which is unlike a regular filesystem. .Pp However, the .Xr fsck 8 interface still allows it to communicate some errors: if the .Ar dataset is in a degraded pool, then .Nm -will return exit code 4 to indicate an uncorrected filesystem error. +will return exit code +.Sy 4 +to indicate an uncorrected filesystem error. .Pp Similarly, if the .Ar dataset is in a faulted pool and has a legacy .Pa /etc/fstab record, then .Nm -will return exit code 8 to indicate a fatal operational error. +will return exit code +.Sy 8 +to indicate a fatal operational error. .Sh SEE ALSO .Xr fstab 5 , .Xr fsck 8 , .Xr zpool-scrub 8 diff --git a/man/man8/zed.8.in b/man/man8/zed.8.in index b0b26bfcf8e2..d3297605206e 100644 --- a/man/man8/zed.8.in +++ b/man/man8/zed.8.in @@ -1,255 +1,255 @@ .\" .\" This file is part of the ZFS Event Daemon (ZED). .\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). .\" Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. .\" Refer to the OpenZFS git commit log for authoritative copyright attribution. .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License Version 1.0 (CDDL-1.0). .\" You can obtain a copy of the license from the top-level file .\" "OPENSOLARIS.LICENSE" or at . .\" You may not use this file except in compliance with the license. .\" .\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049) .\" .Dd May 26, 2021 .Dt ZED 8 .Os . .Sh NAME .Nm ZED .Nd ZFS Event Daemon .Sh SYNOPSIS .Nm .Op Fl fFhILMvVZ .Op Fl d Ar zedletdir .Op Fl p Ar pidfile .Op Fl P Ar path .Op Fl s Ar statefile .Op Fl j Ar jobs . .Sh DESCRIPTION The .Nm (ZFS Event Daemon) monitors events generated by the ZFS kernel module. When a zevent (ZFS Event) is posted, the .Nm will run any ZEDLETs (ZFS Event Daemon Linkage for Executable Tasks) that have been enabled for the corresponding zevent class. . .Sh OPTIONS .Bl -tag -width "-h" .It Fl h Display a summary of the command-line options. .It Fl L Display license information. .It Fl V Display version information. .It Fl v Be verbose. .It Fl f Force the daemon to run if at all possible, disabling security checks and throwing caution to the wind. Not recommended for use in production. .It Fl F Don't daemonise: remain attached to the controlling terminal, log to the standard I/O streams. .It Fl M Lock all current and future pages in the virtual memory address space. This may help the daemon remain responsive when the system is under heavy memory pressure. .It Fl I Request that the daemon idle rather than exit when the kernel modules are not loaded. Processing of events will start, or resume, when the kernel modules are (re)loaded. Under Linux the kernel modules cannot be unloaded while the daemon is running. .It Fl Z Zero the daemon's state, thereby allowing zevents still within the kernel to be reprocessed. .It Fl d Ar zedletdir Read the enabled ZEDLETs from the specified directory. .It Fl p Ar pidfile Write the daemon's process ID to the specified file. .It Fl P Ar path Custom .Ev $PATH for zedlets to use. Normally zedlets run in a locked-down environment, with hardcoded paths to the ZFS commands .Pq Ev $ZFS , $ZPOOL , $ZED , ... , and a hard-coded .Ev $PATH . This is done for security reasons. However, the ZFS test suite uses a custom PATH for its ZFS commands, and passes it to .Nm with .Fl P . In short, .Fl P is only to be used by the ZFS test suite; never use it in production! .It Fl s Ar statefile Write the daemon's state to the specified file. .It Fl j Ar jobs Allow at most .Ar jobs ZEDLETs to run concurrently, delaying execution of new ones until they finish. Defaults to .Sy 16 . .El .Sh ZEVENTS A zevent is comprised of a list of nvpairs (name/value pairs). Each zevent contains an EID (Event IDentifier) that uniquely identifies it throughout the lifetime of the loaded ZFS kernel module; this EID is a monotonically increasing integer that resets to 1 each time the kernel module is loaded. Each zevent also contains a class string that identifies the type of event. For brevity, a subclass string is defined that omits the leading components of the class string. Additional nvpairs exist to provide event details. .Pp The kernel maintains a list of recent zevents that can be viewed (along with their associated lists of nvpairs) using the .Nm zpool Cm events Fl v command. . .Sh CONFIGURATION ZEDLETs to be invoked in response to zevents are located in the .Em enabled-zedlets directory .Pq Ar zedletdir . These can be symlinked or copied from the .Em installed-zedlets directory; symlinks allow for automatic updates from the installed ZEDLETs, whereas copies preserve local modifications. As a security measure, since ownership change is a privileged operation, ZEDLETs must be owned by root. They must have execute permissions for the user, but they must not have write permissions for group or other. Dotfiles are ignored. .Pp ZEDLETs are named after the zevent class for which they should be invoked. In particular, a ZEDLET will be invoked for a given zevent if either its class or subclass string is a prefix of its filename (and is followed by a non-alphabetic character). As a special case, the prefix .Sy all matches all zevents. Multiple ZEDLETs may be invoked for a given zevent. . .Sh ZEDLETS ZEDLETs are executables invoked by the ZED in response to a given zevent. They should be written under the presumption they can be invoked concurrently, and they should use appropriate locking to access any shared resources. Common variables used by ZEDLETs can be stored in the default rc file which is sourced by scripts; these variables should be prefixed with .Sy ZED_ . .Pp The zevent nvpairs are passed to ZEDLETs as environment variables. Each nvpair name is converted to an environment variable in the following manner: -.Bl -enum +.Bl -enum -compact .It it is prefixed with .Sy ZEVENT_ , .It it is converted to uppercase, and .It each non-alphanumeric character is converted to an underscore. .El .Pp Some additional environment variables have been defined to present certain nvpair values in a more convenient form. An incomplete list of zevent environment variables is as follows: -.Bl -tag -width "ZEVENT_TIME_STRING" +.Bl -tag -compact -width "ZEVENT_TIME_STRING" .It Sy ZEVENT_EID The Event IDentifier. .It Sy ZEVENT_CLASS The zevent class string. .It Sy ZEVENT_SUBCLASS The zevent subclass string. .It Sy ZEVENT_TIME The time at which the zevent was posted as .Dq Em seconds nanoseconds since the Epoch. .It Sy ZEVENT_TIME_SECS The .Em seconds component of .Sy ZEVENT_TIME . .It Sy ZEVENT_TIME_NSECS The .Em nanoseconds component of .Sy ZEVENT_TIME . .It Sy ZEVENT_TIME_STRING An almost-RFC3339-compliant string for .Sy ZEVENT_TIME . .El .Pp Additionally, the following ZED & ZFS variables are defined: -.Bl -tag -width "ZEVENT_TIME_STRING" +.Bl -tag -compact -width "ZEVENT_TIME_STRING" .It Sy ZED_PID The daemon's process ID. .It Sy ZED_ZEDLET_DIR The daemon's current .Em enabled-zedlets directory. .It Sy ZFS_ALIAS The alias .Pq Dq Em name Ns - Ns Em version Ns - Ns Em release string of the ZFS distribution the daemon is part of. .It Sy ZFS_VERSION The ZFS version the daemon is part of. .It Sy ZFS_RELEASE The ZFS release the daemon is part of. .El .Pp ZEDLETs may need to call other ZFS commands. The installation paths of the following executables are defined as environment variables: .Sy ZDB , .Sy ZED , .Sy ZFS , .Sy ZINJECT , and .Sy ZPOOL . These variables may be overridden in the rc file. . .Sh FILES .Bl -tag -width "-c" .It Pa @sysconfdir@/zfs/zed.d The default directory for enabled ZEDLETs. .It Pa @sysconfdir@/zfs/zed.d/zed.rc The default rc file for common variables used by ZEDLETs. .It Pa @zfsexecdir@/zed.d The default directory for installed ZEDLETs. .It Pa @runstatedir@/zed.pid The default file containing the daemon's process ID. .It Pa @runstatedir@/zed.state The default file containing the daemon's state. .El . .Sh SIGNALS .Bl -tag -width "-c" .It Sy SIGHUP Reconfigure the daemon and rescan the directory for enabled ZEDLETs. .It Sy SIGTERM , SIGINT Terminate the daemon. .El . .Sh SEE ALSO .Xr zfs 8 , .Xr zpool 8 , .Xr zpool-events 8 . .Sh NOTES The .Nm requires root privileges. .Pp Do not taunt the .Nm . . .Sh BUGS ZEDLETs are unable to return state/status information to the kernel. .Pp Internationalization support via gettext has not been added. diff --git a/man/man8/zpool_influxdb.8 b/man/man8/zpool_influxdb.8 index a4e417078fd3..021fbdeaac8a 100644 --- a/man/man8/zpool_influxdb.8 +++ b/man/man8/zpool_influxdb.8 @@ -1,98 +1,98 @@ .\" .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at .\" https://opensource.org/licenses/CDDL-1.0 .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" CDDL HEADER END .\" .\" Copyright 2020 Richard Elling .\" .Dd May 26, 2021 .Dt ZPOOL_INFLUXDB 8 .Os . .Sh NAME .Nm zpool_influxdb .Nd collect ZFS pool statistics in InfluxDB line protocol format .Sh SYNOPSIS .Nm .Op Fl e Ns | Ns Fl -execd .Op Fl n Ns | Ns Fl -no-histogram .Op Fl s Ns | Ns Fl -sum-histogram-buckets -.Op Fl t Ns | Ns Fl -tags Ar key Ns = Ns Ar value Ns Op , Ns Ar key Ns = Ns Ar value Ns … +.Op Fl t Ns | Ns Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns … .Op Ar pool . .Sh DESCRIPTION .Nm produces InfluxDB-line-protocol-compatible metrics from zpools. Like the .Nm zpool command, .Nm reads the current pool status and statistics. Unlike the .Nm zpool command which is intended for humans, .Nm formats the output in the InfluxDB line protocol. The expected use is as a plugin to a metrics collector or aggregator, such as Telegraf. .Pp By default, .Nm prints pool metrics and status in the InfluxDB line protocol format. All pools are printed, similar to the .Nm zpool Cm status command. Providing a pool name restricts the output to the named pool. . .Sh OPTIONS .Bl -tag -width "-e, --execd" .It Fl e , -execd Run in daemon mode compatible with Telegraf's .Nm execd plugin. In this mode, the pools are sampled every time a newline appears on the standard input. .It Fl n , -no-histogram Do not print latency and I/O size histograms. This can reduce the total amount of data, but one should consider the value brought by the insights that latency and I/O size distributions provide. The resulting values are suitable for graphing with Grafana's heatmap plugin. .It Fl s , -sum-histogram-buckets Accumulates bucket values. By default, the values are not accumulated and the raw data appears as shown by .Nm zpool Cm iostat . This works well for Grafana's heatmap plugin. Summing the buckets produces output similar to Prometheus histograms. -.It Fl t , Fl -tags Ar key Ns = Ns Ar value Ns Op , Ns Ar key Ns = Ns Ar value Ns … +.It Fl t , Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns … Adds specified tags to the tag set. No sanity checking is performed. See the InfluxDB Line Protocol format documentation for details on escaping special characters used in tags. .It Fl h , -help Print a usage summary. .El . .Sh SEE ALSO .Xr zpool-iostat 8 , .Xr zpool-status 8 , .Lk https://github.com/influxdata/influxdb "InfluxDB" , .Lk https://github.com/influxdata/telegraf "Telegraf" , .Lk https://grafana.com "Grafana" , .Lk https://prometheus.io "Prometheus"