這篇文章主要介紹Redhat7 Udev如何綁定單路徑設(shè)備,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
成都創(chuàng)新互聯(lián)公司基于分布式IDC數(shù)據(jù)中心構(gòu)建的平臺(tái)為眾多戶提供服務(wù)器托管 四川大帶寬租用 成都機(jī)柜租用 成都服務(wù)器租用。
1.取得磁盤(pán)UUID:
for disk in `ls /dev/sd*`
do
echo $disk
/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=$disk
done
/dev/sdb
36000c29cffb16d0ab6e706d8474b8185
/dev/sdc
36000c294296b162323c3d18f218c8ebe
/dev/sdd
36000c293d28c648b8ea3780f31d3aebe
/dev/sde
36000c29fde25492009f3fe4882603755
/dev/sdf
36000c29845ce8733dcd8f3929da7b5cd
/dev/sdi
36000c2915522598d7dc3510d3b2f684c
/dev/sdj
36000c299864887911287c47884386547
/dev/sdk
36000c29d4618f7df9988b2b35a5519a1
/dev/sdl
36000c293efbdb7dcd808213db15a0113
/dev/sdm
36000c294c9da2b5885758cf6bcc3647a
/dev/sdn
36000c2905f57bc45665172b71346051e
/dev/sdo
36000c299475e8f0fdf40ad2606e78168
/dev/sdp
36000c293a88560cbd6232bc838960608
2.生成rules文件
cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29cffb16d0ab6e706d8474b8185", SYMLINK+="asm_ocr_1_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c294296b162323c3d18f218c8ebe", SYMLINK+="asm_ocr_2_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c293d28c648b8ea3780f31d3aebe", SYMLINK+="asm_vote_1_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29fde25492009f3fe4882603755", SYMLINK+="asm_vote_2_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29845ce8733dcd8f3929da7b5cd", SYMLINK+="asm_vote_3_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c2915522598d7dc3510d3b2f684c", SYMLINK+="asm_data_1_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c299864887911287c47884386547", SYMLINK+="asm_data_1_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29d4618f7df9988b2b35a5519a1", SYMLINK+="asm_data_1_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c293efbdb7dcd808213db15a0113", SYMLINK+="asm_data_2_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c294c9da2b5885758cf6bcc3647a", SYMLINK+="asm_data_2_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c2905f57bc45665172b71346051e", SYMLINK+="asm_data_2_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c299475e8f0fdf40ad2606e78168", SYMLINK+="asm_fra_1_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c293a88560cbd6232bc838960608", SYMLINK+="asm_fra_2_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
3.加載rules文件
udevadm control --reload-rules
udevadm trigger
4.綁定后設(shè)備信息如下:
ls -l /dev/sd*
brw-rw---- 1 grid asmadmin 8, 16 Aug 29 09:28 /dev/sdb
brw-rw---- 1 grid asmadmin 8, 32 Aug 29 09:28 /dev/sdc
brw-rw---- 1 grid asmadmin 8, 48 Aug 29 09:28 /dev/sdd
brw-rw---- 1 grid asmadmin 8, 64 Aug 29 09:28 /dev/sde
brw-rw---- 1 grid asmadmin 8, 80 Aug 29 09:28 /dev/sdf
brw-rw---- 1 grid asmadmin 8, 128 Aug 29 09:28 /dev/sdi
brw-rw---- 1 grid asmadmin 8, 144 Aug 29 09:28 /dev/sdj
brw-rw---- 1 grid asmadmin 8, 160 Aug 29 09:27 /dev/sdk
brw-rw---- 1 grid asmadmin 8, 176 Aug 29 09:28 /dev/sdl
brw-rw---- 1 grid asmadmin 8, 192 Aug 29 09:27 /dev/sdm
brw-rw---- 1 grid asmadmin 8, 208 Aug 29 09:28 /dev/sdn
brw-rw---- 1 grid asmadmin 8, 224 Aug 29 09:28 /dev/sdo
brw-rw---- 1 grid asmadmin 8, 240 Aug 29 09:28 /dev/sdp
ls -l /dev/asm*
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_1_1 -> sdi
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_1_2 -> sdj
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_1_3 -> sdk
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_2_1 -> sdl
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_2_2 -> sdm
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_data_2_3 -> sdn
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_fra_1_1 -> sdo
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_fra_2_1 -> sdp
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_ocr_1_1 -> sdb
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_ocr_2_1 -> sdc
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_vote_1_1 -> sdd
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_vote_2_1 -> sde
lrwxrwxrwx 1 root root 3 Aug 29 09:27 /dev/asm_vote_3_1 -> sdf
以上是“Redhat7 Udev如何綁定單路徑設(shè)備”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
網(wǎng)頁(yè)標(biāo)題:Redhat7Udev如何綁定單路徑設(shè)備
網(wǎng)站鏈接:http://aaarwkj.com/article26/pdesjg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站設(shè)計(jì)、網(wǎng)站排名、微信小程序、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、企業(yè)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)