diff options
Diffstat (limited to 'sbin/geom/class/multipath/gmultipath.8')
-rw-r--r-- | sbin/geom/class/multipath/gmultipath.8 | 171 |
1 files changed, 122 insertions, 49 deletions
diff --git a/sbin/geom/class/multipath/gmultipath.8 b/sbin/geom/class/multipath/gmultipath.8 index 8c354e4..a009b2b 100644 --- a/sbin/geom/class/multipath/gmultipath.8 +++ b/sbin/geom/class/multipath/gmultipath.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2007 +.Dd October 31, 2011 .Dt GMULTIPATH 8 .Os .Sh NAME @@ -32,11 +32,48 @@ .Nd "disk multipath control utility" .Sh SYNOPSIS .Nm +.Cm create +.Op Fl Av +.Ar name +.Ar prov ... +.Nm .Cm label -.Op Fl hv +.Op Fl Av .Ar name .Ar prov ... .Nm +.Cm add +.Op Fl v +.Ar name prov +.Nm +.Cm remove +.Op Fl v +.Ar name prov +.Nm +.Cm fail +.Op Fl v +.Ar name prov +.Nm +.Cm restore +.Op Fl v +.Ar name prov +.Nm +.Cm rotate +.Op Fl v +.Ar name +.Nm +.Cm getactive +.Op Fl v +.Ar name +.Nm +.Cm destroy +.Op Fl v +.Ar name +.Nm +.Cm stop +.Op Fl v +.Ar name +.Nm .Cm clear .Op Fl v .Ar prov ... @@ -53,27 +90,79 @@ The .Nm utility is used for device multipath configuration. .Pp -Only automatic configuration is supported at the present time via the -.Cm label -command. -This operation writes a label on the last sector of the underlying -disk device with a contained name and UUID. -The UUID guarantees uniqueness -in a shared storage environment but is in general too cumbersome to use. +The multipath device can be configured using two different methods: +.Dq manual +or +.Dq automatic . +When using the +.Dq manual +method, no metadata are stored on the devices, so the multipath +device has to be configured by hand every time it is needed. +Additional device paths also won't be detected automatically. +The +.Dq automatic +method uses on-disk metadata to detect device and all it's paths. +Metadata use the last sector of the underlying disk device and +include device name and UUID. +The UUID guarantees uniqueness in a shared storage environment +but is in general too cumbersome to use. The name is what is exported via the device interface. .Pp The first argument to .Nm indicates an action to be performed: .Bl -tag -width ".Cm destroy" +.It Cm create +Create multipath device with +.Dq manual +method without writing any on-disk metadata. +It is up to administrator, how to properly identify device paths. +Kernel will only check that all given providers have same media and +sector sizes. +.Pp +.Fl A +option enables Active/Active mode, otherwise Active/Passive mode is used +by default. .It Cm label -Label the given underlying device with the specified +Create multipath device with +.Dq automatic +method. +Label the first given provider with on-disk metadata using the specified .Ar name . -The kernel module -.Pa geom_multipath.ko -will be loaded if it is not loaded already. +The rest of given providers will be retasted to detect these metadata. +It reliably protects against specifying unrelated providers. +Providers with no matching metadata detected will not be added to the device. +.Pp +.Fl A +option enables Active/Active mode, otherwise Active/Passive mode is used +by default. +.It Cm add +Add the given provider as a path to the given multipath device. +Should normally be used only for devices created with +.Dq manual +method, unless you know what you are doing (you are sure that it is another +device path, but tasting its metadata in regular +.Dq automatic +way is not possible). +.It Cm remove +Remove the given provider as a path from the given multipath device. +If the last path removed, the multipath device will be destroyed. +.It Cm fail +Mark specified provider as a path of the specified multipath device as failed. +If there are other paths present, new requests will be forwarded there. +.It Cm restore +Mark specified provider as a path of the specified multipath device as +operational, allowing it to handle requests. +.It Cm rotate +Change the active provider/path in Active/Passive mode. +.It Cm getactive +Get the currently active provider(s)/path(s). +.It Cm destroy +Destroy the given multipath device clearing metadata. +.It Cm stop +Stop the given multipath device without clearing metadata. .It Cm clear -Clear metadata on the given device. +Clear metadata on the given provider. .It Cm list See .Xr geom 8 . @@ -101,14 +190,15 @@ Debug level of the GEOM class. This can be set to 0 (default) or 1 to disable or enable various forms of chattiness. +.It Va kern.geom.multipath.exclusive : No 1 +Open underlying providers exclusively, preventing individual paths access. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh MULTIPATH ARCHITECTURE .Pp -This is an active/passive -multiple path architecture with no device knowledge or presumptions other -than size matching built in. +This is a multiple path architecture with no device knowledge or +presumptions other than size matching built in. Therefore the user must exercise some care in selecting providers that do indeed represent multiple paths to the same underlying disk device. @@ -133,15 +223,16 @@ of multiple pathnames refer to the same device should be left to the system operator who will use tools and knowledge of their own storage subsystem to make the correct configuration selection. .Pp -As an active/passive architecture, only one path has I/O moving on it +There are Active/Passive and Active/Active operation modes supported. +In Active/Passive mode only one path has I/O moving on it at any point in time. This I/O continues until an I/O is returned with a generic I/O error or a "Nonexistent Device" error. -When this occurs, -the active device is kicked out of the -.Nm MULTIPATH -GEOM class and the next in a list is selected, the failed I/O reissued -and the system proceeds. +When this occurs, that path is marked FAIL, the next path +in a list is selected as active and the failed I/O reissued. +In Active/Active mode all paths not marked FAIL may handle I/O same time. +Requests are distributed between paths to equalize load. +For capable devices it allows to utilize bandwidth of all paths. .Pp When new devices are added to the system the .Nm MULTIPATH @@ -149,9 +240,9 @@ GEOM class is given an opportunity to taste these new devices. If a new device has a .Nm MULTIPATH -label, the device is used to either create a new +on-disk metadata label, the device is used to either create a new .Nm MULTIPATH -GEOM, or to attach to the end of the list of devices for an existing +GEOM, or been added the list of paths for an existing .Nm MULTIPATH GEOM. .Pp @@ -176,7 +267,7 @@ of an RSCN event from the Fabric Domain Controller), they can cause a rescan to occur and cause the attachment and configuration of any (now) new devices to occur, causing the taste event described above. .Pp -This means that this active/passive architecture is not a one-shot path +This means that this multipath architecture is not a one-shot path failover, but can be considered to be steady state as long as failed paths are repaired (automatically or otherwise). .Pp @@ -184,7 +275,7 @@ Automatic rescanning is not a requirement. Nor is Fibre Channel. The same failover mechanisms work equally well for traditional "Parallel" -SCSI but require manual intervention with +SCSI but may require manual intervention with .Xr camcontrol 8 to cause the reattachment of repaired device links. .Sh EXAMPLES @@ -226,9 +317,9 @@ mount /dev/multipath/FREDa /mnt.... .Pp The resultant console output looks something like: .Bd -literal -offset indent -GEOM_MULTIPATH: adding da0 to Fred/b631385f-c61c-11db-b884-0011116ae789 -GEOM_MULTIPATH: da0 now active path in Fred -GEOM_MULTIPATH: adding da2 to Fred/b631385f-c61c-11db-b884-0011116ae789 +GEOM_MULTIPATH: da0 added to FRED +GEOM_MULTIPATH: da0 is now active path in FRED +GEOM_MULTIPATH: da2 added to FRED .Ed .Sh SEE ALSO .Xr geom 4 , @@ -240,24 +331,6 @@ GEOM_MULTIPATH: adding da2 to Fred/b631385f-c61c-11db-b884-0011116ae789 .Xr mount 8 , .Xr newfs 8 , .Xr sysctl 8 -.Sh BUGS -The -.Nm -should allow for a manual method of pairing disks. -.Pp -There is currently no way for -.Pa geom_multipath.ko -to distinguish between various label instances of the same provider. -That -is devices such as -.Ar da0 -and -.Ar da0c -can be tasted and instantiated as multiple paths for the same device. -Technically, this is correct, but pretty useless. -This will be fixed soon -(I hope), but to avoid this it is a good idea to destroy any label on -the disk object prior to labelling it with -.Nm . .Sh AUTHOR .An Matthew Jacob Aq mjacob@FreeBSD.org +.An Alexander Motin Aq mav@FreeBSD.org |