# ahci_enable device names



## G4 (Jul 26, 2011)

Hi,

I'm running a remote 8.2-RELEASE, amd64 server, with one disk named ad2. I want enable AHCI via 
	
	



```
ahci_enable="YES"
```
 in /boot/loader.conf.

The problem is, the device will be renamed to adaX, and it will fail to boot (i don't have KVM access to the box).

An alternative is to use glabel/plain labels, but i'd still like to know if there's any way to find out the new name beforehand/without rebooting?

Thanks.


----------



## graudeejs (Jul 26, 2011)

In my experience (but I don't say that it will work same for you, or that I'm right) disk with lowest number becomes ada0, disk with 2nd lowest number becomes ada1 and so on


----------



## wblock@ (Jul 26, 2011)

AHCI numbering is dynamic.  If there's only one disk, it'll be ada0.  But use labels.


----------



## jem (Jul 27, 2011)

If you resort to labels, try to use the labelling schemes offered by UFS or GPT before trying GEOM labels.

GEOM labels are (in my view) a somewhat clumsy way of labelling a disk, creating a whole new device which is one sector smaller than the real disk.  This can only really be done safely before the disk is used for anything else.

UFS labels reside in the filesystem metadata.

GPT labels reside in the partition table.


----------



## G4 (Jul 28, 2011)

Thanks everyone.

I'll still need to get a KVM, since i can't label anything while it's mounted.


----------



## Crest (Jul 28, 2011)

Afaik GPT labels can be changes while the Partitions are in use. Maybe you have to set some GEOM debug flags first because it required writing to a provider that has consumers and their are good reasons to prohibit this in normal operation.


----------

