From owner-cvs-all Fri Oct 25 11:55:41 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08FE537B404 for ; Fri, 25 Oct 2002 11:55:39 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11AB643E3B for ; Fri, 25 Oct 2002 11:55:38 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14710 invoked from network); 25 Oct 2002 18:55:44 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 25 Oct 2002 18:55:44 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id g9PItZn5076095; Fri, 25 Oct 2002 14:55:35 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200210251837.g9PIbGiI077709@dotar.thuvia.org> Date: Fri, 25 Oct 2002 14:55:39 -0400 (EDT) From: John Baldwin To: Mark Valentine Subject: Re: cvs commit: src/lib/libdisk Makefile chunk.c write_alpha_dis Cc: Poul-Henning Kamp Cc: Poul-Henning Kamp , "M. Warner Losh" , cvs-committers@freebsd.org, cvs-all@freebsd.org, Mikhail Teterin Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25-Oct-2002 Mark Valentine wrote: >> From: jhb@freebsd.org (John Baldwin) >> Date: Fri 25 Oct, 2002 >> Subject: Re: cvs commit: src/lib/libdisk Makefile chunk.c write_alpha_dis > >> Huh? The da0 is repetitive, too. Look at my fstab: >> >> /dev/ad0s2b none swap sw 0 0 >> /dev/ad0s2a / ufs rw 1 1 >> /dev/ad0s2g /usr ufs rw 2 2 >> /dev/ad0s2f /tmp ufs rw 2 2 >> /dev/ad0s2e /var ufs rw 2 2 >> /dev/ad0s1 /windows msdos ro,noauto,longnames 0 0 >> >> isn't it pretty obvious why the 's2' is there? > > No. The 's' seems to stand for 'partition index', and if you're lucky > the '2' will be the current index (from an origin of '1', I think, I can > never remember, especially seeing all those '0's around) into the MBR > partition table for a partition with type 0xa5. But maybe it won't be > tomorrow. > > I know my system will boot tomorrow because by specifying /dev/da0a > I'm more closely echoing the algorithm used by other operating systems > on the disk to locate their partitions. So according to you (using this argument of mount or the kernel or somebody looking at foo0a and going "oh, you really mean foo0s3a so I'll fix it up for you") I should be able to do "mount /dev/ad0 /windows" and it should just do the right thing, right? That's exactly the same thing that you are asking for. Or better yet, just 'mount -t msdos /windows' and someone (mount? kernel?) is supposed to magically walk all the disk devices and find some msdos filesystem and mount it. What you really want to be able to do is closer to what julian described where a volume knows where it is supposed to be mounted and when it is inserted or detected it just gets mounted in the right place. However, /etc/fstab is not that. /etc/fstab is not even close to that and perpetuating one specific hack instead of solving the general case problem is not a clean way of doing things. Especially when perpetuating the hack involves adding hacks to the code that make it a lot harder to solve the general problem. Seriously. What you want is logical volume names. GEOM does not provide that. The old kernel code didn't either. What you want is to add an extra layer to do the physical <-> logical mapping. If you want to work on that, go for it. Please don't try and pollute the layer that is in charge of handling physical layout with that however. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message