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