Linux 7下使用udev繫結ASM磁碟
for disk in `ls /dev/sd*`
do
echo $disk
/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=$disk
done
--產生裝置的UUID
[root@db12c_01 ~]# for disk in `ls /dev/sd*`
> do
> echo $disk
> /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=$disk
> done
/dev/sda
36000c296553b7ac67e22e3e60ac04462
/dev/sda1
36000c296553b7ac67e22e3e60ac04462
/dev/sda2
36000c296553b7ac67e22e3e60ac04462
/dev/sdb
36000c298981418c7e8a25a89d0f836c9
/dev/sdb1
36000c298981418c7e8a25a89d0f836c9
/dev/sdc
36000c29dce09d16de88f435217838c9e
/dev/sdc1
36000c29dce09d16de88f435217838c9e
/dev/sdd
36000c29c3438303241fd1291834b1bd0
/dev/sdd1
36000c29c3438303241fd1291834b1bd0
/dev/sde
36000c291dec502efa9d3ae53c99f0028
/dev/sde1
36000c291dec502efa9d3ae53c99f0028
/dev/sdf
36000c29e29a4bcd75acea14e982ea49d
/dev/sdf1
36000c29e29a4bcd75acea14e982ea49d
/dev/sdg
36000c290ecd14020e2c7f41ee6a2916a
/dev/sdg1
36000c290ecd14020e2c7f41ee6a2916a
對映檔案: /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c298981418c7e8a25a89d0f836c9", SYMLINK+="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29dce09d16de88f435217838c9e", SYMLINK+="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29c3438303241fd1291834b1bd0", SYMLINK+="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c291dec502efa9d3ae53c99f0028", SYMLINK+="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29e29a4bcd75acea14e982ea49d", SYMLINK+="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"
讓配置生效:
/sbin/udevadm trigger --type=devices --action=change
udevadm control --reload-rules
檢視生效後的裝置名:
[root@db12c_01 ~]# ls -l /dev/as*
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskb -> sdb1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskc -> sdc1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskd -> sdd1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diske -> sde1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskf -> sdf1
在做配置的時候,發現第二個節點配置時需要讀取一下磁碟的分割槽資訊才能成功繫結
[root@db12c_02 ~]# fdisk /dev/sdf
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdf: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xc1b37f09
參考:http://www.xifenfei.com/2016/08/linux-7-udev.html
http://www.jydba.net/how-to-set-device-name-using-udev-on-oracle-linux-7-1/
do
echo $disk
/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=$disk
done
--產生裝置的UUID
[root@db12c_01 ~]# for disk in `ls /dev/sd*`
> do
> echo $disk
> /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=$disk
> done
/dev/sda
36000c296553b7ac67e22e3e60ac04462
/dev/sda1
36000c296553b7ac67e22e3e60ac04462
/dev/sda2
36000c296553b7ac67e22e3e60ac04462
/dev/sdb
36000c298981418c7e8a25a89d0f836c9
/dev/sdb1
36000c298981418c7e8a25a89d0f836c9
/dev/sdc
36000c29dce09d16de88f435217838c9e
/dev/sdc1
36000c29dce09d16de88f435217838c9e
/dev/sdd
36000c29c3438303241fd1291834b1bd0
/dev/sdd1
36000c29c3438303241fd1291834b1bd0
/dev/sde
36000c291dec502efa9d3ae53c99f0028
/dev/sde1
36000c291dec502efa9d3ae53c99f0028
/dev/sdf
36000c29e29a4bcd75acea14e982ea49d
/dev/sdf1
36000c29e29a4bcd75acea14e982ea49d
/dev/sdg
36000c290ecd14020e2c7f41ee6a2916a
/dev/sdg1
36000c290ecd14020e2c7f41ee6a2916a
對映檔案: /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c298981418c7e8a25a89d0f836c9", SYMLINK+="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29dce09d16de88f435217838c9e", SYMLINK+="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29c3438303241fd1291834b1bd0", SYMLINK+="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c291dec502efa9d3ae53c99f0028", SYMLINK+="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29e29a4bcd75acea14e982ea49d", SYMLINK+="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"
讓配置生效:
/sbin/udevadm trigger --type=devices --action=change
udevadm control --reload-rules
檢視生效後的裝置名:
[root@db12c_01 ~]# ls -l /dev/as*
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskb -> sdb1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskc -> sdc1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskd -> sdd1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diske -> sde1
lrwxrwxrwx 1 root root 4 Nov 21 00:38 /dev/asm-diskf -> sdf1
在做配置的時候,發現第二個節點配置時需要讀取一下磁碟的分割槽資訊才能成功繫結
[root@db12c_02 ~]# fdisk /dev/sdf
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdf: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xc1b37f09
參考:http://www.xifenfei.com/2016/08/linux-7-udev.html
http://www.jydba.net/how-to-set-device-name-using-udev-on-oracle-linux-7-1/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2147507/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE LINUX 5.5 UDEV繫結asm磁碟問題OracleLinuxdevASM
- rhel 5.5UDEV繫結asm磁碟devASM
- linux下udev重新繫結磁碟Linuxdev
- udev+multipath配合繫結磁碟dev
- OEL5.7 UDEV繫結磁碟dev
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- Oracle 在asm前使用udev繫結共享儲存OracleASMdev
- 使用udev擴充套件ASM磁碟組dev套件ASM
- Linux使用udev繫結裸裝置Linuxdev
- 在Linux中使用UDEV繫結裝置Linuxdev
- 關於oracle RAC 通過udev繫結磁碟Oracledev
- 關於oracle RAC 透過udev繫結磁碟Oracledev
- 12C__單機安裝Grid+Oracle的方法,ASM使用UDEV進行磁碟繫結OracleASMdev
- Linux udev 動態管理Oracle ASM磁碟-實驗LinuxdevOracleASM
- 使用UDEV繫結裝置名dev
- linux udev裸裝置繫結Linuxdev
- UDEV方式配置Oracle RAC ASM共享磁碟devOracleASM
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- linux下新增ASM磁碟LinuxASM
- 【Linux】UDEV SCSI規則在Oracle Linux上配置ASMLinuxdevOracleASM
- Linux 磁碟對應 ASM diskgroup 中的磁碟LinuxASM
- Oracle下建立ASM磁碟總結OracleASM
- Redhat7 Udev繫結(DM multipath)多路徑裝置Redhatdev
- Redhat7 Udev繫結單路徑裝置方法Redhatdev
- 利用UDEV管理Linux塊裝置,並分配ASM使用 (文件 ID 1528148.1)devLinuxASM
- Linux UDEV使用一例Linuxdev
- UDEV SCSI Rules Configuration for ASM in Oracle Linux 5 and 6devASMOracleLinux
- Orace RAC安裝-Oracle Linux 5和6 ASM的UDEV SCSI規則配置-識別磁碟(/sbin/scsi_id)OracleLinuxASMdev
- udev控制磁碟引導順序dev
- 【ASM】如何建立ASM磁碟ASM
- ASM之建立ASM磁碟ASM
- 使用CREATE DISKGROUP語句建立ASM磁碟組,提示找不到相應的ASM磁碟ASM
- linux下udev和mdev的使用Linuxdev
- ORACLE使用 DBCA 重建ASM磁碟組的相關問題總結OracleASM
- ASM磁碟頭ASM
- ASM 增加磁碟ASM
- Windows 下使用檔案模擬磁碟配置ASM磁碟組WindowsASM
- Oracle asm磁碟中新加磁碟OracleASM