On Tue, Nov 6, 2018 at 8:58 AM Bruno Flueckiger <inform...@gmx.net> wrote:
>
> On 05.11.18 19:47, David Higgs wrote:
> > I read both the FAQ section and the growfs(8) man page but I am not
> > yet confident that what I want to do is supported / safe.
> >
> > http://www.openbsd.org/faq/faq14.html#GrowPartition
> >
> > I started with a number of partitions and a bunch of free space.  I
> > later needed the free space and allocated a /project partition that
> > went to the end of my disk.  More recently, I emptied the /data
> > partition immediately prior.  Now I would like to use growfs(8) to
> > merge this unused space with the /project partition without losing any
> > of the existing data.
> >
> > See disklabel output below.  I have only grown partitions "down",
> > never in the other direction.  Am I being overly paranoid?
> >
> > Thanks.
> >
> > --david
> >
>
> As the FAQ entry states, you can use growfs(8) if the empty space
> is after the existing partition, not prior. You can only grow a
> partition "down", never "up". What you want to do would require the
> following steps:
>
> 1. Create a new partition on the free space
> 2. Move all data to the new partition
> 3. Remove the existing /project partition
> 4. Use growfs(8) on the new partition to include the space from the old
>    /project partition

You appear to be right - I see it now.  I had not read closely enough,
and had focused more on what I could change with the 'm' disklabel(8)
command.  It would be nice if this info were made explicit in the
growfs(8) man page as well.

I had already successfully rearranged some partitions using the method
you propose, but unfortunately the amount of data in /project is
slightly too big to be easily shifted into my remaining free space.
I'll try to compress it or temporarily move the data off-system.

Thanks for the clue-stick.

--david

Reply via email to