Host Side Linking for Mac OS X
The Mac OS X Storage pattern provides comprehensive storage discovery functionality for Mac OS X hosts. This pattern discovers and creates disk drives for physical and logical storage devices, establishing relationships between the host, filesystems, and their underlying storage infrastructure. By running the diskutil command, the pattern attempts to obtain storage information. It then creates appropriate disk drive nodes for each discovered storage device, including support for Apple's CoreStorage technology.
The pattern's key capabilities include:
- Discovering physical disk drives attached to Mac OS X systems.
- Handling Apple CoreStorage logical volumes.
- Supporting Hard Disk Drives (HDD) and Solid-State Drives (SSD) drive types.
- Linking filesystems to their underlying storage devices.
- Excluding virtual disk images and irrelevant devices.
- Managing Redundant Array of Independent Disks (RAID) configurations (basic detection).
- Capturing comprehensive disk attributes, including UUIDs.
Software pattern summary
The following table gives an overview of the pattern characteristics:
| Attribute | Value |
| Pattern Name | MacOSX_Storage |
| Module | MacOSX_Storage |
| Category | Storage |
| Publishers | Apple |
| Products | Disk, LV, CoreStorage |
Prerequisites
To discover Mac OS X Storage pattern systems, make sure that you have the following configurations:
- diskutil command must be available on the target system.
- Appropriate discovery credentials for command execution.
Supported storage types
The following table shows the Mac OS X storage types and their associated components that can be discovered and modeled:
| Storage type | Component |
|---|---|
| Apple CoreStorage |
|
| Physical Disk Drives |
|
| RAID Configurations |
|
Trigger conditions
The MacOSXStorage pattern is triggered by hosts where os_type equals Mac OS X and the diskutil command is available, with all local storage devices processed.
Software instance type attributes
The Physical Disk Drive attributes are as follows:
| Attribute | Description |
| key | Unique identifier (host.key/disk_id). |
| name | Device node path (/dev/diskN). |
| type | Drive type (HDD or SSD). |
| model | Device model name. |
| vendor | Not set as not available in diskutil. |
| speed | Not set as not available in diskutil. |
| virtual | True or False. |
| size | Drive capacity in bytes. |
| lvf_uuid | CoreStorage LVF UUID. |
| lvg_uuid | CoreStorage LVG UUID. |
| lv_uuid | CoreStorage LV UUID. |
| volume_uuid | Volume UUID. |
Discovery run process
The Mac OS X Storage pattern discovers and models storage devices through the following steps:
- The Mac OS X Storage pattern locates the diskutil command on the target system and validates its availability before proceeding.
- The pattern executes diskutil list -plist to retrieve all disks and partitions, parsing the XML plist output to extract disk identifiers.
- The pattern executes diskutil info -plist <disk_id> for each disk and parses detailed disk information from the plist format.
- The pattern classifies obtained devices: identifies virtual versus physical devices, excludes disk images and virtual devices, and detects SSD versus HDD based on the SolidState property.
- The pattern maps CoreStorage logical volumes to physical devices, maintains lookup tables for device relationships, and links logical volumes to their backing physical storage.
- The pattern creates a DiskDrive node for each physical device, with appropriate attributes set based on device properties, and establishes containment and usage relationships.
- The pattern links discovered filesystems to their backing disk drives, handles partition-based filesystems, and supports CoreStorage volume mapping.
Relationship creation
The pattern establishes the following relationship model:
Host (Mac OS X)
|
| (Containment + StorageUse)
v
Disk Drive (physical/logical)
|
| (StorageUse)
v
FileSystem (local)Limitations
Mac OS X Storage discovery has the following limitations:
- Vendor information not available through diskutil.
- Drive rotation speed not captured.
- Limited RAID configuration details.
- Dependent on the diskutil command availability.
Dependencies
Mac OS X Storage discovery has the following dependencies:
- Common_Functions import.
- DiscoveryFunctions import.
- diskutil command on the target system.
- Appropriate system access permissions.
Troubleshooting
The following troubleshooting steps address common issues that might occur during Mac OS X storage discovery and provide recommended resolutions.
Issue symptom A
No disk drives discovered.
Resolution
- Verify that the diskutil command is available.
- Check command execution permissions.
- Confirm host OS type detection.
Issue symptom B
Incomplete disk information
Resolution
- Check the diskutil info command output.
- Verify XML plist parsing.
- Review device filtering logic.
Issue symptom C
Filesystem linking failures.
Resolution
- Verify that DiscoveredFileSystem has device_id.
- Check device node path mapping.
Key log messages for monitoring
- Could not locate command - diskutil not found.
- diskutil info -plist %disk_id% failed - individual disk query failure.
- diskutil list -plist failed - primary command failure.
- Failed to parse plist for %disk_id% - XML parsing error.
- No diskutil command - command location failure.
- RAID Master/RAID Slice - RAID configuration detected.
- Skipping %disk_id% (disk image) - disk image excluded.
- Virtual disk %disk_id% - CoreStorage LV detected.