# ahci disk device names



## Ghirai (Jul 9, 2010)

Hi,

Is there a way to find out the new adaX names before enabling AHCI and
rebooting?

Currently i have ad2, and i'd like to edit fstab so that it will work
when rebooting, w/o manual fixing.

Thanks.


----------



## jem (Jul 9, 2010)

It'll most likely be ada0.

Another option is to label your partitions and use those to mount instead.


----------



## Ghirai (Jul 9, 2010)

Right i forgot about glabel, thanks.


----------



## fronclynne (Jul 9, 2010)

You also have the [red]-L[/red] option to newfs(8) & tunefs(8).  If you use a variation on `# tunefs -L varfs /dev/ad2s1d`, you ought to keep in mind that like the /dev/ufsid/ labels they'll be automatically removed from /dev/ufs/ if you don't use them at boot time.  (I'm sure there's some workaround for that, I'm just not sure what it might be, maybe devd.conf(5)?)


----------



## jb_fvwm2 (Jul 9, 2010)

I managed to setup labels with 3 of four
filesystems (ad0s2a excepted).  For some
reason that fails to setup in the same
manner that I did the other three, but I
am resigned for now to having to know 
only one
non-label device name.
...
Sooner or later someone will setup a 
comprehensive guide to labelling probably.
...


----------



## wblock@ (Jul 9, 2010)

jb_fvwm2 said:
			
		

> I managed to setup labels with 3 of four
> filesystems (ad0s2a excepted).  For some
> reason that fails to setup in the same
> manner that I did the other three



tunefs will only let you label an unmounted or *read-only* filesystem.  This sticks out in my mind because it happened to me, too.  While the filesystem is read-only, apparently the label is not.



> Sooner or later someone will setup a
> comprehensive guide to labelling probably.
> ...



It's not that comprehensive, but http://www.wonkity.com/~wblock/docs/html/ahci.html lists the steps.


----------



## SirDice (Jul 10, 2010)

wblock said:
			
		

> While the filesystem is read-only, apparently the label is not.


That's because glabel accesses the disk directly, not via the filesystem.


----------



## wblock@ (Jul 10, 2010)

SirDice said:
			
		

> That's because glabel accesses the disk directly, not via the filesystem.



Yes, or put another way, the label isn't part of the filesystem.


----------

