9067 Support PMBR customisation with EFI label

Review Request #843 — Created Feb. 7, 2018 and submitted — Latest diff uploaded

citrus
illumos-gate
master
9067, 9116
6fbc984...
general
hadfl

9067 Support PMBR customisation with EFI label

libefi:

reaper# grep Dell /usr/share/hwdata/efi.fixes | tail -1
sys.manufacturer="Dell Inc." sys.product="PowerEdge R730" mb.version=A04 pmbr_active=1 pmbr_slot=3

reaper# zpool create test c0t13d1
reaper# fdisk -W - c0t13d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  238   128  255    63     1023    255    63     1023    1          62499999

reaper# zpool replace test c0t{13,14}d1
reaper# fdisk -W - c0t14d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  238   128  255    63     1023    255    63     1023    1          62499999

reaper# sed -i '/PowerEdge/s/active=1/active=0/' /usr/share/hwdata/efi.fixes
reaper# zpool replace test c0t{14,13}d1
reaper# fdisk -W - c0t13d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  238   0    255    63     1023    255    63     1023    1          62499999

reaper# sed -i '/PowerEdge/s/slot=3/slot=1/' /usr/share/hwdata/efi.fixes
reaper# zpool replace test c0t{13,14}d1
reaper# fdisk -W - c0t14d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  0     0    0      0      0       0      0      0       0          0
  238   0    255    63     1023    255    63     1023    1          62499999
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0

reaper# sed -i '/PowerEdge/s/^/#/' /usr/share/hwdata/efi.fixes
reaper# zpool replace test c0t{14,13}d1
reaper# fdisk -W - c0t13d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  238   0    255    63     1023    255    63     1023    1          62499999
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0

fdisk:

reaper# zpool export test
reaper# fdisk -E 2:1 c0t13d1p0
reaper# fdisk -W - c0t13d1p0 | tail -5
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  0     0    0      0      0       0      0      0       0          0
  0     0    0      0      0       0      0      0       0          0
  238   128  255    63     1023    255    63     1023    1          62499999
  0     0    0      0      0       0      0      0       0          0
reaper# zpool import test
reaper# zpool status test
  pool: test
 state: ONLINE
  scan: resilvered 86K in 0h0m with 0 errors on Mon Feb 12 10:46:49 2018
config:

        NAME        STATE     READ WRITE CKSUM
        test        ONLINE       0     0     0
          c0t13d1   ONLINE       0     0     0

errors: No known data errors
Loading...