# /dev/ad4 becomes /dev/ada0?



## dougs (Feb 17, 2012)

Upgraded from 8.1-RELEASE to 9.0-RELEASE yesterday and smartd won't start. Investigation revealed that what used to be /dev/ad4 is now /dev/ada0! However, the df(1) command still display the drive as /dev/ad4.

How can I rearrange this so that either /dev/ada0 equal /dev/ad0 *or* /dev/ad4 equals /dev/ada4? I know I will continue to be confused every once in a while and then remember that on this particular server it's either /dev/ad4 or /dev/ada0!

~Doug


----------



## Ajira (Feb 17, 2012)

If you look carefully, then you will see that /dev/ad4 is now actually a symbolic link to /dev/ada0. If you just change your configuration to match the new device name, it should work out just fine. Also, don't forget to add the following in your kernel configuration, or smartmontools won't be able to access your hard drive:


```
device pass
```

(see: http://forums.freebsd.org/showthread.php?t=29692 for more info)


----------



## wblock@ (Feb 17, 2012)

Use labels and never have to worry about device names or numbers again: FreeBSD Labeled Filesystems.


----------



## dougs (Feb 17, 2012)

Ah, yes, you're right. Here's my /dev/ad* listing:

```
corvus-root@/usr/local/etc# ll /dev/ad*
lrwxr-xr-x  1 root  wheel            4 Feb 17 11:37 /dev/ad4 -> ada0
lrwxr-xr-x  1 root  wheel            6 Feb 17 11:37 /dev/ad4s1 -> ada0s1
lrwxr-xr-x  1 root  wheel            7 Feb 17 11:37 /dev/ad4s1a -> ada0s1a
lrwxr-xr-x  1 root  wheel            7 Feb 17 11:37 /dev/ad4s1b -> ada0s1b
lrwxr-xr-x  1 root  wheel            7 Feb 17 11:37 /dev/ad4s1d -> ada0s1d
lrwxr-xr-x  1 root  wheel            7 Feb 17 11:37 /dev/ad4s1e -> ada0s1e
lrwxr-xr-x  1 root  wheel            7 Feb 17 11:37 /dev/ad4s1f -> ada0s1f
crw-r-----  1 root  operator    0,  96 Feb 17 11:37 /dev/ada0
crw-r-----  1 root  operator    0,  98 Feb 17 11:37 /dev/ada0s1
crw-r-----  1 root  operator    0, 101 Feb 17 03:37 /dev/ada0s1a
crw-r-----  1 root  operator    0, 103 Feb 17 11:37 /dev/ada0s1b
crw-r-----  1 root  operator    0, 105 Feb 17 03:37 /dev/ada0s1d
crw-r-----  1 root  operator    0, 107 Feb 17 03:37 /dev/ada0s1e
crw-r-----  1 root  operator    0, 109 Feb 17 03:37 /dev/ada0s1f
corvus-root@/usr/local/etc#
```
I assume that if I edit my /etc/fstab to reflect the change to /dev/ada0, that should take care of the issue, right?

Side question: what does the letter 'c' at the beginning of the last seven lines of the 'll' output above refer to?

~Doug


----------



## drhowarddrfine (Feb 18, 2012)

The 'c' means it's a character device.


----------



## dougs (Feb 18, 2012)

I can confirm that editing /etc/fstab as follows:


```
corvus-root@~# cat /etc/fstab  
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ada0s1b            none            swap    sw              0       0
/dev/ada0s1a            /               ufs     rw              1       1
/dev/ada0s1e            /tmp            ufs     rw              2       2
/dev/ada0s1f            /usr            ufs     rw              2       2
/dev/ada0s1d            /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
corvus-root@~# df
Filesystem   1K-blocks    Used     Avail Capacity  Mounted on
/dev/ada0s1a   2026030  550600   1313348    30%    /
devfs                1       1         0   100%    /dev
/dev/ada0s1e   2026030   20080   1843868     1%    /tmp
/dev/ada0s1f 227373100 6345390 202837862     3%    /usr
/dev/ada0s1d   3045006 1180078   1621328    42%    /var
corvus-root@~#
```

results in obtaining an updated listing of partition names reflecting changes in the ATA subsystem of FreeBSD 9.0. And it boots fine.

@wblock: the use of labels looks interesting!

~Doug


----------



## drhowarddrfine (Feb 18, 2012)

You are at the same point as I am. I just installed v9 using gpt on an older ATA system and it works good but I'm going out of town in the morning until Sunday night. It's using labels as Warren talks about.


----------



## kb6rxe (Feb 20, 2012)

I just got the same message when I tried to install FreeBSD 8.3 Beta today. I tried it on two different computers. How do I fix it?


----------



## wblock@ (Feb 20, 2012)

What message?


----------



## kb6rxe (Feb 20, 2012)

Sorry,  I had a disk with FreeBSD 8.x installed on it and it booted ok today. When I tried to install 8.3 Beta on it I got the following error message:


```
unable to find device node for /dev/ad4s1b in /dev
```


----------



## wblock@ (Feb 21, 2012)

That's unrelated to this thread.


----------

