multipath device 的wwid如何得到
在使用readhat as 4.5自带的device mapper multipath时,有一个配置文件/var/lib/multipath/binding.是设置multipath device的别名与wwid之间的绑定关系.请问multipath device的wwid是如何生成的.看multipath手册,好象是scsi_id -g -u -s /block/%n生成的,但在命令行中没有实验出来.请帮助. 把手册内容贴出来大家看看回复 #1 origin2004 的帖子
MULTIPATH(8) Linux Administrator鈥檚 Manual MULTIPATH(8)NAME
multipath - Device mapper target autoconfig
SYNOPSIS
multipath
DESCRIPTION
multipath is used to detect multiple paths to devices for fail-over or
performance reasons and coalesces them
OPTIONS
-b bindings_file
specify an alternate location for the user friendly names bind-
ings file. The default location is /var/lib/multipath/bindings.
-d dry run, do not create or update devmaps
-f flush a multipath device map specified as parameter, if unused
-F flush all unused multipath device maps
-l show the current multipath topology from information fetched in
sysfs and the device mapper
-ll show the current multipath topology from all available informa-
tion (sysfs, the device mapper ...)
-p policy
force maps to specified policy:
failover 1 path per priority group
multibus all paths in 1 priority group
group_by_serial
1 priority group per serial
group_by_prio
1 priority group per priorityvalue.Priori-
ties are determined by callout programs speci-
fied as a global, per-controler orper-multi-
path option in the configuration file
group_by_node_name
1priority group per target node name. Target
node names are fetched in /sys/class/fc_trans-
port/target*/node_name.
-v level verbosity, print all paths and multipaths
0 no output
1 printthecreated or updated multipath names
only, for use to feed other tools like kpartx
2 + print all info:detectedpaths,coalesced
paths (ie multipaths) and device maps
device update only the devmap the path pointed by device is in.
device is in the /dev/sdb (as shown by udev in the $DEV-
NAME variable) or major:minor format.device may alter-
natively be a multipath mapname
FILES
/etc/multipath.conf
Configuration file for the multipath and multipathd pro-
grams.
/var/lib/multipath/bindings
Thebindingsfile used if the user friendly names con-
figuration option is selected. This file shouldusually
not need to be modified by hand. To ensure That the mul-
tipath devices have the same names on all nodesaccess-
ingthem,this file can be copied from one node to all
the others.
SEE ALSO
udev(8), dmsetup(8) hotplug(8)
AUTHORS
multipath was developed by Christophe Varoqui,
<christophe.varoqui@free.fr> and others.
February 2004 MULTIPATH(8)
回复 #1 origin2004 的帖子
#### This is a template multipath-tools configuration file
## Uncomment the lines relevent to your environment
##
#
##
## name: defaults
## desc: multipath-tools default settings
##
#defaults {
# #
# # name : udev_dir
# # desc : directory where udev creates its device nodes
# # default : /udev
# #
# udev_dir /dev
#
# #
# # name : polling_interval
# # scope : multipathd
# # desc : interval between two path checks in seconds
# # values: n > 0
# # default : 5
# #
# polling_interval 10
#
# #
# # name : selector
# # scope : multipath
# # desc : the default path selector algorithm to use
# # these algorithms are offered by the kernel multipath target
# # values: "round-robin 0"
# # default : "round-robin 0"
# #
# selector "round-robin 0"
#
# #
# # name : path_grouping_policy
# # scope : multipath
# # desc : the default path grouping policy to apply to unspecified
# # multipaths
# # values: failover = 1 path per priority group
# # multibus = all valid paths in 1 priority group
# # group_by_serial = 1 priority group per detected serial
# # number
# # group_by_prio = 1 priority group per path priority
# # value
# # group_by_node_name = 1 priority group per target node name
# # default : failover
# #
# path_grouping_policy multibus
#
# #
# # name : getuid_callout
# # scope : multipath
# # desc : the default program and args to callout to obtain a unique
# # path identifier. Absolute path required
# # default : /sbin/scsi_id -g -u -s
# #
# getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
#
# #
# # name : prio_callout
# # scope : multipath
# # desc : the default program and args to callout to obtain a path
# # priority value. The ALUA bits in SPC-3 provide an
# # exploitable prio value for example. "none" is a valid value
# # default : (null)
# #
# #prio_callout "/bin/true"
#
# #
# # name : path_checker
# # scope : multipath & multipathd
# # desc : the default method used to determine the paths' state
# # values: readsector0|tur|emc_clariion|hp_sw|directio
# # default : readsector0
# #
# path_checker readsector0
#
# #
# # name : rr_min_io
# # scope : multipath
# # desc : the number of IO to route to a path before switching
# # to the next in the same path group
# # default : 1000
# #
# rr_min_io 100
#
# #
# # name : rr_weight
# # scope : multipath
# # desc : if set to priorities the multipath configurator will assign
# # path weights as "path prio * rr_min_io"
# # values: priorities|uniform
# # default : uniform
# #
# rr_weight priorities
#
# #
# # name : failback
# # scope : multipathd
# # desc : tell the daemon to manage path group failback, or not to.
# # 0 means immediate failback, values >0 means deffered
# # failback expressed in seconds.
# # values: manual|immediate|n > 0
# # default : immediate
# #
# failback manual
#
# #
# # name : no_path_retry
# # scope : multipath & multipathd
# # desc : tell the number of retries until disable queueing, or
# # "fail" means immediate failure (no queueing),
# # "queue" means never stop queueing
# # values: queue|fail|n (>0)
# # default : (null)
# #
# no_path_retryqueue
#
# #
# # name : user_friendly_names
# # scope : multipath
# # desc : If set to "yes", using the bindings file
# # /var/lib/multipath/bindings to assign a persistent and
# # unique alias to the multipath, in the form of mpath<n>.
# # If set to "no" use the WWID as the alias. In either case
# # this be will be overriden by any specific aliases in this
# # file.
# # values: yes|no
# # default : no
# user_friendly_names no
#
#}
#
##
## name : blacklist
## scope : multipath & multipathd
## desc : list of device names to discard as not multipath candidates.
## Devices can identified by either their device node name "devnode"
## or their WWID "wwid".
## default : cciss, fd, hd, md, dm, sr, scd, st, ram, raw, loop
##
#blacklist {
# wwid 26353900f02796769
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)*"
# devnode "^hd"
# devnode "^cciss!cd*"
#}
#
##
## name : multipaths
## scope : multipath & multipathd
## desc : list of multipaths finest-grained settings
##
#multipaths {
# #
# # name: multipath
# # scope : multipath & multipathd
# # desc: container for settings that apply to one specific multipath
# #
# multipath {
# #
# # name: wwid
# # scope : multipath & multipathd
# # desc: index of the container
# #
# wwid 3600508b4000156d700012000000b0000
#
# #
# # name : alias
# # scope : multipath
# # desc : symbolic name for the multipath
# #
# alias yellow
#
# #
# # name : path_grouping_policy
# # scope : multipath
# # desc : path grouping policy to apply to this multipath
# # values: failover = 1 path per priority group
# # multibus = all valid paths in 1 priority
# # group
# # group_by_serial = 1 priority group per detected
# # serial number
# # group_by_prio = 1 priority group per path
# # priority value
# # group_by_node_name = 1 priority group per target
# # node name
# # default : failover
# #
# path_grouping_policy multibus
#
# #
# #
# # name : path_selector
# # desc : the path selector algorithm to use for this mpath
# # these algo are offered by the kernel mpath target
# # values: "round-robin 0"
# # default : "round-robin 0"
# #
# path_selector "round-robin 0"
#
# #
# # name : failback
# # scope : multipathd
# # desc : tell the daemon to manage path group failback, or
# # not to. 0 means immediate failback, values >0 means
# # deffered failback expressed in seconds.
# # values: manual|immediate|n > 0
# # default : immediate
# #
# failback manual
#
# #
# # name : rr_weight
# # scope : multipath
# # desc : if set to priorities the multipath configurator will
# # assign path weights as "path prio * rr_min_io"
# # values: priorities|uniform
# # default : uniform
# #
# rr_weight priorities
#
# #
# # name : no_path_retry
# # scope : multipath & multipathd
# # desc : tell the number of retries until disable queueing,
# # or "fail" means immediate failure (no queueing),
# # "queue" means never stop queueing
# # values: queue|fail|n (>0)
# # default : (null)
# #
# no_path_retryqueue
# }
# multipath {
# wwid 1DEC_____321816758474
# alias red
# rr_weight priorities
# }
#}
#
##
## name: devices
## scope : multipath & multipathd
## desc: list of per storage controler settings
## overrides default settings (device_maps block)
## overriden by per multipath settings (multipaths block)
##
#devices {
# #
# # name: device
# # scope : multipath & multipathd
# # desc: settings for this specific storage controler
# #
# device {
# #
# # name: vendor, product
# # scope : multipath & multipathd
# # desc: index for the block
# #
# vendor "COMPAQ"
# product "HSV110 (C)COMPAQ"
#
# #
# # name : bl_product
# # scope : multipath & multipathd
# # desc : a regular expression used to blacklist devices
# # by vendor/product. NOTE For a device to get
# # blacklisted, the vendor, product, and bl_product
# # strings must all match, not just the vendor and
# # bl_product strings as in the upstream version.
# # default : (null)
# bl_product "LUN_Z"
#
# #
# # name : path_grouping_policy
# # scope : multipath
# # desc : path grouping policy to apply to multipath hosted
# # by this storage controler
# # values: failover = 1 path per priority group
# # multibus = all valid paths in 1 priority
# # group
# # group_by_serial = 1 priority group per detected
# # serial number
# # group_by_prio = 1 priority group per path
# # priority value
# # group_by_node_name = 1 priority group per target
# # node name
# # default : failover
# #
# path_grouping_policy multibus
#
# #
# # name : getuid_callout
# # scope : multipath
# # desc : the program and args to callout to obtain a unique
# # path identifier. Absolute path required
# # default : /sbin/scsi_id -g -u -s
# #
# getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
#
# #
# # name : prio_callout
# # scope : multipath
# # desc : the program and args to callout to obtain a path
# # weight. Weights are summed for each path group to
# # determine the next PG to use case of failure.
# # "none" is a valid value.
# # default : no callout, all paths equals
# #
# prio_callout "/sbin/mpath_prio_balance_units %d"
#
# #
# # name : path_checker
# # scope : multipathd
# # desc : path checking alorithm to use to check path state
# # values: readsector0, tur
# # default : readsector0
# #
# path_checker readsector0
#
# #
# # name : path_selector
# # desc : the path selector algorithm to use for this mpath
# # these algo are offered by the kernel mpath target
# # values: "round-robin 0"
# # default : "round-robin 0"
# #
# path_selector "round-robin 0"
#
# #
# # name : failback
# # scope : multipathd
# # desc : tell the daemon to manage path group failback, or
# # not to. 0 means immediate failback, values >0 means
# # deffered failback expressed in seconds.
# # values: manual|immediate|n > 0
# # default : immediate
# #
# failback 30
#
# #
# # name : hardware_handler
# # scope : multipath
# # desc : If set, it specifies a module that will be used to
# # perform hardware specific actions when switching
# # path groups or handling IO errors
# # values: "0"|"1 emc"
# # default : "0"
# #
# hardware_handler "1 emc"
#
# #
# # name : rr_weight
# # scope : multipath
# # desc : if set to priorities the multipath configurator will
# # assign path weights as "path prio * rr_min_io"
# # values: priorities|uniform
# # default : uniform
# #
# rr_weight priorities
#
# #
# # name : no_path_retry
# # scope : multipath & multipathd
# # desc : tell the number of retries until disable queueing,
# # or "fail" means immediate failure (no queueing),
# # "queue" means never stop queueing
# # values: queue|fail|n (>0)
# # default : (null)
# #
# no_path_retryqueue
# }
# device {
# vendor "COMPAQ"
# product "MSA1000 "
# path_grouping_policy multibus
# path_checker tur
# rr_weight priorities
# }
#}
回复 #1 origin2004 的帖子
mpath1 (360a9800043346536534a344a794e6d59)#左边是别名,右边是wwid
回复 #1 origin2004 的帖子
也看了scsi_id的手册,意思很清楚,就是在命令行中试不出来. /sbin/scsi_id -g -u -s /block/sdx,大侠们不屑于这些简单的问题。
页:
[1]