From owner-freebsd-questions@FreeBSD.ORG Tue Sep 26 19:31:33 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26BD716A407 for ; Tue, 26 Sep 2006 19:31:33 +0000 (UTC) (envelope-from adamlsd@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0154443D55 for ; Tue, 26 Sep 2006 19:31:22 +0000 (GMT) (envelope-from adamlsd@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so2333335wxd for ; Tue, 26 Sep 2006 12:31:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer:sender; b=JVX1d6CibiOrj4QWPTuwlwTg6XmR+ZiMlYuoKIToW4EYYvXyetpE0VMQapXp7AsSQpnGvaZxIJvhB4O8xN4j6NfA1xejeg/R7gZU6Kxg4BeyQi3zokVZQsqzA7fxSnqjg7uEd2lBF9yDCit01VaKBHKTJXpvfBNubMg/aywDCe4= Received: by 10.70.19.20 with SMTP id 20mr2216866wxs; Tue, 26 Sep 2006 12:31:20 -0700 (PDT) Received: from ?130.245.126.51? ( [130.245.126.51]) by mx.gmail.com with ESMTP id h20sm5675972wxd.2006.09.26.12.31.19; Tue, 26 Sep 2006 12:31:20 -0700 (PDT) In-Reply-To: <19861fba0609231315t49deb0fax3856129d56e143bd@mail.gmail.com> References: <19861fba0609231315t49deb0fax3856129d56e143bd@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <54c03837545dd0d9834b057e17666b64@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Adam Martin Date: Tue, 26 Sep 2006 15:31:24 -0400 To: Jeffrey Katz X-Mailer: Apple Mail (2.624) Sender: Adam Martin Cc: FreeBSD Questions Subject: Re: nested labels X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2006 19:31:33 -0000 Jeffery, On 2006 Sep 23 , at 16:15, J65nko wrote: > On 9/21/06, Jeffrey Katz wrote: >> I have hit the limit of 8 disklabels per slice. Supposedly, one can >> create lables within a label, thus overcoming this limit. I googled >> everything but could only find references to gpt-- nothing about >> nested >> labels or partitions. Can anyone detail the steps involved in >> setting up >> nested labels or partitions? There was some previous discussion in this thread about the merits of multiple partitions, and why one would need so many. I will not delve into a long discussion on this; suffice it to say that there are many valid reasons to create more than 8 partitions on one disc, and that these reasons are usually unique to the site in question. If a system administrator feels that he needs more division of storage, he likely has a good reason. > A slice can have 8 labels, a disk can have 4 slices, so 4 x 8 labels = > 32 labels > Deduct from those 32 the reserved "c" and possibly "b" and you still > have a lot to spare ;) Although, the above, using PC partitions with nested BSD labels within, is a viable solution, and can be used safely with sysinstall, to give you a nice GUI (well, not gui, but menu at least) to work with the partitions; the biggest problem here, and the reason I stopped doing this, is that you have to know in advance how many meta-partitions you want, and what sizes they are. For example, my old 160 GB disc was divided into a 32 GB and a "remainder" PC partition. Those each had 7 major partitions therein. (You can use partitions a and b for filesystems. It's just convention that we use a and b for root and swap.) As this can be done safely, and straightforward from the sysinstall program, I won't go into details here. What you can also do is use the bsdlabel(8) program on any slice. In FreeBSD, geom labels devices very simply, and sensibly. E.G.: /dev/ad0s1hs2def is a valid device name. Granted it is a very absurd case, but it illustrates how one can use it. In geom, any PC partitions are appended as "sN" where N is 1 thru 4 for primary partitions, and 5 thru (unknown?) for logical partitions. In the case of bsdlabel (disklabel) partitions, they receive letters a thru h. In the above example, the primary master disc's first primary partition has a bsdlabel, which the last partition of it has a PC partition table within, which has a primary partition in slot two. That nested PC partition has a BSD partition, with a partition in slot d, which has more BSD sub-labels. (Need I go on, with this pathological example?) In summary, you can make bsdlabels, inside of a partition (PC or BSD). This is done by just running bsdlabel -w on the partition in which you wish to create the sub-partitions. (bsdlabel -w /dev/ad0s1h, for example) You can then create unlimited levels of partitions. Remember that after running bsdlabel -w, you must run bsdlabel -e, to edit the partition. Do not forget to create filesystems in the partitions (newfs -UO2 for UFS 2 with softupdates.) As far as conventions, I prefer to put the "extended" partition into slot a, and set its type to "unknown." In cases where slot a is taken by a root partition, I use slot h. I find that sticking to this convention helps keep me organized when employing this technique. Regards, -- Adam David Alan Martin