Logical Disk to Physical Drive Mapping

Wes Morgan morganw at chemikals.org
Fri Jun 12 23:40:05 UTC 2009


On Fri, 12 Jun 2009, Peter Jones wrote:

> Given the situation where you have several identical physical drives,
> what is the best way to turn logical labels such as da5 into a physical
> identifier like "the drive in slot 4"?
>
> It looks like I could use dmesg, some assumptions, and glabel to label
> the logical disks.  However, I plan to use ZFS and as far as I can tell
> glabel doesn't support ZFS.
>
> What is the de facto way of doing this?  I'll be using FreeBSD-CURRENT
> for this, btw.

Use ATA_STATIC_ID for the ATA subsystem to prevent unit numbers from 
changing when devices are added or removed. For SCSI devices, you can wire 
down the naming scheme with something like this in /boot/device.hints:

hint.scbus.0.at="mpt0"
hint.da.0.at="scbus0"
hint.da.0.target="0"
hint.da.1.at="scbus0"
hint.da.1.target="1"
hint.da.2.at="scbus0"
hint.da.2.target="2"
hint.da.3.at="scbus0"
hint.da.3.target="3"


More information about the freebsd-fs mailing list