国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux MultiPath多路徑軟件如何實施

2024-08-27 23:55:07
字體:
來源:轉載
供稿:網友
  這篇文章主要介紹“Linux MultiPath多路徑軟件如何實施”,在日常操作中,相信很多人在Linux MultiPath多路徑軟件如何實施問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Linux MultiPath多路徑軟件如何實施”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
 
  Multipath的工作原理
 
   當multipath啟動的時候,它通過系統命令scsi_id -eg -s /block/sdX得到proc/partitions里面所有塊設備的 UUID(universally unique identify),然后把所有具有同一個UUID的塊設備組成一個Group,在/dev/mapper生產一個對應的單獨的設備。當設備生成后就可以使用fdisk或者parted進行分區,分區可以使用kpartx命令進行注冊,然后就可以是用系統命令進行創建文件系統和mount 。
 
     一般在系列安裝過程中都會同時安裝device-mapper軟件包,使用linux自帶命令rpm查詢一下是否已經安裝次軟件包。使用命令rpm –ivh進行安裝,安裝以下rpm包:
 
  device-mapper-*
 
  device-mapper-multipath-*
 
  device-mapper-1*
 
  啟動多路徑及配置多路徑
 
  啟動多路徑,通過mpathconf命令創建默認模板。創建默認配置,啟動和激活multipathd進程,可以使用以下命令:
 
  mpathconf --enable --with_multipathd y
 
  配置完成后建議重新啟動多路徑軟件:
 
  /etc/init.d/multipathd restart
 
  備注:啟動完成后會在/etc/下生成multipath.conf 文件以及在/etc/multipath下生成bindings 及wwid,其中wwid記錄了系統中所有掛載盤的盤唯一ID,Bindings記錄了ID對應的映射盤一般綁定完后會在/dev/mapper下產生類似于mpathx等文件
 
  備注------------------------------------------------------
 
  如果沒有沒有生成可以按照Deploying Oracle RAC 11g R2 Database on Red Hat EnterpriseLinux 6
 
  的如下方式來進行操作:
 
  1. As the root user, install the device-mapper-multipath package using the yum package
 
  manager.
 
  # yum -y install device-mapper-multipath
 
  2. Copy the multipath.conf file found within /usr/share/doc/device-mapper-multipath-0.4.9/ to /etc/
 
  # cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/
 
 
  3. Capture the scsi id of the local disk(s) on the system.
 
  # scsi_id --whitelisted --replace-whitespace –-device=/dev/sda
 
  3600508b1001030353434363646301200
 
 
  4. Uncomment and modify the blacklist section within the /etc/multipath.conf file to include
 
  the scsi id of the local disk on the system. Once complete, save the changes made to
 
  the multipath.conf file.
 
  blacklist {
 
  wwid 3600508b1001030353434363646301200
 
  devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
 
  devnode "^hd[a-z]"
 
  }
 
 
  5. Start the multipath daemon.
 
  # service multipathd start
 
  Starting multipathd daemon: [ OK ]
 
 
  6. Enable the multipath daemon to ensure it is started upon boot time.
 
  # chkconfig multipathd on
  7. Identify the dm- device, size, and WWID of each device mapper volume for Oracle
 
  OCR and voting disks, data disks and recovery disks. In this example, volume mpathb
 
  is identified via the following command:
 
  # multipath -ll
 
  Linux MultiPath多路徑軟件如何實施
 
  Figure  Multipath Device (mpathb)
 
 
  8. Uncomment the defaults section found within the /etc/multipath.conf file.
 
  defaults {
 
  udev_dir /dev
 
  polling_interval 10
 
  path_selector "round-robin 0"
 
  path_grouping_policy multibus
 
  getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
 
  prio alua
 
  path_checker readsector0
 
  rr_min_io 100
 
  max_fds 8192
 
  rr_weight priorities
 
  failback immediate
 
  no_path_retry fail
 
  user_friendly_names yes
 
  }
 
  NOTE: The standard options can be customized to better fit your storage array's
 
  capabilities. Check with your storage vendor for details.
 
  9. Un-comment the multipath section found within the /etc/multipath.conf file and create an alias for each device mapper volume in order to enable persistent naming of those volumes. Once complete, save the changes made to the multipath.conf file. The output should resemble the example below. For reference, refer the Oracle data volumes created for the reference environment as displayed in Table 2.4.3: Oracle OCR,Voting Disk, & Data File Sizes.
 
  /etc/multipath.conf
 
  multipaths {
 
  multipath {
 
  wwid 3600c0ff000d7e7a854a0f65101000000
 
  alias db1
 
  }
 
  multipath {
 
  wwid 3600c0ff000dabfe562a0f65101000000
 
  alias db2
 
  }
 
  multipath {
 
  wwid 3600c0ff000d7e7a874a0f65101000000
 
  alias fra
 
  }
 
  multipath {
 
  wwid 3600c0ff000dabfe585a0f65101000000
 
  alias redo
 
  }
 
  multipath {
 
  wwid 3600c0ff000dabfe596a0f65101000000
 
  alias ocrvote1
 
  }
 
  multipath {
 
  wwid 3600c0ff000dabfe5a2a0f65101000000
 
  alias ocrvote2
 
  }
 
  multipath {
 
  wwid 3600c0ff000dabfe5b4a0f65101000000
 
  alias ocrvote3
 
  }
 
  }
 
 
  10.Restart the device mapper multipath daemon.
 
  # service multipathd restart
 
  ok
 
  Stopping multipathd daemon: [ OK ]
 
  Starting multipathd daemon: [ OK ]
 
 
  11.Verify the device mapper paths and aliases are displayed properly. Below is an example of one device mapper device labeled fra.
 
  # multipath -ll
 
  fra (3600c0ff000d7e7a89e85ac5101000000) dm-10 HP,MSA2324fc
 
  size=186G features='1 queue_if_no_path' hwhandler='0' wp=rw
 
  |-+- policy='round-robin 0' prio=130 status=active
 
  | |- 3:0:0:3 sdd 8:48 active ready running
 
  | |- 3:0:1:3 sdh 8:112 active ready running
 
  | |- 4:0:0:3 sdt 65:48 active ready running
 
  | `- 4:0:1:3 sdx 65:112 active ready running
 
  `-+- policy='round-robin 0' prio=10 status=enabled
 
  |- 3:0:2:3 sdl 8:176 active ready running
 
  |- 3:0:3:3 sdp 8:240 active ready running
 
  |- 4:0:2:3 sdab 65:176 active ready running
 
  `- 4:0:3:3 sdaf 65:240 active ready running
 
  ----------------------------------------------------------------------------------------------
 
  配置文件     
 
     默認情況下,DM-Multipath 為大多數多路徑的使用提供配置值。另外,DM-Multipath 支持大多數常見的、支持DM-Multipath的存儲陣列。默認配置值和支持的設備請參考/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults件。可以編輯/etc/multipath.conf覆蓋DM-Multipath的默認配置。如果有必要,您還可以默認配置文件不支持的存儲陣列。
 
  多路徑配置文件可分為以下幾個部分:
 
  blacklist
 
  不被視為多路徑的具體設備列表。
 
  blacklist_exceptions
 
  根據 blacklist 部分中的參數列出不在黑名單中的多路徑設備。
 
  defaults
 
  DM-Multipath 的常規默認設置。
 
  multipaths
 
  各個獨立多路徑設備的特性設置。這些數值覆蓋了在配置文件的 defaults 和 devices 部分中指定的數值。
 
  devices
 
  各個存儲控制器的設置。這些數值覆蓋了在配置文件的defaults部分指定的數值。如果您要使用不是默認支持的存儲陣列,您可能需要為您的陣列創建 devices 子部分。
 
  當系統決定多路徑設備的屬性時,首先它會檢查多路徑設置,然后是每個設備的設置,然后才是多路徑系統默認設置。
 
 
  以上配置完成后,啟動multipathd 進程,進程啟動后會自動scan設備,在/dev/mapper目錄下可以看到 生成的設備 如:mapth5
  1.使用命令multipath 可以查看路徑狀態是否正常,
 
  [root@dbserv1 mapper]# multipath -d -l
 
    
  2.使用系統fdisk 命令分區后,使用命令  kpartx l  /dev/mapper/mpath5查看分區信息
 
    
  3.如果未發現可以使用kpartx d /dev/mapper/mpath5命令進行注冊分區
 
  4.如果下使用ASM磁盤管理,則下一步就是通過udev進行配置分區權限和別名,以便讓Oracle在ASM配置過程中能夠看到這些分區。關于udev的具體配置過程在下篇文章中會進行說明。
 
  5.當然也可以使用Oracle ASMLib來配置ASM磁盤,這個相對udev方式來時稍微麻煩,但是也有相應的好處,即,在ASM里多余出來空間通過配置能夠讓OS文件系統識別到。
 
    
  6.如果不用Rac,在單節點環境,則使用mke2fs –j /dev/mapper/mapth5p1 在相對應的分區上創建文件系統
 
  7.使用mount的命令掛載文件系統就可以用。
 
  多路徑基本維護命令
 
  1.啟停多路徑:
 
  /etc/init.d/multipathd stop/start/reatart
 
 
  2.查看當前多路徑鏈路狀態及盤情況:
 
  multipath –ll
 
  3.刪除多路徑設備:
 
  multipath –F
 
 
  4.重新掃描設備:
 
  multipath –v3
 
  5.當在 DM-Multipath中添加新設備時,這些新設備會位于/dev目錄的兩個不同位置:
 
  /dev/mapper/mpathn
 
  /dev/dm-n
 
  /dev/mapper中的設備是在引導過程中生成的。可使用這些設備訪問多路徑設備,例如在生成邏輯卷時
 
  所有 /dev/dm-n格式的設備都只能是作為內部使用,請不要使用它們。

(編輯:武林網)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 岱山县| 宁晋县| 柳江县| 赫章县| 珠海市| 华坪县| 冕宁县| 正宁县| 台州市| 马边| 彩票| 普格县| 大港区| 色达县| 安远县| 新巴尔虎右旗| 大兴区| 望都县| 隆林| 深圳市| 渝中区| 嵊泗县| 舟山市| 当涂县| 淮阳县| 七台河市| 遵义市| 双牌县| 德惠市| 沈阳市| 临湘市| 遂溪县| 寿阳县| 瑞丽市| 巴林右旗| 绵阳市| 阿坝县| 彭泽县| 泸水县| 高要市| 建瓯市|