The SAN administrator recently informed us that several disks were extended from 300GB to 600GB. These multipath disks belong to an ASM diskgroup named ARCH, used for storing archive logs in a 2-node RAC configuration (Oracle 11.2.0.3 on RHEL 5.9).
While the SAN extension was complete, the Operating System and ASM were not yet aware of the additional space. This guide walkthrough the steps to align the OS and Oracle ASM with the new physical disk sizes.
Initially, checking the multipath device with fdisk confirmed that the OS still recognized the old size (~322 GB instead of the expected 644 GB)
fdisk -l /dev/mpath/mpath_compellent_oraarch # Result: Disk /dev/mpath/mpath_compellent_oraarch: 322.1 GB
We first check the ARCH diskgroup in ASM to see how Oracle perceives the disks
select g.name, d.path, d.os_mb, d.total_mb from v$asm_diskgroup g, v$asm_disk d where g.group_number = d.group_number and g.name = 'ARCH'; -- Result shows total_mb at 307200 (300GB)
To ensure we are working on the correct devices, we map the ASM disk names to their major and minor numbers, then compare those against the devices in /dev/mapper
ls -l /dev/oracleasm/disks/ASMDISK_NEW_ARCH* # Yields major 253, minor 30, 29, 32 ls -l /dev/mapper/mpath_compellent_oraarch* # Confirms the same major/minor numbers
Because these are multipath devices, we must identify the specific SCSI devices (e.g., /dev/sdfm, /dev/sdgd) that form the paths
multipath -l # Identifies disks: /dev/sdfm, /dev/sdgd, /dev/sdfi, /dev/sdfk, /dev/sdfj, /dev/sdgc
Note: Repeat this identification on all RAC nodes, as the underlying device names (sdX) will likely differ between servers.
For the OS to recognize the new size, a rescan must be triggered for every underlying path on every node.
Perform the following for each identified disk
echo 1 > /sys/block/sdfm/device/rescan
Verifying with fdisk now shows the updated size
fdisk -l /dev/sdfm # Result: Disk /dev/sdfm: 644.2 GB
Once the paths are updated, tell the multipath daemon to resize the map
multipathd -k'resize map mpath_compellent_oraarch'
Final OS verification
fdisk -l /dev/mpath/mpath_compellent_oraarch # Result: Disk /dev/mpath/mpath_compellent_oraarch: 644.2 GB
The final step is to inform Oracle ASM of the new capacity. Notice that os_mb now reflects the new size (600GB), but total_mb (what ASM uses) is still at the old value.
Run the following within the ASM instance
-- Check current state select g.name, d.path, d.os_mb, d.total_mb from v$asm_diskgroup g, v$asm_disk d where g.group_number = d.group_number and g.name = 'ARCH'; -- Resize all disks in the group to match the OS size alter diskgroup ARCH resize all;
After the command completes, total_mb will match os_mb, and your diskgroup will have double the capacity. The disks and diskgroup were successfully resized without downtime.
Ready to optimize your Oracle Database for the future?