연결된 디스크 확인
fdisk -l
[root@rac1 ~]# fdisk -l Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 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: 0x000d0cb9 Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 209715199 104344576 8e Linux LVM Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 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 /dev/sdc: 1073 MB, 1073741824 bytes, 2097152 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 /dev/sdd: 1073 MB, 1073741824 bytes, 2097152 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 /dev/sde: 32.2 GB, 32212254720 bytes, 62914560 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 /dev/sdf: 21.5 GB, 21474836480 bytes, 41943040 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 /dev/mapper/rhel-root: 96.1 GB, 96108281856 bytes, 187711488 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 /dev/mapper/rhel-swap: 10.7 GB, 10737418240 bytes, 20971520 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
{}
디스크별 ID 검색
/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdb /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdc /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdd /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sde /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdf
[root@rac1 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdb 1ATA_VBOX_HARDDISK_VBe9886aef-3f384d42 [root@rac1 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdc 1ATA_VBOX_HARDDISK_VBfff1ca07-05d2258c [root@rac1 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdd 1ATA_VBOX_HARDDISK_VB112c83f3-7868ab48 [root@rac1 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sde 1ATA_VBOX_HARDDISK_VB4deecc17-5a3191ee [root@rac1 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdf 1ATA_VBOX_HARDDISK_VBd88160c4-cd7f52a5
vi /etc/udev/rules.d/99-oracle-asmdevices.rules 로 ASM 디바이스 룰 생성
KERNEL=="sd?", ENV{ID_SERIAL}=="VBOX_HARDDISK_VBe9886aef-3f384d42", SYMLINK+="oracleasm/disks/CRS1", OWNER="oracle", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="VBOX_HARDDISK_VBfff1ca07-05d2258c", SYMLINK+="oracleasm/disks/CRS2", OWNER="oracle", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="VBOX_HARDDISK_VB112c83f3-7868ab48", SYMLINK+="oracleasm/disks/CRS3", OWNER="oracle", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="VBOX_HARDDISK_VB4deecc17-5a3191ee", SYMLINK+="oracleasm/disks/DATA1", OWNER="oracle", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="VBOX_HARDDISK_VBd88160c4-cd7f52a5", SYMLINK+="oracleasm/disks/FRA01", OWNER="oracle", GROUP="asmadmin", MODE="0660"
udev 설정 정보 재로딩
udevadm control --reload-rules udevadm trigger
[root@rac1 ~]# udevadm control --reload-rules [root@rac1 ~]# udevadm trigger
등록 결과 확인
ll /dev/oracleasm/disks ll /dev/sd*
[root@rac1 ~]# ll /dev/oracleasm/disks total 0 lrwxrwxrwx. 1 root root 9 Aug 31 07:15 CRS1 -> ../../sdb lrwxrwxrwx. 1 root root 9 Aug 31 07:15 CRS2 -> ../../sdc lrwxrwxrwx. 1 root root 9 Aug 31 07:15 CRS3 -> ../../sdd lrwxrwxrwx. 1 root root 9 Aug 31 07:15 DATA1 -> ../../sde lrwxrwxrwx. 1 root root 9 Aug 31 07:15 FRA01 -> ../../sdf [root@rac1 ~]# ll /dev/sd* brw-rw----. 1 root disk 8, 0 Aug 31 07:15 /dev/sda brw-rw----. 1 root disk 8, 1 Aug 31 07:15 /dev/sda1 brw-rw----. 1 root disk 8, 2 Aug 31 07:15 /dev/sda2 brw-rw----. 1 oracle asmadmin 8, 16 Aug 31 07:15 /dev/sdb brw-rw----. 1 oracle asmadmin 8, 32 Aug 31 07:15 /dev/sdc brw-rw----. 1 oracle asmadmin 8, 48 Aug 31 07:15 /dev/sdd brw-rw----. 1 oracle asmadmin 8, 64 Aug 31 07:15 /dev/sde brw-rw----. 1 oracle asmadmin 8, 80 Aug 31 07:15 /dev/sdf