I've been using encrypted ZFS root for almost two years now and it has worked great on my old server. On my new server I'll be using pretty much the same setup/configuration but I was wondering: how do I stop my device names changing on my new server? This has never been an issue on my old server as the hardware setup was static but on my new server I'll be adding more disks over the coming years.
I think an example will explain the problem I have:
I have 8 SAS ports on my motherboard which are labelled SAS0 through to SAS7 on the ports itself on the motherboard. Currently my hard drives are connected as follows and have the following FreeBSD device names:
This all works great if I don't ever change the disks. Now picture this: one of my SSD drives fails and I need to shutdown the server to remove it. When I power back up the 1TB Samsung SATA drive device name changes from da2 to da0 or da1! So the question I have is: how do I prevent my device names from changing at all? Ideally what I would like to do is reserve my SAS ports (0 through to 7) as follows:
SAS0 = da0
SAS1 = da1
...
SAS7 = da7
I have been reading about the following options so far but am unsure of how to proceed or which option to choose:
Thanks!
I think an example will explain the problem I have:
I have 8 SAS ports on my motherboard which are labelled SAS0 through to SAS7 on the ports itself on the motherboard. Currently my hard drives are connected as follows and have the following FreeBSD device names:
- First Samsung 840 Pro SSD connected to SAS0 port and is called da0 in FreeBSD
- Second Samsung 840 Pro SSD connected to SAS1 port and is called da1 in FreeBSD
- Samsung 1TB SATA drive connected to SAS7 and is called da2 in FreeBSD
This all works great if I don't ever change the disks. Now picture this: one of my SSD drives fails and I need to shutdown the server to remove it. When I power back up the 1TB Samsung SATA drive device name changes from da2 to da0 or da1! So the question I have is: how do I prevent my device names from changing at all? Ideally what I would like to do is reserve my SAS ports (0 through to 7) as follows:
SAS0 = da0
SAS1 = da1
...
SAS7 = da7
I have been reading about the following options so far but am unsure of how to proceed or which option to choose:
- Wire down the port. I have read about this online but there is little info regarding this and I am confused (or unsure) how to implement this. I did read it in the book Absolute FreeBSD but it still doesn't make sense to me.
- Someone mentioned to me about setting the following option in a custom kernel:
ATA_STATIC in /usr/src/sys/i386/conf/GENERIC
I don't have access to the server right now so I can't check if this option is set in GENERIC now on FreeBSD 9.2 STABLE. I think it is but my device names are still changing. This option is set on my old server in my custom kernel but I never enabled this myself so I assume its the default.
- Last but not least: labels. From what I understand you can't use glabels with geli encryption so this isn't an option. What I have heard from someone is that I can use GPT labels with geli; is this an option? If this is an option how can I start using GPT labels on an already built and configured encrypted ZFS root system? How do glabels differ from GPT labels?
Thanks!