Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2005 09:11:26 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        "Loren M. Lang" <lorenl@alzatex.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Understanding GEOM Ranking System 
Message-ID:  <3642.1108023086@critter.freebsd.dk>
In-Reply-To: Your message of "Wed, 09 Feb 2005 16:43:05 PST." <20050210004305.GA20199@alzatex.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3642.1108023086>