Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Oct 2023 17:58:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274312] gpart restore fails with "gpart: entries '4': Invalid argument"
Message-ID:  <bug-274312-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274312

            Bug ID: 274312
           Summary: gpart restore fails with "gpart: entries '4': Invalid
                    argument"
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: editor@callfortesting.org

Created attachment 245469
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D245469&action=
=3Dedit
truss(1) output for the gpart backup/restore command

Hello, I see a few PRs related to gpart restore but not with this error. I =
have
only seen mentions of the error in mailing lists.

FreeBSD freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n265728-8818f0f11=
24e:
Thu Oct  5 03:15:28 UTC 2023=20=20=20=20
root@releng3.nyi.freebsd.org:/usr/obj/usr/src/a
md64.amd64/sys/GENERIC amd64

Steps:

root@freebsd:~ # sysctl kern.disks
kern.disks: vtbd1 vtbd0
root@freebsd:~ # gpart show
=3D>       3  12649842  vtbd0  GPT  (6.0G)
         3       346      1  freebsd-boot  (173K)
       349     66584      2  efi  (33M)
     66933   2097152      3  freebsd-swap  (1.0G)
   2164085  10485760      4  freebsd-zfs  (5.0G)

root@freebsd:~ # diskinfo vtbd0
vtbd0   512     6476721664      12649847        131072  0
root@freebsd:~ # diskinfo vtbd1
vtbd1   512     6476721664      12649847        131072  0

root@freebsd:~ # man gpart | grep restore | tail -1
           /sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2

root@freebsd:~ # /sbin/gpart backup vtbd0 | /sbin/gpart restore -F vtbd1
gpart: entries '4': Invalid argument

The vtbd0 is a root-on-ZFS weekly snapshot image and the second image is
created with truncate, using the size from the unmodified RE image.

Backing up the partition table to a file and restoring from file produces t=
he
same error.

I have attached the truss output of the command listed in the manual page.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274312-227>