Project

General

Profile

Actions

Bug #14577

open

ESX offline disk resize prevents growing zpool

Added by Jason King 4 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

In at least some versions of VMware ESX, when growing a virtual disk, ESX helpfully copies the alternate EFI label to the end of the newly grown disk. Unfortunately, the current check in efi_use_whole_disk then thinks because the alternate label is at the end of the disk, it has already been resized, and nothing else needs to be done.

This leads to the annoying condition where zpool list will correctly determine that more space on the disk is available, but is unable to be used because zpool online -e (or the zpool autogrow setting) fails to work (as they call efi_use_whole_disk() to adjust the partitioning on the disk).

A better approach in efi_use_whole_disk() would be:
1. Verify the reserved partition is the last defined partition on the disk (largest ending LBA). If not, we give up.
1. If the reserved partition is not at the end of the disk, move it to the end of the disk. It only contains cached devids that get rewritten by the system, so it is not necessary to copy the contents.
2. If there is a gap of unused space between the last non-reserved partition and the reserved partition, expand the size of the last partition to span the gap.

Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2136
Actions

Also available in: Atom PDF