Understanding Dual SCSI/ATA Device Entries for ZFS Pool Configuration on Linux


4 views

When working with SATA drives on Linux systems, you'll often encounter duplicate entries under /dev/disk/by-id. This occurs because the Linux kernel exposes the same physical drive through both the ATA and SCSI subsystems due to libata's SCSI emulation layer. Each Hitachi drive in your setup is represented twice:

ata-Hitachi_HDS5C3030ALA630_MJ1323YNG0ZJ7C
scsi-SATA_Hitachi_HDS5C30_MJ1323YNG0ZJ7C

Modern Linux kernels use the libata driver for both PATA and SATA devices, which implements a SCSI translation layer. This creates two logical paths to the same physical device:

  • ata-*: Direct ATA subsystem path
  • scsi-*: SCSI emulation path through libata

For ZFS pool creation, you should consistently use the ata- prefixed identifiers because:

  1. They contain the complete model number (HDS5C3030ALA630 vs HDS5C30)
  2. They're more stable across reboots and hardware changes
  3. They match the physical drive labeling exactly

Example of proper ZFS pool creation:

zpool create tank \
  mirror ata-Hitachi_HDS5C3030ALA630_MJ1323YNG0ZJ7C \
         ata-Hitachi_HDS5C3030ALA630_MJ1323YNG1064C \
  mirror ata-Hitachi_HDS5C3030ALA630_MJ1323YNG190AC \
         ata-Hitachi_HDS5C3030ALA630_MJ1323YNG1DGPC

To confirm these are indeed the same devices, use these commands:

# Compare major/minor numbers
ls -l /dev/disk/by-id/ata-Hitachi* /dev/disk/by-id/scsi-SATA_Hitachi* | awk '{print $5,$6,$11}'

# Check physical sector information
hdparm -I /dev/disk/by-id/ata-Hitachi_HDS5C3030ALA630_MJ1323YNG0ZJ7C | grep -i serial
hdparm -I /dev/disk/by-id/scsi-SATA_Hitachi_HDS5C30_MJ1323YNG0ZJ7C | grep -i serial

Using device identifiers properly ensures:

  • Consistent pool import across reboots
  • Accurate fault detection and replacement
  • Proper alignment with physical hardware labels
  • Stable performance monitoring metrics

Remember that while both identifiers will technically work, the ata- version provides more complete information and better matches the physical drive labeling.


When working with modern Linux systems, you'll often notice that SATA drives appear under both SCSI and ATA identifiers in /dev/disk/by-id. This behavior stems from the Linux kernel's storage subsystem architecture:

# Example output showing dual entries
ls -l /dev/disk/by-id | grep -E 'ata-|scsi-'

Linux implements SATA device handling through two parallel subsystems:

  • SCSI subsystem: Uses the libata layer that presents SATA devices as SCSI devices
  • ATA subsystem: Direct ATA passthrough interface

For ZFS pool creation, either identifier will work, but best practices suggest:

# Preferred method using ata- identifiers
zpool create tank \
  ata-Hitachi_HDS5C3030ALA630_MJ1323YNG0ZJ7C \
  ata-Hitachi_HDS5C3030ALA630_MJ1323YNG1064C \
  ata-Hitachi_HDS5C3030ALA630_MJ1323YNG190AC \
  ata-Hitachi_HDS5C3030ALA630_MJ1323YNG1DGPC

# Alternative using scsi- identifiers (works but less preferred)
zpool create tank \
  scsi-SATA_Hitachi_HDS5C30_MJ1323YNG0ZJ7C \
  scsi-SATA_Hitachi_HDS5C30_MJ1323YNG1064C \
  scsi-SATA_Hitachi_HDS5C30_MJ1323YNG190AC \
  scsi-SATA_Hitachi_HDS5C30_MJ1323YNG1DGPC

The ata- identifiers offer several advantages:

  • More complete model number information
  • Consistent naming across different controller types
  • Better compatibility with SMART monitoring tools

To confirm you're using the correct devices:

# Check physical device mapping
lsblk -o NAME,MODEL,SERIAL -d

# Verify SMART data
smartctl -i /dev/sdX | grep -i serial

# Cross-reference with by-id entries
ls -l /dev/disk/by-id | grep sdX

When using ZFS, remember that:

  • ZFS internally tracks devices by GUID, not by path
  • Pool will remain intact even if device paths change
  • For maximum reliability, consider using by-id paths in /etc/zfs/zfs-list.cache

If you encounter problems with device detection:

# Rescan SATA devices
echo 1 > /sys/class/scsi_device/*/device/rescan

# Check kernel messages for storage events
dmesg | grep -i ata

# Verify module loading
lsmod | grep -E 'ahci|libata'