Multipath and Device Mapper
*** 比較詳細的手冊
什麼是multipath
In computer storage, multipath I/O is a fault-tolerance and performance enhancement technique whereby there is more than one physical path between the CPU in a computer system and its mass storage devices through the buses, controllers, switches, and bridge devices connecting them.
主要用於 容錯 和 效能提升。
Device Mapper
在linux中,用device mapper實現 multipath。但device mapper本身,不僅僅只是multipath。
下面是個簡單的介紹。
Device mapper is a block subsystem that provides layering mechanism for block devices. One can write a device mapper to provide a specific functionality on top of a block device.
Currently the following functional layers are available:
concatenation
mirror
striping
encryption
flaky
delay
multipath
Multiple device mapper modules can be stacked to get the combined functionality.
我的這篇文章講了一點DM的內容
http://blog.csdn.net/richardysteven/article/details/7937249
Device Mapper- Multipath包含哪些東西
DM-MP consists of 4 components:
DM MP kernel module - Kernel module that is responsible for making the multipathing decisions in normal and failure situations.
核心模組,io重定向
multipath command - User space tool that allows the user with initial configuration, listing and deletion of multipathed devices.
使用者程式,檢視/配置MP裝置。
multipathd daemon - User space daemon that constantly monitors the paths. It marks a path as failed when it finds the path faulty and if all the paths in a priority group are faulty then it switches to the next enable priority group. It keeps checking the failed path, once the failed path comes alive, based on the failback policy, it can activate the path. It provides an CLI to monitor/manage individual paths. It automatically creates device mapper entries when new devices comes into existence.
監聽鏈路失敗資訊,進行鏈路切換。
kpartx - User space command that creates device mapper entries for all the partitions in a multipathed disk/LUN. When the multipath command is invoked, this command automatically gets invoked. For DOS based partitions this command need to be run manually.
根據裝置分割槽表建立device mapper裝置。
multipah 命令的使用
那先從使用者層的命令開始看,看看一般怎麼使用。
顯示multipath的topology
# multipath -l
mpatha (350000393c8205324) dm-5 IBM,MBF2600RC
size=559G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| `- 0:0:5:0 sdb 8:16 active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
`- 1:0:5:0 sdh 8:112 active undef running
mpatha 使用者定義的multipath的名字
dm-5 sysfs中multipath的名字
IBM,MBFXX 裝置廠商 型號
policy 各個通路的策略
prio 優先順序
Path Group
Paths are grouped into a path groups. At any point of time only path group will be active. decides which path in the path group gets to send the next I/O. I/O will be sent only to the active path.
Path States
This refers to the physical state of a path. A can be in one of the following states:
-
ready: Path is up and can handle I/O requests.
-
faulty: Path is down and cannot handle I/O requests.
-
ghost: Path is a passive path. This state is shown in the passive path in mode.
- shaky: Path is up, but temporarily not available for I/O requests.
DM Path States This refers to the DM module(kernel)'s view of the path's state. It can be in one of the two states:
-
active: Last I/O sent to this path successfully completed. Analogous to.
-
failed: Last I/O to this path failed. Analogous to .
Path Group State Path Groups can be in one of the following three states:
- active: I/O will be sent to the multipath device will be sent to this path group. Only one path group will be in this state.
-
enabled: If none of the paths in the active path group is in the ready state, I/O will be sent these path groups. There can be one or more path groups in this state.
- disabled: In none of the paths in the active path group and enabled path group is in the ready state. I/O will be sent to these path groups. There can be one or more path groups in this state. This state is available only for certain storage devices.
配置檔案 /etc/multipath.conf
This file has 5 sections:
-
System level defaults ("defaults"): Where the user can specify system level default override.
-
Black listed devices ("blacklist"): User can specify the list of devices they do not want to be under the control of DM-Multipath. These devices will be excluded.
-
Black list exceptions ("blacklist_exceptions"): Specific devices to be treated as multipath candidates even if they exist in the blacklist.
-
Storage controller specific settings ("devices"): User specified configuration settings will be applied to devices with specified "Vendor" and "Product" information.
-
Device specific settings ("multipaths"): User can fine tune configuration settings for individual LUNs.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16163290/viewspace-1625342/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 瞭解Linux系統中的Device Mapper機制:使用者空間LinuxdevAPP
- multipath配置詳細參考
- NotesAtRandom——通用MapperrandomAPP
- mybatis mapper解析(4)MyBatisAPP
- C# Lambda MapperC#APP
- 執行時報錯RuntimeError: expected device cpu but got device cuda:0ErrordevGo
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- 翻譯:Linux and the Device TreeLinuxdev
- As 除錯 no target device found除錯dev
- kubernetes container device interface (CDI)AIdev
- Waiting for target device to come onlineAIdev
- mybatis的外掛:mapperMyBatisAPP
- 建立mapper.xml方法APPXML
- mapper檔案 和beanAPPBean
- MyBatis外掛 - 通用mapperMyBatisAPP
- Springboot Error parsing Mapper XMLSpring BootErrorAPPXML
- @Mapper註解的使用APP
- Linux配置和管理裝置對映多路徑multipathLinux
- RAC19c搭建-centos7+openfiler+multipath+udevCentOSdev
- RAC11g搭建-centos7+openfiler+multipath+udevCentOSdev
- LINUX 多路徑對映Multipath與正規表示式Linux
- iOS Device ID 的前世今生iOSdev
- XDS: Cross-Device Scripting AttacksROSdev
- gpg: signing failed: Inappropriate ioctl for deviceAIAPPdev
- Linux平臺的多路徑軟體multipath的使用案例Linux
- Mapper.xml中的trimAPPXML
- Mapreduce中的Mapper&reducerAPP
- mybatis中@Mapper使用介紹MyBatisAPP
- 解決mapper重名問題APP
- SpringBoot快速整合通用MapperSpring BootAPP
- SciTech-OS-Linux-Device Driver: 英文原版電子書“Linux Device Drivers, Third Edition”Linuxdev
- 淺談 iOS Device ID 的修改iOSdev
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- Structure of Linux Kernel Device Driver(Part II)StructLinuxdev
- mybatis通用mapper原始碼解析(一)MyBatisAPP原始碼
- mybatis通用mapper原始碼解析(二)MyBatisAPP原始碼
- 通用mapper和分類實現APP
- 通用mapper、圖片上傳、nginxAPPNginx