]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/geom_fox.4
sys/{x86,amd64}: remove one of doubled ;s
[FreeBSD/FreeBSD.git] / share / man / man4 / geom_fox.4
1 .\"
2 .\" Copyright (c) 2006 Wilko Bulte
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd September 12, 2015
29 .Dt GEOM_FOX 4
30 .Os
31 .Sh NAME
32 .Nm geom_fox
33 .Nd "GEOM based basic disk multipathing"
34 .Sh SYNOPSIS
35 To compile this driver into the kernel,
36 place the following line in your
37 kernel configuration file:
38 .Bd -ragged -offset indent
39 .Cd "options GEOM_FOX"
40 .Ed
41 .Pp
42 Alternatively, to load the driver as a
43 module at boot time, place the following line in
44 .Xr loader.conf 5 :
45 .Bd -literal -offset indent
46 geom_fox_load="YES"
47 .Ed
48 .Sh DESCRIPTION
49 .Bf -symbolic
50 This driver is obsolete.
51 Users are advised to use
52 .Xr gmultipath 8
53 instead.
54 This driver will be removed in
55 .Fx 12 .
56 .Ef
57 .Pp
58 The intent of the
59 .Nm
60 framework is to provide basic multipathing support to access direct
61 access devices.
62 Basic in the above sentence should be read as:
63 .Nm
64 only provides path failover functionality, not load balancing over
65 the available paths etc.
66 Using suitable hardware like SCSI or FibreChannel disks it is
67 possible to have multiple (typically 2) host bus adapters access
68 the same physical disk drive.
69 .Pp
70 Without a multipathing driver the
71 .Fx
72 kernel would probe the disks multiple times, resulting in the creation of
73 multiple
74 .Pa /dev
75 entries for the same underlying physical device.
76 A unique label written in the GEOM label area allows
77 .Nm
78 to detect multiple paths.
79 Using this information it creates a unique
80 .Pa da#.fox
81 device.
82 .Pp
83 The
84 .Nm
85 device is subsequently used by the
86 .Fx
87 kernel to access the disks.
88 Multiple physical access paths ensure that even in case of a path failure the
89 .Fx
90 kernel can continue to access the data.
91 .Pp
92 The
93 .Nm
94 driver will disallow write operations to the underlying devices once the
95 fox device has been opened for writing.
96 .Sh EXAMPLES
97 .Bl -bullet -compact
98 .It
99 .Nm
100 needs a label on the disk as follows in order to work properly:
101 .Bd -literal
102 "0123456789abcdef0123456789abcdef"
103 "GEOM::FOX       <--unique--id-->"
104 .Ed
105 .Pp
106 For the unique ID 16 bytes are available.
107 The
108 .Dq Li GEOM::FOX
109 is the magic to mark a
110 .Nm
111 device.
112 .Pp
113 The actual labelling is accomplished by
114 .Bd -literal
115 echo "GEOM::FOX       someid" | dd of=/dev/da2 conv=sync
116 .Ed
117 .Pp
118 For FibreChannel devices it is suggested to use the Node World Wide
119 Name (Node WWN) as this is guaranteed by the FibreChannel standard to
120 be worldwide unique.
121 The use of the Port WWN not recommended as each port of a given
122 device has a different WWN, thereby confusing things.
123 .Pp
124 The Node WWN can be obtained from a verbose boot as in for example
125 .Bd -literal
126 isp1: Target 1 (Loop 0x1) Port ID 0xe8 (role Target) Arrived
127  Port WWN 0x21000004cfc8aca2
128  Node WWN 0x20000004cfc8aca2
129 .Ed
130 .Pp
131 This Node WWN would then be used like so:
132 .Bd -literal
133 echo "GEOM::FOX       20000004cfc8aca2" | dd of=/dev/da2 conv=sync
134 .Ed
135 .Pp
136 For non-FibreChannel devices you could for example use the serial
137 number of the device.
138 Regardless of what you use, make sure the label is unique.
139 .Pp
140 Once the labelling has been performed and assuming the
141 .Nm
142 module is loaded the kernel will inform you that it has found a new
143 .Nm
144 device with a message similar to
145 .Bd -literal
146 Creating new fox (da2)
147 fox da2.fox lock 0xfffffc0000fdba20
148 .Ed
149 .Pp
150 .It
151 To check which physical devices match a given
152 .Nm
153 device:
154 .Bd -literal -offset indent
155 # geom fox list
156 Geom name: da2.fox
157 Providers:
158 1. Name: da2.fox
159    Mediasize: 73407865344 (68G)
160    Sectorsize: 512
161    Mode: r0w0e0
162 Consumers:
163 1. Name: da2
164    Mediasize: 73407865856 (68G)
165    Sectorsize: 512
166    Mode: r0w0e0
167 2. Name: da6
168    Mediasize: 73407865856 (68G)
169    Sectorsize: 512
170    Mode: r0w0e0
171 .Ed
172 .Pp
173 .It
174 To check the status of the
175 .Nm
176 components:
177 .Bd -literal
178 # geom fox status
179    Name  Status  Components
180 da2.fox     N/A  da2
181                  da6
182 .Ed
183 .El
184 .Sh SEE ALSO
185 .Xr GEOM 4 ,
186 .Xr geom 8 ,
187 .Xr gmultipath 8
188 .Sh AUTHORS
189 .An -nosplit
190 The
191 .Nm
192 driver was written by
193 .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
194 This manual page was written by
195 .An Wilko Bulte Aq Mt wilko@FreeBSD.org .
196 .Sh CAVEATS
197 The
198 .Nm
199 driver depends on the underlying hardware drivers to do the right thing in case
200 of a path failure.
201 If for example a hardware driver continues to retry forever,
202 .Nm
203 is not able to re-initiate the I/O to an alternative physical path.
204 .Pp
205 You have to be very sure to provide a unique label for each of the
206 .Nm
207 devices.
208 Safety belts are not provided.
209 For FibreChannel devices it is suggested to use the Port WWN of the device.
210 The World Wide Name is guaranteed to be worldwide unique per the
211 FibreChannel standard.
212 .Sh BUGS
213 The
214 .Nm
215 framework has only seen light testing.
216 There definitely might be dragons here.
217 .Pp
218 The name
219 .Nm
220 is completely obscure.
221 Just remember that any sly fox has multiple exits from its hole.
222 .Pp
223 The examples provided are too FibreChannel-centric.