Skip to content

Commit eebb775

Browse files
committed
Add patch to fix path in man/zfs_prepare_disk.8
Signed-off-by: Shengqi Chen <[email protected]>
1 parent a4558c1 commit eebb775

File tree

2 files changed

+167
-0
lines changed

2 files changed

+167
-0
lines changed
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
--- a/man/Makefile.am
2+
+++ b/man/Makefile.am
3+
@@ -62,7 +62,6 @@
4+
%D%/man8/zfs-userspace.8 \
5+
%D%/man8/zfs-wait.8 \
6+
%D%/man8/zfs_ids_to_path.8 \
7+
- %D%/man8/zfs_prepare_disk.8 \
8+
%D%/man8/zgenhostid.8 \
9+
%D%/man8/zinject.8 \
10+
%D%/man8/zpool.8 \
11+
@@ -115,7 +114,8 @@
12+
13+
nodist_man_MANS = \
14+
%D%/man8/zed.8 \
15+
- %D%/man8/zfs-mount-generator.8
16+
+ %D%/man8/zfs-mount-generator.8 \
17+
+ %D%/man8/zfs_prepare_disk.8
18+
19+
dist_noinst_DATA += $(dist_noinst_man_MANS) $(dist_man_MANS)
20+
21+
--- a/man/man8/zfs_prepare_disk.8
22+
+++ /dev/null
23+
@@ -1,70 +0,0 @@
24+
-.\"
25+
-.\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
26+
-.\" Copyright (C) 2023 Lawrence Livermore National Security, LLC.
27+
-.\" Refer to the OpenZFS git commit log for authoritative copyright attribution.
28+
-.\"
29+
-.\" The contents of this file are subject to the terms of the
30+
-.\" Common Development and Distribution License Version 1.0 (CDDL-1.0).
31+
-.\" You can obtain a copy of the license from the top-level file
32+
-.\" "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
33+
-.\" You may not use this file except in compliance with the license.
34+
-.\"
35+
-.\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049)
36+
-.\"
37+
-.Dd August 30, 2023
38+
-.Dt ZFS_PREPARE_DISK 8
39+
-.Os
40+
-.
41+
-.Sh NAME
42+
-.Nm zfs_prepare_disk
43+
-.Nd special script that gets run before bringing a disk into a pool
44+
-.Sh DESCRIPTION
45+
-.Nm
46+
-is an optional script that gets called by libzfs before bringing a disk into a
47+
-pool.
48+
-It can be modified by the user to run whatever commands are necessary to prepare
49+
-a disk for inclusion into the pool.
50+
-For example, users can add lines to
51+
-.Nm zfs_prepare_disk
52+
-to do things like update the drive's firmware or check the drive's health.
53+
-.Nm zfs_prepare_disk
54+
-is optional and can be removed if not needed.
55+
-libzfs will look for the script at /zfs_prepare_disk.
56+
-.
57+
-.Ss Properties
58+
-.Nm zfs_prepare_disk
59+
-will be passed the following environment variables:
60+
-.sp
61+
-.Bl -tag -compact -width "VDEV_ENC_SYSFS_PATH"
62+
-.
63+
-.It Nm POOL_NAME
64+
-.No Name of the pool
65+
-.It Nm VDEV_PATH
66+
-.No Path to the disk (like /dev/sda)
67+
-.It Nm VDEV_PREPARE
68+
-.No Reason why the disk is being prepared for inclusion
69+
-('create', 'add', 'replace', or 'autoreplace').
70+
-This can be useful if you only want the script to be run under certain actions.
71+
-.It Nm VDEV_UPATH
72+
-.No Path to one of the underlying devices for the
73+
-disk.
74+
-For multipath this would return one of the /dev/sd* paths to the disk.
75+
-If the device is not a device mapper device, then
76+
-.Nm VDEV_UPATH
77+
-just returns the same value as
78+
-.Nm VDEV_PATH
79+
-.It Nm VDEV_ENC_SYSFS_PATH
80+
-.No Path to the disk's enclosure sysfs path, if available
81+
-.El
82+
-.Pp
83+
-Note that some of these variables may have a blank value.
84+
-.Nm POOL_NAME
85+
-is blank at pool creation time, for example.
86+
-.Sh ENVIRONMENT
87+
-.Nm zfs_prepare_disk
88+
-runs with a limited $PATH.
89+
-.Sh EXIT STATUS
90+
-.Nm zfs_prepare_disk
91+
-should return 0 on success, non-zero otherwise.
92+
-If non-zero is returned, the disk will not be included in the pool.
93+
-.
94+
--- /dev/null
95+
+++ b/man/man8/zfs_prepare_disk.8.in
96+
@@ -0,0 +1,70 @@
97+
+.\"
98+
+.\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
99+
+.\" Copyright (C) 2023 Lawrence Livermore National Security, LLC.
100+
+.\" Refer to the OpenZFS git commit log for authoritative copyright attribution.
101+
+.\"
102+
+.\" The contents of this file are subject to the terms of the
103+
+.\" Common Development and Distribution License Version 1.0 (CDDL-1.0).
104+
+.\" You can obtain a copy of the license from the top-level file
105+
+.\" "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
106+
+.\" You may not use this file except in compliance with the license.
107+
+.\"
108+
+.\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049)
109+
+.\"
110+
+.Dd August 30, 2023
111+
+.Dt ZFS_PREPARE_DISK 8
112+
+.Os
113+
+.
114+
+.Sh NAME
115+
+.Nm zfs_prepare_disk
116+
+.Nd special script that gets run before bringing a disk into a pool
117+
+.Sh DESCRIPTION
118+
+.Nm
119+
+is an optional script that gets called by libzfs before bringing a disk into a
120+
+pool.
121+
+It can be modified by the user to run whatever commands are necessary to prepare
122+
+a disk for inclusion into the pool.
123+
+For example, users can add lines to
124+
+.Nm zfs_prepare_disk
125+
+to do things like update the drive's firmware or check the drive's health.
126+
+.Nm zfs_prepare_disk
127+
+is optional and can be removed if not needed.
128+
+libzfs will look for the script at @zfsexecdir@/zfs_prepare_disk.
129+
+.
130+
+.Ss Properties
131+
+.Nm zfs_prepare_disk
132+
+will be passed the following environment variables:
133+
+.sp
134+
+.Bl -tag -compact -width "VDEV_ENC_SYSFS_PATH"
135+
+.
136+
+.It Nm POOL_NAME
137+
+.No Name of the pool
138+
+.It Nm VDEV_PATH
139+
+.No Path to the disk (like /dev/sda)
140+
+.It Nm VDEV_PREPARE
141+
+.No Reason why the disk is being prepared for inclusion
142+
+('create', 'add', 'replace', or 'autoreplace').
143+
+This can be useful if you only want the script to be run under certain actions.
144+
+.It Nm VDEV_UPATH
145+
+.No Path to one of the underlying devices for the
146+
+disk.
147+
+For multipath this would return one of the /dev/sd* paths to the disk.
148+
+If the device is not a device mapper device, then
149+
+.Nm VDEV_UPATH
150+
+just returns the same value as
151+
+.Nm VDEV_PATH
152+
+.It Nm VDEV_ENC_SYSFS_PATH
153+
+.No Path to the disk's enclosure sysfs path, if available
154+
+.El
155+
+.Pp
156+
+Note that some of these variables may have a blank value.
157+
+.Nm POOL_NAME
158+
+is blank at pool creation time, for example.
159+
+.Sh ENVIRONMENT
160+
+.Nm zfs_prepare_disk
161+
+runs with a limited $PATH.
162+
+.Sh EXIT STATUS
163+
+.Nm zfs_prepare_disk
164+
+should return 0 on success, non-zero otherwise.
165+
+If non-zero is returned, the disk will not be included in the pool.
166+
+.

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ ubuntu/zfs-mount-container-start.patch
2121
#ubuntu/4510-silently-ignore-modprobe-failure.patch
2222
#ubuntu/4751-suppress-types.patch
2323
fix-icp-sha2-on-armel.patch
24+
fix-manpage-build-for-zfs_prepare_disk.patch

0 commit comments

Comments
 (0)