# Surprise with partitions after use of bsdinstaller



## getopt (Aug 18, 2016)

I did setup a new RELEASE-10.3 system with Bsdinstaller but it did not workout as expected.
I choose zfs on root and encrypted swap.

Now i discovered that there is no swap activated and after looking into partitions I see that they are not named as expected.


```
# gpart list ada0
gpart: No such geom: ada0.
```
WTF!#@ what happened to my disk??
Now:

```
# ll /dev/ad*
lrwxr-xr-x  1 root  wheel        4B 18 Aug 13:53 /dev/ad4@ -> ada0
crw-r-----  1 root  operator   0x6e 18 Aug 13:53 /dev/ada0
```
Upps! Where are the partitions gone like /dev/ada0p[1-3]?
Instead found this:

```
# ll /dev/diskid/
total 0
crw-r-----  1 root  operator   0x76 18 Aug 13:53 DISK-LONGFOOBAR
crw-r-----  1 root  operator   0x7d 18 Aug 13:53 DISK-LONGFOOBARp1
crw-r-----  1 root  operator   0x7e 18 Aug 13:53 DISK-LONGFOOBARp2
crw-r-----  1 root  operator   0x7f 18 Aug 13:53 DISK-LONGFOOBARp3
```

What knobs did cause this behavior? Is this now standard, why?
And most important how can this be reverted so that I can use the old known /dev/ada0p[1-3] naming?


----------



## ANOKNUSA (Aug 19, 2016)

The /dev/ada0 device nodes have "whithered." Block devices can be accessed through several aliases: firmware-assigned drive letter (/dev/*), disk ID (/dev/diskid/*, as in your case), GPT labels (/dev/gpt/*), glabel(8) labels (/dev/label/*), UFS labels (/dev/ufs/*)... Once a filesystem on a block device is mounted/accessed by one of those means, the other aliases "whither," disappearing so as to avoid confusion and prevent anything else from performing illegal or undesirable actions on a device already in use. Which one is used by the system seems to have something to do with how the init process first detects the device; I've seen the same behavior with GPT labels being ignored in preference of plain old drive letters.

Now, I know there's a way to specify which method you wish to use to access block devices, involving disabling all other means besides the one you want, and I know sysctl(8) is involved. But at the moment I can't recall the exact steps. Hopefully someone will come along with more details; I have a feeling @wblock might know, since I also have a feeling I might have read it on his site, but my brain hasn't quite started working yet this morning so I can't recall.


----------



## tsarya (Aug 30, 2016)

"withering" is controlled via the following kernel tunables (GPT and Disk ID Labels):

```
# sysctl -a | grep kern.geom.label.gpt
kern.geom.label.gptid.enable: 1
kern.geom.label.gpt.enable: 1
```
If set to 1 both gpt and gptid device nodes are shown under /dev/gpt and /dev/gptid.

You can set them in /boot/loader.conf based on your needs.


----------

