From owner-freebsd-i386@FreeBSD.ORG Thu Feb 2 08:30:07 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F129C16A420 for ; Thu, 2 Feb 2006 08:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D49F43D49 for ; Thu, 2 Feb 2006 08:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k128U64Y060647 for ; Thu, 2 Feb 2006 08:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k128U6CK060644; Thu, 2 Feb 2006 08:30:06 GMT (envelope-from gnats) Resent-Date: Thu, 2 Feb 2006 08:30:06 GMT Resent-Message-Id: <200602020830.k128U6CK060644@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jukka Ukkonen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83D2916A420 for ; Thu, 2 Feb 2006 08:23:14 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 382AD43D53 for ; Thu, 2 Feb 2006 08:23:14 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k128NEpv012822 for ; Thu, 2 Feb 2006 08:23:14 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k128NDKP012820; Thu, 2 Feb 2006 08:23:13 GMT (envelope-from nobody) Message-Id: <200602020823.k128NDKP012820@www.freebsd.org> Date: Thu, 2 Feb 2006 08:23:13 GMT From: Jukka Ukkonen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: i386/92723: fdisk should be able to output current slice table in configuration file format X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2006 08:30:07 -0000 >Number: 92723 >Category: i386 >Synopsis: fdisk should be able to output current slice table in configuration file format >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 02 08:30:05 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jukka Ukkonen >Release: 6.0-STABLE >Organization: private person >Environment: FreeBSD metabo 6.0-STABLE FreeBSD 6.0-STABLE #4: Mon Jan 30 22:45:06 EET 2006 root@metabo:/usr/obj/usr/src/sys/Metabo i386 >Description: Currently fdisk writes only verbose output. 1) Often it would be nice to be able to clone the fdisk slice setup to another disk of the same model (say you are preparing mirrored volumes). 2) Often it would be nice to be able to store the exact fdisk slice setup as a backup in case you need to replace and rebuild a disk. I tend to dump the contents of file systems and the current disklabel (bsdlabel) when doing backups. Having also the slice table stored safely in a reusable format would help complete disk rebuilding a lot. In both of the previous situations it would be preferable to have fdisk to output the read slice table in the configuration table format to be able to further feed it to another fdisk instance as input. At the moment this is not possible or at least not a documented feature. A good configuration program should always be able to write out the same format it requires on input. >How-To-Repeat: OK - just try to recreate from scratch some disk you already have such that there is one slice for actual file system and another for swap. Obviously you might wish to mirror the file system slice, but since the swap is ephemeral data and used in interleaved manner in any case, you do not wish to mirror the swap area. You simply specify two independent swap areas. So, assume you build a mirror from two disks with suitable slices for the above schenario, but you use disks which are not equal in size. Now just assume you will need to rebuild the larger disk, because the old one has a hardware failure. Currently you cannot copy the slice tables, and even if you could, you would prefer to rebuild the slice table on the replaced disk from a backup copy, because there larger disk might have had extra space sliced for other purposes. >Fix: Extend fdisk with a new command line option and a whole new feature. >Release-Note: >Audit-Trail: >Unformatted: