From owner-freebsd-geom@FreeBSD.ORG Thu Feb 10 08:11:31 2005 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6982016A4CE for ; Thu, 10 Feb 2005 08:11:31 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACB5E43D1D for ; Thu, 10 Feb 2005 08:11:30 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j1A8BQrE003643; Thu, 10 Feb 2005 09:11:27 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: "Loren M. Lang" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 09 Feb 2005 16:43:05 PST." <20050210004305.GA20199@alzatex.com> Date: Thu, 10 Feb 2005 09:11:26 +0100 Message-ID: <3642.1108023086@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-geom@freebsd.org Subject: Re: Understanding GEOM Ranking System X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 08:11:31 -0000 In message <20050210004305.GA20199@alzatex.com>, "Loren M. Lang" writes: >I'm slightly confused on the ranking system use in GEOM as described in >the geom(4) manpage. The wording of the description seems a little >confusing, but the way I understand it is that any geom instance which >has no consumers attached to anything like a disk or acd geom has a rank >of 1. Any geom that does have some of it's consumers attached to a >provider has a rank of the highest ranked geom providing a service to >this geom. For example, a ufs filesystem is running on a raid1 >configuration between partition d on slice 1 on disk ad0 mirrored with >slice 2 on disk ad1 (no disklabel on second disk). This makes two disk >geoms for ad0 and ad1 both with rank 1. Each disk geom has a mbr geom >on top of them with rank 2 (max(1)+1). The bsd geom on slice 1 of disk >ad0 has rank 3 (max(2)+1). The mirror geom on top of the bsd geom and >the mbr geom on disk ad1 has a rank of 4 since max(2, 3)+1 = 4. Then a >dev geom on top of the mirror geom has a rank of 5 (max(4)+1). That dev >geom is what is mounted as a filesystem on freebsd. Is this correct? > >dev(5) ---> mirror(4) ---> bsd(3) ---> mbr(2) ---> dev(1) ---> ad0 > \-------------> mbr(2) ---> dev(1) ---> ad1 Yes. In practice you should never have to think abou the ranking, it is only used to detect potential loops. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.