0x8007012A

0x8007012A: Wrong Disk Specified for the Volume — Fixed

Got 0x8007012A when extending a volume? Windows picked the wrong disk number. Here's the quick fix, the 5-minute fix, and the advanced repair.

You're in Disk Management, right-click Extend Volume on a drive that clearly has free space after it, and Windows throws 0x8007012A: The wrong disk was specified for the volume. I had a client last month with a 4-drive RAID box where this hit every time they tried to grow the data volume. The free space was right there. Windows just refused to touch it.

The error isn't about permissions or corruption. It's about disk numbering. Diskpart and Disk Management address physical disks by number, and when a volume span crosses numbers incorrectly — or the wrong disk is selected in the context — Windows bails out instead of guessing. Fix the numbering context and the extend goes through.

Quick fix (30 seconds): Rescan disks and retry

Half the time this is stale disk metadata. Windows cached the old layout before you added or moved a disk, and the extend call points at a physical disk number that no longer matches reality.

  1. Close Disk Management.
  2. Open an elevated Command Prompt (right-click, Run as administrator).
  3. Run the rescan command below.
  4. Reopen Disk Management and try Extend Volume again.
diskpart
rescan
list disk
list volume
exit

If list disk shows the same numbers you saw in Disk Management, and the free space still lines up after your target volume, try the extend. If it errors again, move on.

5-minute fix: Extend via diskpart with explicit disk selection

Disk Management hides the disk number it's using. Diskpart doesn't. That alone fixes it most of the time — you select the volume by number, then the disk by number, then extend. If either number is wrong, diskpart tells you immediately instead of returning 0x8007012A from a black box.

  1. Open an elevated command prompt.
  2. Launch diskpart and list everything.
  3. Note the volume number and the disk number that holds the unallocated space.
  4. Select the volume, select the disk, extend.
diskpart
list volume
list disk
select volume 3
select disk 1
extend size=10240
exit

That size=10240 is in megabytes — 10 GB. Leave it off and diskpart grabs all contiguous free space, which is what you usually want. The key step is select disk 1: this explicitly binds the operation to the physical disk holding the unallocated region. If the free space actually sits on disk 0 and you typed disk 1, diskpart returns an error you can read. That's the whole point.

When to use this

  • Single NTFS volume with unallocated space immediately after it.
  • You know the disk number from list disk and it matches the physical slot.
  • The volume isn't part of a Storage Spaces pool or dynamic disk set.

If extend still fails here, the unallocated space isn't actually contiguous with the volume — there's a recovery partition, an EFI partition, or a page file partition wedged between them. That's the advanced case below.

Advanced fix (15+ minutes): Remove the blocking partition or rebuild the layout

Classic scenario: you have C: at the start of the disk, then a 500 MB Recovery partition, then unallocated space at the end. Windows can't extend C: because the free space isn't adjacent. Disk Management won't even show Extend Volume. The 0x8007012A error pops when you force it through diskpart or a third-party tool and the disk numbering gets confused mid-operation.

Two paths. Pick based on whether you can take the volume offline.

Path A: Delete the blocking partition (data-safe for the target volume)

This only works if the partition between your volume and the free space is a Recovery partition you can live without, or a page file partition you can move first.

  1. Disable the page file if that's the blocker: System Properties → Advanced → Performance Settings → Advanced → Virtual Memory → Change → No paging file on that drive.
  2. Note the Recovery partition's size and contents if you care — reagentc /info tells you if WinRE lives there.
  3. Delete the blocking partition in diskpart (select partition X, then delete partition override for protected ones).
  4. Extend the volume into the now-contiguous space.
  5. Recreate the Recovery partition if you removed it, and re-enable WinRE with reagentc /enable.
Heads up: delete partition override bypasses Windows' protection on OEM and Recovery partitions. If BitLocker is on, suspend it first or you'll be typing a 48-digit key from a sticky note.

Path B: Use a live USB partition tool

If you can't touch the blocking partition from inside Windows — common when it's the EFI System Partition or a protected OEM slice — boot from a GParted live USB or a Windows PE environment. From outside the running OS you can slide or move the unallocated region so it sits adjacent to the volume you want to grow, then extend from diskpart once you're back in Windows.

GParted's move operation on a 500 GB partition takes 10 to 40 minutes depending on drive speed. Don't interrupt it. I've seen a client yank the USB at 80% and lose the partition table entirely. Have a backup before you start.

Why the error says "wrong disk" and not "wrong offset"

Windows' extend logic passes a disk number to the storage driver. If the volume's extents don't map cleanly onto the disk the caller named — because the volume spans multiple disks, or because the free space lives on a different disk than the one currently selected — the driver rejects the call. The message is accurate: you literally specified the wrong disk number for the volume's extents.

On Storage Spaces and dynamic disks this happens constantly. A simple volume that looks like one disk in Disk Management can actually span three physical drives. Extending it means specifying all the underlying disk numbers correctly. Diskpart's detail volume shows you the extents.

diskpart
select volume 3
detail volume
exit

If detail volume lists more than one disk, you're not dealing with a simple volume and the extend operation needs all of them named. For Storage Spaces, don't use diskpart at all — use the Storage Spaces GUI in Control Panel or Get-VirtualDisk and Resize-VirtualDisk in PowerShell. Diskpart will fight you every time on pooled storage.

What NOT to do

  • Don't run chkdsk. The error isn't file system corruption. chkdsk won't fix disk numbering and can make a bad layout worse.
  • Don't reformat and reinstall. That's the nuclear option people jump to after Googling this error. You almost never need it.
  • Don't trust a third-party "one-click extend" tool on a dynamic disk. Most of them ignore the underlying extent map and produce exactly this error.

Work through the three sections in order. The rescan catches the easy ones. The diskpart sequence catches the common case where Disk Management just picked the wrong disk internally. The advanced section is for when you've got an actual layout problem — a blocking partition, a spanned volume, or a Storage Spaces pool. Back up first when you're deleting partitions, and you'll get your extra space without the error coming back.

Related Errors in Hardware – Hard Drives
SMART 197 / 05 Hard Drive Bad Sector Count Exceeded – Fix It Now FW_Rollback_Failed (0x1F) Storage Array Firmware Rollback Rejects with Version Mismatch 0X800300FE Fix STG_E_UNIMPLEMENTEDFUNCTION (0x800300FE) on Storage Devices 429 Too Many Requests Cloud API Throttling: The Real Fix for Limit Errors

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.