From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 31 20:32:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1546016A4DD for ; Mon, 31 Jul 2006 20:32:19 +0000 (UTC) (envelope-from amdmi3@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [194.67.23.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BC0043D46 for ; Mon, 31 Jul 2006 20:32:18 +0000 (GMT) (envelope-from amdmi3@mail.ru) Received: from [213.148.29.33] (port=4994 helo=nexii.panopticon) by mx27.mail.ru with esmtp id 1G7eQz-000Hx1-00 for freebsd-hackers@freebsd.org; Tue, 01 Aug 2006 00:32:17 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.2]) by nexii.panopticon (Postfix) with ESMTP id 6166411413 for ; Tue, 1 Aug 2006 00:32:10 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id D1DB14212; Tue, 1 Aug 2006 00:32:13 +0400 (MSD) Date: Tue, 1 Aug 2006 00:32:13 +0400 From: Dmitry Marakasov To: freebsd-hackers@freebsd.org Message-ID: <20060731203213.GA75233@hades.panopticon> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.12-2006-07-14 Subject: absolute vs. relative offsets in disklabel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2006 20:32:19 -0000 Hi! Recent `disklabel differences FreeBSD, DragonFly' thread gave me a thought - why do we have absolute offsets in disklabel? AFAIK, on NetBSD and OpenBSD, label is not necessarily located `near' filesystems stored in it's partitions - and even disklabel utility shows absolute offsets (with 'c' covering entire device). FreeBSD, however, seem to step far away from that standart - 8 partitions instead of 16, label located in the beginning of a partition, bsdlabel shows relative offsets. Now I wonder if there are any reasons for offsets to be actually absolute? There are many weighty arguments for relative offsets: - No confusion (once I did try to dd slice from one place on disk to another to copy it, and was very surprised when changes made on one partition appeared on another as well) - Ability to copy and move slices with simple dd(1). - Ability to save whole disk images on slices and access subpartitions without problems (for example when moving system to larger hdd or when storing hdd images for emulation on partitions instead of filesystem, avoiding overhead). This was as an argument for geom's recursive labelling feature, but now I realize that it was not quite correct, as because of absolute offsets it can't actually be used now. So I want to hear opinions on the subject - is it worth implementing and how easy or hard will it be to implement it and migrate. I've looked through geom_label and bsdlabel code and found these quite easy to change. I'm not sure about compatibility though - is it possible to introduce some flag into label indicating that it uses relative offsets? If the idea is welcomed, I am eager to work on it, as I would like this change much. -- Best regards, Dmitry mailto:amdmi3@mail.ru