Linux MultiPath多重路徑軟體實施說明

來源:互聯網
上載者:User

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 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.