ORA-15031: Disk Specification Matches No Disks - ASM Discovery
ORA-15031: Disk Specification ‘path’ Matches No Disks
Section titled “ORA-15031: Disk Specification ‘path’ Matches No Disks”Error Overview
Section titled “Error Overview”Error Text: ORA-15031: disk specification '/path/to/disk' matches no disks
ORA-15031 occurs during CREATE DISKGROUP, ALTER DISKGROUP ADD DISK, or ALTER DISKGROUP RESIZE when the path or pattern provided doesn’t match any disk visible to the ASM instance. ASM scans paths defined by asm_diskstring plus any explicit paths in the command and reports which ones produced no candidates.
Common Causes
Section titled “Common Causes”Discovery String Mismatch
Section titled “Discovery String Mismatch”- Path not included in
asm_diskstringparameter - Wildcard pattern doesn’t match actual device names
- ASMLib path used but ASMLib not configured
- Spaces or escaping issues in shell-passed paths
Permissions Issues
Section titled “Permissions Issues”- Grid OS user (typically
grid) cannot read device - UDEV rules not applied or stale
- Device owned by
oracleinstead ofgrid/asmadmin - SELinux blocking access
Device Not Yet Discovered
Section titled “Device Not Yet Discovered”- New LUN presented but
oracleasm scandisksnot run - Multipath not yet aware of new device
- Server has not rescanned SCSI bus
- ASMLib createdisk not executed
Wrong Path Format
Section titled “Wrong Path Format”- Passing
/dev/sdbwhen ASM expects/dev/oracleasm/disks/DISK1 - Including partition number when whole disk required (or vice versa)
- Using filesystem path instead of raw device
Diagnostic Steps
Section titled “Diagnostic Steps”Verify Discovery String
Section titled “Verify Discovery String”-- Connect as SYSASMsqlplus / as sysasm
SHOW PARAMETER asm_diskstring;
-- Check what ASM currently seesSELECT path, header_status, mount_status, labelFROM v$asm_diskORDER BY path;Test Path Manually
Section titled “Test Path Manually”-- Force discovery of specific pathSELECT path, header_status FROM v$asm_diskWHERE path = '/dev/oracleasm/disks/DISK5';
-- Add path to discovery and retryALTER SYSTEM SET asm_diskstring='/dev/oracleasm/disks/*,/dev/mapper/mpath*' SCOPE=MEMORY;
SELECT path FROM v$asm_disk WHERE path LIKE '%DISK5%';Check OS-Level Visibility
Section titled “Check OS-Level Visibility”# Verify device existsls -la /dev/oracleasm/disks/DISK5ls -la /dev/mapper/mpathf
# Check permissions (grid user must own)# Should show: grid asmadminstat /dev/oracleasm/disks/DISK5
# Test readability as grid usersudo -u grid cat /dev/oracleasm/disks/DISK5 | head -c 100 > /dev/nullecho "Exit: $?"
# Verify ASMLib stateoracleasm statusoracleasm listdisksoracleasm querydisk -p DISK5Inspect ASM Discovery Patterns
Section titled “Inspect ASM Discovery Patterns”# Check candidate disks at OS levells -la /dev/oracleasm/disks/ls -la /dev/mapper/
# Verify multipathmultipath -ll | grep -i "size"Resolution Steps
Section titled “Resolution Steps”1. Update asm_diskstring
Section titled “1. Update asm_diskstring”Add the missing path pattern to asm_diskstring:
-- View current valueSHOW PARAMETER asm_diskstring;
-- Update to include new pathALTER SYSTEM SET asm_diskstring='/dev/oracleasm/disks/*,/dev/mapper/mpath*' SCOPE=BOTH;
-- Verify ASM sees the disk nowSELECT path, header_status FROM v$asm_disk WHERE path LIKE '%DISK5%';2. Fix Permissions
Section titled “2. Fix Permissions”# Set correct ownership for ASM accesschown grid:asmadmin /dev/sdb1chmod 660 /dev/sdb1
# For ASMLib disksoracleasm createdisk DISK5 /dev/sdb1oracleasm scandisksoracleasm listdisks
# Apply UDEV rulescat > /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOFKERNEL=="sdb1", OWNER="grid", GROUP="asmadmin", MODE="0660"EOF
udevadm control --reload-rulesudevadm trigger3. Discover New LUN
Section titled “3. Discover New LUN”# Rescan SCSI bus for new LUNsfor h in /sys/class/scsi_host/host*; do echo "- - -" > $h/scandone
# Update multipathmultipath -v3multipath -ll
# Update ASMLiboracleasm scandisksoracleasm listdisks
# Verify in ASMsqlplus / as sysasmSQL> SELECT path FROM v$asm_disk WHERE header_status='CANDIDATE';4. Use Correct Path Format
Section titled “4. Use Correct Path Format”-- For ASMLib environmentsALTER DISKGROUP data ADD DISK '/dev/oracleasm/disks/DISK5';
-- For multipath without ASMLibALTER DISKGROUP data ADD DISK '/dev/mapper/mpathf';
-- For raw partitionsALTER DISKGROUP data ADD DISK '/dev/sdb1';
-- For ASM Filter Driver (AFD)ALTER DISKGROUP data ADD DISK 'AFD:DISK5';5. Cluster-Wide Consistency
Section titled “5. Cluster-Wide Consistency”In RAC, all nodes must see the disk:
# Verify on each nodefor node in node1 node2; do ssh $node "ls -la /dev/oracleasm/disks/DISK5" ssh $node "stat /dev/oracleasm/disks/DISK5 | grep -i access"done
# Force cluster-wide rescancrsctl stat res -t | grep -i diskgroupCommon Scenarios
Section titled “Common Scenarios”Scenario 1: Adding Disk After New LUN Provision
Section titled “Scenario 1: Adding Disk After New LUN Provision”ALTER DISKGROUP data ADD DISK '/dev/oracleasm/disks/DISK5';ORA-15031: disk specification '/dev/oracleasm/disks/DISK5' matches no disksFix: Run oracleasm scandisks on all nodes, then retry.
Scenario 2: New ASM Diskstring
Section titled “Scenario 2: New ASM Diskstring”CREATE DISKGROUP fra EXTERNAL REDUNDANCY DISK '/dev/mapper/mpathx';ORA-15031: disk specification '/dev/mapper/mpathx' matches no disksFix: Add /dev/mapper/mpath* to asm_diskstring.
Scenario 3: Permission Mismatch
Section titled “Scenario 3: Permission Mismatch”Disk visible at OS but ASM cannot match it.Fix: Check disk is readable by grid user via sudo -u grid dd if=/dev/sdb1 of=/dev/null bs=1M count=1.
Sample Output
Section titled “Sample Output”SQL> ALTER DISKGROUP data ADD DISK '/dev/oracleasm/disks/DISK5';ALTER DISKGROUP data ADD DISK '/dev/oracleasm/disks/DISK5'*ERROR at line 1:ORA-15032: not all alterations performedORA-15031: disk specification '/dev/oracleasm/disks/DISK5' matches no disks
SQL> SHOW PARAMETER asm_diskstring;NAME TYPE VALUE----------------- ----------- ------------------asm_diskstring string /dev/mapper/mpath*
-- asm_diskstring doesn't include /dev/oracleasm/disks/*Prevention Strategies
Section titled “Prevention Strategies”Maintain Comprehensive Discovery String
Section titled “Maintain Comprehensive Discovery String”-- Cover all expected path schemesALTER SYSTEM SET asm_diskstring= '/dev/oracleasm/disks/*,/dev/mapper/mpath*,AFD:*' SCOPE=BOTH;Pre-Provision Validation Script
Section titled “Pre-Provision Validation Script”#!/bin/bash# Validate disk before adding to ASMDISK=$1
if [ ! -e "$DISK" ]; then echo "ERROR: $DISK does not exist" exit 1fi
OWNER=$(stat -c '%U:%G' "$DISK")if [ "$OWNER" != "grid:asmadmin" ]; then echo "ERROR: $DISK owned by $OWNER, expected grid:asmadmin" exit 1fi
if ! sudo -u grid dd if="$DISK" of=/dev/null bs=1M count=1 2>/dev/null; then echo "ERROR: grid user cannot read $DISK" exit 1fi
echo "OK: $DISK ready for ASM"Cluster-Wide Verification
Section titled “Cluster-Wide Verification”#!/bin/bashNODES="node1 node2"DISK="/dev/oracleasm/disks/DISK5"
for node in $NODES; do echo "=== $node ===" ssh $node "ls -la $DISK 2>&1; stat -c 'owner=%U group=%G mode=%a' $DISK 2>&1"doneRelated Errors
Section titled “Related Errors”- ORA-15014: Path is not in the discovery set
- ORA-15020: Discovered duplicate ASM disk
- ORA-15025: Could not open disk
- ORA-15032: Not all alterations performed
- ORA-15042: ASM disk is missing
Troubleshooting Checklist
Section titled “Troubleshooting Checklist”- Verify
asm_diskstringincludes path pattern - Confirm device exists and is readable by grid user
- Run
oracleasm scandisksfor ASMLib - Run
multipath -v3for multipath devices - Verify cluster-wide visibility in RAC
- Check UDEV rules for permission persistence
- Use correct path format for environment