From owner-freebsd-geom@FreeBSD.ORG Sun May 4 22:50:49 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B47299E for ; Sun, 4 May 2014 22:50:49 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0139.outbound.protection.outlook.com [207.46.163.139]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D662D16C7 for ; Sun, 4 May 2014 22:25:38 +0000 (UTC) Received: from [IPv6:2601:2:4780:2fd:8875:75fe:c2a7:77e7] (2601:2:4780:2fd:8875:75fe:c2a7:77e7) by BLUPR03MB018.namprd03.prod.outlook.com (10.255.208.40) with Microsoft SMTP Server (TLS) id 15.0.934.12; Sun, 4 May 2014 22:25:30 +0000 Message-ID: <5366CC63.4000001@my.hennepintech.edu> Date: Sun, 4 May 2014 18:25:23 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Subject: Recreating a GPT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:4780:2fd:8875:75fe:c2a7:77e7] X-ClientProxiedBy: BY2PR03CA078.namprd03.prod.outlook.com (10.141.249.51) To BLUPR03MB018.namprd03.prod.outlook.com (10.255.208.40) X-Forefront-PRVS: 02015246A9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009001)(6009001)(428001)(199002)(189002)(77982001)(64706001)(46102001)(92566001)(80976001)(4396001)(75432001)(50466002)(83322001)(23676002)(47776003)(87976001)(76482001)(42186004)(83506001)(92726001)(21056001)(101416001)(81342001)(50986999)(81542001)(54356999)(65816999)(20776003)(80022001)(74502001)(31966008)(85852003)(83072002)(99396002)(86362001)(33656001)(74662001)(59896001)(3826001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB018; H:[IPv6:2601:2:4780:2fd:8875:75fe:c2a7:77e7]; FPR:; MLV:sfv; PTR:InfoNoRecords; A:0; MX:1; LANG:en; Received-SPF: None (: my.HennepinTech.edu does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aberg010@my.HennepinTech.edu; X-OriginatorOrg: my.hennepintech.edu X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 22:50:49 -0000 Sorry if this is the wrong list; I have seen discussions regarding gpart in the archives for this list while doing some searching for answers to my problem. I destroyed a GPT ('gpart destroy -F ada0') and then ended up needing the data on it (the lesson here is to make many backups of important files, not just think you have one somewhere). Anyway, I don't have an actual backup of the partition layout (as created by 'gpart backup'), but I know the partition sizes and sector sizes, and I happen to have another disk that, AFAICT, is the exact same size: ada0: ATA-8 SATA 3.x device ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada2: ATA-8 SATA 2.x device ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada2: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada0 being the disk I want to recover. My question is, knowing the exact commands given to create the GPT, how should I go about creating a file that will restore the GPT on ada0 without damaging the data on the partitions themselves? I suppose I could create a new GPT on the scratch disk and use the output of 'gpart backup' from that, but I'm not sure it would be 100% correct and I'd have to clone the original disk over it again, which would take hours since it's a TB and dd isn't exactly the fastest way of copying data (even with large blocksizes). I'm very hesitant to write *anything* to the original disk.