Hi.
I'm relatively new to FreeBSD with no experience in this area. However, I've spent half of my day reading up on labels, and have a few comments. I'm hoping that someone like phoenix who is more experienced with labels might have some more to say on this topic.
I started the day with the same problem as craigyk, though smaller -- namely, I have a 16 disk storage unit with da0 through da15 that has wacky numbering (eg. da4 is disk 9). Now, up until today, I was just using whole devices (eg. /dev/da4) in my zpool create because that's what the FreeBSD documentation demonstrated, that's what the various Solaris-based ZFS tutorials mention, etc, and after all, it seems "easiest", even though it meant that in the case of replacing a disk, I had to be extra extra careful that I was removing the right disk.
Later, I read that if you use full device names in creating a zpool, and the disk mapping changes that this can cause problems. For example, if you remove disks from your chassis that maybe have nothing to do with your zpool, and you reboot, then when say, /dev/da4 which is part of a raidz1 vdev changes from being disk 9 to disk 7 that the zpool will be broken? Is that really true? Is shuffling the devices in the storage array enough to confuse ZFS from finding the disks that make up a zpool if you don't use labels? If this is the case, then surely labeling is something that is really more than just convenient -- almost downright "necessary"!!
But labeling seems to have its fair share of "issues" as well. The first method I read about was labeling full disks using "glabel" (GEOM-based labels). Many people seem to be using the glabel method of labeling on full disks (as opposed to partitioned disks) since full disks are recommended for ZFS for anything but the boot volumes.
Using glabel in itself seemed easy enough, but after reading through enough pages, I started to read about problems that *some* people had with that. Apparently, glabel writes the label to the last block on the device, and if you are going to write to the last block of the device, and you're giving ZFS the whole device, then you may in fact be "corrupting" the filesystem, and this could come back to bite you at some point. There are people who say this isn't a problem, and there are people who say that this is a problem. ugh. I can understand how it might be a problem though, although it would clearly make sense to me, not knowing how ZFS works, would be for ZFS to automatically shave off a few blocks from the end of the disk to ensure that this problem couldn't happen and that labels and ZFS could co-exist on full disks without partitions, but I'm sure there are reasons why this doesn't happen.
In addition, I read that apparently this type of GEOM labeling isn't supported on OpenSolaris/Solaris -- so if you have problems with FreeBSD and decide to move to OpenSolaris/Solaris, it's not clear if you can? I did read that the labels will be overwritten by OpenSolaris/Solaris. I am certain that I'd want to know if the system that I use to label my disks would make my zpool incompatible with other ZFS implementations.
One solution to at least the writing the label to the end of the full disk problem with GEOM seems to be to use a partition on the disk. Adding a partition and having it encompass the whole disks seems to "complicate" the issue of adding new ZFS disks to a system. I mean, no, partitions aren't complicated in themselves -- they're just containers and all, but having to partition the disk just to place a label on it seems a little overkill to me, but something I would do if I had to. It just seems easier to give ZFS a disk, and have it go to work. After all, if I partition my disks, then I guess I can't rely on ZFS to automatically replace disks with spares because I need to partition the disk, and re-label the disk dependent on its location in the disk chassis!
I then read various stuff about GPT partitions and labels. It's not clear whether using a GEOM label or GPT label is better. One page said that GEOM labels are not compatible with OpenSolaris/Solaris and you better use GPT labels, while the other page says that you better use GEOM labels for compatibility. It's the classic case of google confusion..
The problem is, I don't know what to believe.
So, over the years, the recommendations on FreeBSD disk labeling seem to be changing. In August 2012, I'm looking for the best label mechanism for disks that would allow exporting the ZFS pool to OpenSolaris/Solaris later if need be. If I need to partition individual disks to label them, I want to understand how use of an "automated" spare would occur? Now, phoenix also mentioned sector alignment -- that's another tricky area with a lot of conflicting information. If I *have* to partition my disks for labeling, I might as well worry about proper sector alignment at the same time, so any referral to a good document would be appreciated here as well.
Thanks for any advice that you may have!
Jason.