]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - share/man/man4/geom_fox.4
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.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 January 2, 2005
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 The intent of the
50 .Nm
51 framework is to provide basic multipathing support to access direct
52 access devices.
53 Basic in the above sentence should be read as:
54 .Nm
55 only provides path failover functionality, not load balancing over
56 the available paths etc.
57 Using suitable hardware like SCSI or FibreChannel disks it is
58 possible to have multiple (typically 2) host bus adapters access
59 the same physical disk drive.
60 .Pp
61 Without a multipathing driver the
62 .Fx
63 kernel would probe the disks multiple times, resulting in the creation of
64 multiple
65 .Pa /dev
66 entries for the same underlying physical device.
67 A unique label written in the GEOM label area allows
68 .Nm
69 to detect multiple paths.
70 Using this information it creates a unique
71 .Pa da#.fox
72 device.
73 .Pp
74 The
75 .Nm
76 device is subsequently used by the
77 .Fx
78 kernel to access the disks.
79 Multiple physical access paths ensure that even in case of a path failure the
80 .Fx
81 kernel can continue to access the data.
82 .Pp
83 The
84 .Nm
85 driver will disallow write operations to the underlying devices once the
86 fox device has been opened for writing.
87 .Sh EXAMPLES
88 .Bl -bullet -compact
89 .It
90 .Nm
91 needs a label on the disk as follows in order to work properly:
92 .Bd -literal
93 "0123456789abcdef0123456789abcdef"
94 "GEOM::FOX       <--unique--id-->"
95 .Ed
96 .Pp
97 For the unique ID 16 bytes are available.
98 The
99 .Dq Li GEOM::FOX
100 is the magic to mark a
101 .Nm
102 device.
103 .Pp
104 The actual labelling is accomplished by
105 .Bd -literal
106 echo "GEOM::FOX       someid" | dd of=/dev/da2 conv=sync
107 .Ed
108 .Pp
109 For FibreChannel devices it is suggested to use the Node World Wide
110 Name (Node WWN) as this is guaranteed by the FibreChannel standard to
111 be worldwide unique.
112 The use of the Port WWN not recommended as each port of a given
113 device has a different WWN, thereby confusing things.
114 .Pp
115 The Node WWN can be obtained from a verbose boot as in for example
116 .Bd -literal
117 isp1: Target 1 (Loop 0x1) Port ID 0xe8 (role Target) Arrived
118  Port WWN 0x21000004cfc8aca2
119  Node WWN 0x20000004cfc8aca2
120 .Ed
121 .Pp
122 This Node WWN would then be used like so:
123 .Bd -literal
124 echo "GEOM::FOX       20000004cfc8aca2" | dd of=/dev/da2 conv=sync
125 .Ed
126 .Pp
127 For non-FibreChannel devices you could for example use the serial
128 number of the device.
129 Regardless of what you use, make sure the label is unique.
130 .Pp
131 Once the labelling has been performed and assuming the
132 .Nm
133 module is loaded the kernel will inform you that it has found a new
134 .Nm
135 device with a message similar to
136 .Bd -literal
137 Creating new fox (da2)
138 fox da2.fox lock 0xfffffc0000fdba20
139 .Ed
140 .Pp
141 .It
142 To check which physical devices match a given
143 .Nm
144 device:
145 .Bd -literal -offset indent
146 # geom fox list
147 Geom name: da2.fox
148 Providers:
149 1. Name: da2.fox
150    Mediasize: 73407865344 (68G)
151    Sectorsize: 512
152    Mode: r0w0e0
153 Consumers:
154 1. Name: da2
155    Mediasize: 73407865856 (68G)
156    Sectorsize: 512
157    Mode: r0w0e0
158 2. Name: da6
159    Mediasize: 73407865856 (68G)
160    Sectorsize: 512
161    Mode: r0w0e0
162 .Ed
163 .Pp
164 .It
165 To check the status of the
166 .Nm
167 components:
168 .Bd -literal
169 # geom fox status
170    Name  Status  Components
171 da2.fox     N/A  da2
172                  da6
173 .Ed
174 .El
175 .Sh SEE ALSO
176 .Xr GEOM 4 ,
177 .Xr geom 8 ,
178 .Xr gmultipath 8
179 .Sh AUTHORS
180 .An -nosplit
181 The
182 .Nm
183 driver was written by
184 .An "Poul-Henning Kamp" Aq phk@FreeBSD.org .
185 This manual page was written by
186 .An "Wilko Bulte" Aq wilko@FreeBSD.org .
187 .Sh CAVEATS
188 The
189 .Nm
190 driver depends on the underlying hardware drivers to do the right thing in case
191 of a path failure.
192 If for example a hardware driver continues to retry forever,
193 .Nm
194 is not able to re-initiate the I/O to an alternative physical path.
195 .Pp
196 You have to be very sure to provide a unique label for each of the
197 .Nm
198 devices.
199 Safety belts are not provided.
200 For FibreChannel devices it is suggested to use the Port WWN of the device.
201 The World Wide Name is guaranteed to be worldwide unique per the
202 FibreChannel standard.
203 .Sh BUGS
204 The
205 .Nm
206 framework has only seen light testing.
207 There definitely might be dragons here.
208 .Pp
209 The name
210 .Nm
211 is completely obscure.
212 Just remember that any sly fox has multiple exits from its hole.
213 .Pp
214 The examples provided are too FibreChannel-centric.