From owner-freebsd-questions@FreeBSD.ORG Wed Dec 14 21:18:55 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2901D106564A for ; Wed, 14 Dec 2011 21:18:55 +0000 (UTC) (envelope-from lists@midsummerdream.org) Received: from p3plsmtpa06-04.prod.phx3.secureserver.net (p3plsmtpa06-04.prod.phx3.secureserver.net [173.201.192.105]) by mx1.freebsd.org (Postfix) with SMTP id 05C428FC1B for ; Wed, 14 Dec 2011 21:18:54 +0000 (UTC) Received: (qmail 18565 invoked from network); 14 Dec 2011 21:18:53 -0000 Received: from unknown (70.131.50.227) by p3plsmtpa06-04.prod.phx3.secureserver.net (173.201.192.105) with ESMTP; 14 Dec 2011 21:18:53 -0000 Message-ID: <4EE912BC.502@midsummerdream.org> Date: Wed, 14 Dec 2011 15:18:52 -0600 From: Rob User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4ED98E9F.9010401@midsummerdream.org> <4EDA489B.9060503@midsummerdream.org> <4EDA56A3.6090108@cyberleo.net> In-Reply-To: <4EDA56A3.6090108@cyberleo.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: AHCI driver and static device names X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lists@midsummerdream.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2011 21:18:55 -0000 On 12/3/11 11:04 AM, CyberLeo Kitsana wrote: > To answer your question, though: You cannot combine GPT with glabel (or > any other geom class that writes data to the first or last 34 sectors of > a disk, like gmirror) due to layout conflicts. MBR and BSD schemes can > be used, since they occupy only the first sectors of the device, and > their monikers will be appended to the label. Thus, labeling a > single-slice MBR disk (/dev/ada0) with 'test' would produce /dev/ada0, > /dev/ada0s1, /dev/label/test, and /dev/label/tests1; nesting a BSD table > within s1 would add /dev/ada0s1a and /dev/label/tests1a as well. Do gpt labels work the same as glabel, ie provide a static device name that can be acted upon with /etc/fstab, zfs, gmirror, etc? >> The other option seems to be to use tunefs or a partitioning tool to >> label each partition, which is even more ugly imo. > > Ugly how? Labels appear a lot more semantically elegant than the opaque > 'ada4s1a' moniker. Ugly in that the driver has created a situation where we need workarounds to perform the tasks we need. *nix systems have always relied upon static device nodes, and using dynamic names without updating the relating tools/methods is ugly. The workarounds also could fail if someone forgets to perform them (specifically labels), since it's not necessary on just about any other *nix system. It's perfectly within reason to assume people will forget to apply a label when replacing a disk. Case in point. I have a system with 15 drives in it. I decided I wanted to install on the 2nd device instead of the 1st, but I partitioned all the other 14 drives. I completed installation and when to boot the system and it failed. Stupid me, the GPT boot loader found disk1 with a partitioning scheme but no fs. So, I popped out disk 1 and when to boot again. Hey, now it starts to boot only to fail to find the root fs because it's looking on ada1 and the fs is on ada0. That is a mess. This is not necessarily common, but also not uncommon. More likely is the case where you add a drive to the system and the above scenario plays out because the device names get re-ordered. I'm not sure the problem the dynamic device nodes intends to solve, but it's certainly caused all sorts of pain and the need for the 2 (that I know of) workarounds. I dislike the idea of having to use labels to get static functionality (increases the likelihood of something going wrong for a disk replace operation if I forget to label), but I'll give gpt labels a try. Rob