gpt, disklabel64 - Add storage expansion options

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 2 September 2020 18:24 UTC

- Add gpt expand directive. For example 'gpt expand /dev/da0' will expand the gpt to fill /dev/da0. This allows the gpt to be enlarged to fit a new, larger storage device or expanded storage and can be issued on a live gpt if desired.

- Add disklabel64 -x and -xx features. This expands the disklabel to fit the new enlarged slice that it resides in. If -xx is specified, the last partition configured in the disklabel will also be enlarged.

- And we already have 'hammer2 growfs ' to grow a live hammer2 filesystem to fit an enlarged partition.

35a9ab8af1 gpt, disklabel64 - Add storage expansion options
sbin/disklabel64/disklabel64.8 | 22 +++-
sbin/disklabel64/disklabel64.c | 115 ++++++++++++++++++++-
sbin/gpt/Makefile | 2 +-
sbin/gpt/expand.c | 223 +++++++++++++++++++++++++++++++++++++++++
sbin/gpt/gpt.8 | 9 ++
sbin/gpt/gpt.c | 1 +
sbin/gpt/gpt.h | 1 +
sbin/gpt/map.c | 2 +-
sbin/gpt/map.h | 1 +
9 files changed, 365 insertions(+), 11 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share