From owner-freebsd-geom@FreeBSD.ORG Fri Feb 9 19:29:30 2007 Return-Path: X-Original-To: geom@FreeBSD.org Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8936016A402 for ; Fri, 9 Feb 2007 19:29:30 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.178]) by mx1.freebsd.org (Postfix) with ESMTP id 74BD413C4A3 for ; Fri, 9 Feb 2007 19:29:30 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout08/MantshX 4.0) with ESMTP id l19JTUxK021270 for ; Fri, 9 Feb 2007 11:29:30 -0800 (PST) Received: from [172.24.104.125] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id l19JT5PW013954 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 9 Feb 2007 11:29:26 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: geom@FreeBSD.org From: Marcel Moolenaar Date: Fri, 9 Feb 2007 11:27:33 -0800 X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: Subject: g_part partition tool -- some logistic questions X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 19:29:30 -0000 All, I've started writing a partition tool that uses the g_part verbs and I'd like some feedback. I'm going to use the information provided by the kern.geom.confxml sysctl as parsed by the geom_gettree() function that's in libgeom. This way I can avoid having to implement query verbs. The g_part geom just needs to put the information in the XML tree. That said... The first question relates to finding and presenting the right devices/providers to the users. What I don't want is present, for example, ad0 and ad1 if they are part of a mirror. I'd like to present the mirror to the user. The same applies to other GEOM classes. Is there a generic or established way to walk the GEOM tree (obtained by geom_gettree()), and find the real or true virtual storage providers that takes the hierarchy into account? -- Marcel Moolenaar xcllnt@mac.com