gpt in-place editing

Dmitry Morozovsky marck at rinet.ru
Mon Sep 22 21:34:59 UTC 2008


On Mon, 22 Sep 2008, Marcel Moolenaar wrote:

MM> > SS> > is there a way to split existing GPT partition into two, like one
MM> > can do in
MM> > SS> > bsdlabel case?
MM> > SS> >
MM> > SS> > I found myself wanting to shrink swap to have an alternate root, but
MM> > have no
MM> > SS> > luck in my experiments.
MM> > SS> >
MM> > SS> > For the reference, I have
MM> > SS> >
MM> > SS> > da0p1	boot
MM> > SS> > da0p2	bootdisk
MM> > SS> > da0p3	swap
MM> > SS> > da0p4	ZFS
MM> > SS> >
MM> > SS> > and want to place two partitions in place of da0p3...
MM> > SS>
MM> > SS> You can simpy remove the da0p3 partition and add two new instead of
MM> > it.
MM> > 
MM> > It does not seem gpart wants allow me to delete da0p3 while disk is
MM> > active...
MM> 
MM> You probably have swapon and/or dumpon to set to the partition.
MM> You can't remove a partition that is in use.
MM> 
MM> Run "swapoff /dev/da0p3" and/or "dumpon off" first.

Of course I did run swapoff; I'm not sure I did dumpoff, and unfortunately I 
did not run it under script(1). gpt (I did test under RELENG_7) does the trick, 
but --

However, we clearly have at least one bug: not creating da* device (for da0p5 
in my case)

Thanks.

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------


More information about the freebsd-fs mailing list