# Find new disks without restart
for BUS in /sys/class/scsi_host/host*/scan
do
echo "- - -" > ${BUS}
done
# Partition ASM Candidate Disks
parted /dev/sdX mklabel gpt;
parted /dev/sdX mkpart primary 0% 100%;
# Add disk info to udev rules files here are some examples
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",ENV{ID_SERIAL}=="36000c2987d2465f778c27f80607a086f",OWNER="grid",GROUP="asmadmin",MODE="0660"
OR
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c2977ae4fe1c8aa2d306aff2713f", SYMLINK+="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
OR
# If Rename DM_NAME with Multipath as ORADATA1 ORADATA2 we can write rule as
vi 99-oracle-asmdevices.rules
ENV{DM_NAME}=="ORA?*", OWNER:="oracle", GROUP:="asmadmin", MODE:="660"
# Find WWID
multipath -ll
# Rename DM_NAME with Multipath
vi /etc/multipath.conf
multipaths {
multipath {
wwid 360050768018687b75000000000000041
alias ORADATA1
}
multipath {
wwid 360050768018687b7500000000000006c
alias ORADATA2
}
multipath {
wwid 360050768018687b75000000000000089
alias ORADATA3
}
multipath {
wwid 360050768018687b75000000000000091
alias ORADATA4
}
multipath -f ORADATA4
service multipathd reload
# Check
multipath -ll
https://access.redhat.com/solutions/66254
https://access.redhat.com/solutions/474593
lsscsi -i
[0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda 36000c298e247294962b73d1c5489d6cc
[0:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb 36000c2987d2465f778c27f80607a086f
[0:0:2:0] disk VMware Virtual disk 1.0 /dev/sdc 36000c294c6193e171d43e93841002bf6
[2:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 -
# If no disk id on Vmware server
https://access.redhat.com/solutions/94583
udevadm test /block/sdb/sdb1
udevadm test /block/sdb/sdc1
udevadm control --reload-rules && udevadm trigger
ls -al /dev/asm-disk*
lrwxrwxrwx. 1 root root 4 Sep 7 13:52 /dev/asm-disk1 -> sdb1
lrwxrwxrwx. 1 root root 4 Sep 7 13:52 /dev/asm-disk1 -> sdc1
ls -lh /dev/sd*
brw-rw----. 1 root disk 8, 0 Sep 7 10:19 /dev/sda
brw-rw----. 1 root disk 8, 1 Sep 7 10:19 /dev/sda1
brw-rw----. 1 root disk 8, 2 Sep 7 10:19 /dev/sda2
brw-rw----. 1 root disk 8, 16 Sep 7 13:43 /dev/sdb
brw-rw----. 1 oracle dba 8, 17 Sep 7 13:52 /dev/sdb1
brw-rw----. 1 root disk 8, 16 Sep 7 13:43 /dev/sdc
brw-rw----. 1 oracle dba 8, 17 Sep 7 13:52 /dev/sdc1
# Change DISCOVER PATH
# ASM_DISKSTRING initialization parameter in the ASM instance can be set to '/dev/asm-disk*' to identify the ASM disks.
Kaynaklar : Udev Scsi Rules Configuration
Etiketler :
Oracle