OCE and GPT

Andriy Gapon avg at icyb.net.ua
Wed Apr 21 12:07:39 UTC 2010


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


More information about the freebsd-geom mailing list