zpool upgrade instructions aren't complete enough - gpart operation not permitted
Paul Hargreaves
paul.hargreaves at technowizardry.co.uk
Wed Feb 1 21:38:05 UTC 2017
Machine ‘a’
$ gpart show da0
=> 63 41942977 da0 MBR (20G)
63 41942943 1 freebsd [active] (20G)
41943006 34 - free - (17K)
$
So yes, that looks like MBR, so I’ll ignore the message on this machine.
Machine ‘b’ (joy of home labs)
$ dmesg | grep GEOM
GEOM: da4: the primary GPT table is corrupt or invalid.
GEOM: da4: using the secondary instead -- recovery strongly advised.
GEOM: da5: the primary GPT table is corrupt or invalid.
GEOM: da5: using the secondary instead -- recovery strongly advised.
GEOM: diskid/DISK-S21DNSAG229555L%20%20%20%20%20: the primary GPT table is corrupt or invalid.
GEOM: diskid/DISK-S21DNSAG229555L%20%20%20%20%20: using the secondary instead -- recovery strongly advised.
GEOM: diskid/DISK-S21DNSAG225964H%20%20%20%20%20: the primary GPT table is corrupt or invalid.
GEOM: diskid/DISK-S21DNSAG225964H%20%20%20%20%20: using the secondary instead -- recovery strongly advised.
GEOM: da4: the primary GPT table is corrupt or invalid.
GEOM: da4: using the secondary instead -- recovery strongly advised.
GEOM: da5: the primary GPT table is corrupt or invalid.
GEOM: da5: using the secondary instead -- recovery strongly advised.
GEOM: diskid/DISK-S21DNSAG229555L%20%20%20%20%20: the primary GPT table is corrupt or invalid.
GEOM: diskid/DISK-S21DNSAG229555L%20%20%20%20%20: using the secondary instead -- recovery strongly advised.
GEOM: diskid/DISK-S21DNSAG225964H%20%20%20%20%20: the primary GPT table is corrupt or invalid.
GEOM: diskid/DISK-S21DNSAG225964H%20%20%20%20%20: using the secondary instead -- recovery strongly advised.
$ gpart show da4
gpart: No such geom: da4.
$ gpart show da5
gpart: No such geom: da5.
$
$ gpart show
=> 34 41942973 da0 GPT (20G)
34 6 - free - (3.0K)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 37744640 3 freebsd-zfs (18G)
41940992 2015 - free - (1.0M)
$
$ gpart list
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 41943006
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da0p1
Mediasize: 524288 (512K)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r0w0e0
rawuuid: c07ec6ba-6523-11e5-9018-000c29e22a2a
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: gptboot0
length: 524288
offset: 20480
type: freebsd-boot
index: 1
end: 1063
start: 40
2. Name: da0p2
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r1w1e0
rawuuid: c081b168-6523-11e5-9018-000c29e22a2a
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: swap0
length: 2147483648
offset: 1048576
type: freebsd-swap
index: 2
end: 4196351
start: 2048
3. Name: da0p3
Mediasize: 19325255680 (18G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2148532224
Mode: r1w1e1
rawuuid: c0846dd6-6523-11e5-9018-000c29e22a2a
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: zfs0
length: 19325255680
offset: 2148532224
type: freebsd-zfs
index: 3
end: 41940991
start: 4196352
Consumers:
1. Name: da0
Mediasize: 21474836480 (20G)
Sectorsize: 512
Mode: r2w2e3
$
$ zpool status fast
pool: fast
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(7) for details.
scan: scrub repaired 0 in 0h4m with 0 errors on Tue Jan 31 22:18:25 2017
config:
NAME STATE READ WRITE CKSUM
fast ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
diskid/DISK-S21DNSAG225964H%20%20%20%20%20 ONLINE 0 0 0
diskid/DISK-S21DNSAG229555L%20%20%20%20%20 ONLINE 0 0 0
errors: No known data errors
$
Those two SSDs aren’t zroot and are part of an zpool so for those also should I ignore the GEOM errors?
I haven’t bothered upgrading this one yet but am about to.
Regards
Paul
> On 1 Feb 2017, at 16:37, Freddie Cash <fjwcash at gmail.com> wrote:
>
> On Wed, Feb 1, 2017 at 1:22 AM, Paul Hargreaves <paul.hargreaves at technowizardry.co.uk> wrote:
> Hi there,
>
> Just upgraded from 10.2 to 11.0.
> As part of that, did zpool upgrade:
>
> root at zfsbackup:~ # zpool upgrade zroot
> This system supports ZFS pool feature flags.
>
> Enabled the following features on 'zroot':
> sha512
> skein
>
> 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
>
> Ok, I think I’m using GPT partitioning and I think I boot from da0 (specifically, zpool show shows zroot is da0s1d), but how to tell?
>
> GPT partitioned disks will have device nodes like da0p1 (meaning partition 1).
>
> MBR partitioned disks will have device nodes like da0s1d (meaning partitiong d in slice 1).
>
> You can use "gpart show da0" to get more information.
>
> IOW, you have MBR partitioned disks, and should not use the suggested command as it only applies to GPT partitioned disks.
>
> --
> Freddie Cash
> fjwcash at gmail.com
More information about the freebsd-fs
mailing list