Date: Wed, 21 Apr 2010 16:59:35 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: Lister <lister@kawashti.org>, Marcel Moolenaar <marcel@FreeBSD.org>, freebsd-geom@FreeBSD.org Subject: Re: OCE and GPT Message-ID: <4BCF04C7.1050701@icyb.net.ua> In-Reply-To: <4BCEF5F8.6090102@yandex.ru> References: <B814515407B5445092FD63116EA3DA6B@neo> <4BCEE9E2.6010007@yandex.ru> <4BCEEC66.1080804@yandex.ru> <4BCEEF06.8010203@icyb.net.ua> <4BCEF5F8.6090102@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
on 21/04/2010 15:56 Andrey V. Elsukov said the following: > On 21.04.2010 16:26, Andriy Gapon wrote: >> will your patch take care of moving the second copy of GPT towards >> (new) disk end >> if disk size is increased? > > Current implementation of resize feature is targeted to resize > providers withing scheme. But with GPT we have problem, after > booting with bigger media size the second partition table will > be lost. And GPT will be broken. Why? Do we have it hardcoded where to look for the secondary GPT? Or do we enforce that it is at the very end of disk? My understanding is that GPT partition table header contains positions of both primary and secondary GPT (fields at offsets 24 and 32). I think that we should use that and growing disk would not cause any problem. GPT scheme would cover only a portion of disk, but that should be OK as a temporary state. Then, we could have some additional command like 'reinit' that would relocate the secondary table to the new end of disk and update recorded positions to new values. > I think first of it should be recovered. > And there are some plans about implementing this feature. > After that partitions within scheme can be resized with my patch. I also think that this recovery mechanism is needed. In short: recover - re-create secondary table based on primary table reinit - relocate secondary table to a new position and update offsets in both tables accordingly > Recovering of GPT will write secondary table and also should fix internal > information about media size. And there can be several ways (if we think > about > generic implementation). What should we do when media size will be > smaller that > it was before? Should we reject this way of recovering and allow recovering > only for the same size or bigger media size? I think that we could allow smaller media size _provided_ that lost space doesn't overlap with any partitions found in primary table. Otherwise it's a data loss scenario and a user should be left to deal with it. IMHO, of course. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BCF04C7.1050701>