Bug 229595 - zpool upgrade should substitute disk and partition numbers in gpart instructions
Summary: zpool upgrade should substitute disk and partition numbers in gpart instructions
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2018-07-08 00:03 UTC by Mahmoud Al-Qudsi
Modified: 2023-12-14 15:31 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mahmoud Al-Qudsi 2018-07-08 00:03:02 UTC
After upgrading a zpool with `zpool upgrade xxx`, instructions are emitted regarding updating the bootsector code for compatibility with the latest zfs version. These instructions emit an example of what command should be executed.


```
mqudsi@freebsd ~> sudo zpool upgrade zroot
This system supports ZFS pool feature flags.

Enabled the following features on 'zroot':
  device_removal
  obsolete_counts
  zpool_checkpoint

If you boot from pool 'zroot', don't forget to update boot code.
Assuming you use GPT partitioning and da0 is your boot disk
the following command will do it:

        gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
```

Again, the command displayed is only an example and not to be taken/executed literally.

As the relevant information is available to the tools in question, the actual command to be executed should be displayed instead of a "rough estimate" of command with the possibly incorrect disk/partition values.

See also #229594
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2021-05-21 07:53:33 UTC
Cross-reference: documentation bug 255318 for the FreeBSD Handbook.
Comment 2 Graham Perrin 2023-09-27 06:56:34 UTC
Re: (2018) opening comment 0

Do the same instructions, or similar, appear with OpenZFS in FreeBSD 13.0-RELEASE and greater? 

----

From the commit message for the patch at bug 255318 comment 18: 

> Warn against inappropriate use of gpart(8).