Date: Tue, 26 Sep 2006 15:31:24 -0400 From: Adam Martin <adamartin@FreeBSD.org> To: Jeffrey Katz <off@panix.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: nested labels Message-ID: <54c03837545dd0d9834b057e17666b64@FreeBSD.org> In-Reply-To: <19861fba0609231315t49deb0fax3856129d56e143bd@mail.gmail.com> References: <Pine.NEB.4.64.0609210542390.8597@panix1.panix.com> <19861fba0609231315t49deb0fax3856129d56e143bd@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Jeffery, On 2006 Sep 23 , at 16:15, J65nko wrote: > On 9/21/06, Jeffrey Katz <off@panix.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54c03837545dd0d9834b057e17666b64>