From owner-freebsd-geom@FreeBSD.ORG Wed Apr 21 12:07:39 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44400106566B for ; Wed, 21 Apr 2010 12:07:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 85A338FC1D for ; Wed, 21 Apr 2010 12:07:38 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA01915; Wed, 21 Apr 2010 15:07:21 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BCEEA79.7080309@icyb.net.ua> Date: Wed, 21 Apr 2010 15:07:21 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Lister References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=windows-1256 Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: OCE and GPT 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: Wed, 21 Apr 2010 12:07:39 -0000 on 21/04/2010 12:21 Lister said the following: > Hi All, > > I have a 5TB RAID5 (/dev/da0) on a 3Ware controller supporting OCE. I > partitioned it into p1, p2 & p3 using gpt on FreeBSD-7.1-RELEAE. > P3 is 3.5TB and is the one I need to expand by adding another 1TB drive > to the RAID. It is now 87% full. > > Both gpt and gpart don't allow resizing a partition. > Of course, backing up the RAID to another is not an option. > > I'm in a rather desperate situation and I'm willing to do whatever it > takes. If there's no current software solution, I'm willing to use a hex > editor to edit the disk directly if someone could advise me of the > layout of GPT as created by gpt- and gpart if different. I used to do > this on MBR disks at times of necessity. If you make any mistake and lose your data, then don't blame me. Before trying what I suggest wait for a few days in case someone points out a mistake or suggests a better way. 1. Get current layout e.g. with 'gpart show' 2. Print (several copies of) it and don't lose it 3. Boot using Live CD (if da0 is your boot disk) 4. Undo the whole GPT layout using 'gpart delete' and 'gpart destroy' 5. Expand RAID (I hope OCE means that the new space will be added at the end) 5. Re-create the same layout but using new size for p3 Some notes: 1. Deleting/destroying/adding/creating partitions and scheme does not touch your data/filesystems; it operates only on sectors belonging to GPT metadata. 2. There are two copies of GPT metadata, one at the start of a disk, the other at the end; they both must be valid and provide the same information. -- Andriy Gapon