ESC

Start typing to search across invoices, services, domains, tickets, and more...

Search... Ctrl+K
Windows Server

Windows Server: Extend the C Drive and Initialize a New Data Disk (Disk Management, diskpart extend, Bring Online)

5 steps 10 min read 5 views 0
On this page

After you upgrade a server's disk size or attach a new data disk, Windows does not automatically use the new space: the C drive stays the same size and the new disk does not appear in This PC. This guide shows how to extend the C drive partition on Windows Server 2016 / 2019 / 2022 and how to bring a new data disk online, initialize and format it, using Disk Management, diskpart extend and PowerShell.

Take a snapshot or back up important data before any disk operation. Initializing or formatting the wrong disk number destroys data — always double-check the disk number and size before running a command.

Step 1: Rescan and check disk status

After the upgrade is complete and the server has been restarted, open PowerShell as Administrator, rescan the disks and list their size, partition style and status:

Update-HostStorageCache
Get-Disk | Format-Table Number, FriendlyName, OperationalStatus, PartitionStyle, Size -AutoSize
Get-Partition | Format-Table DiskNumber, PartitionNumber, DriveLetter, Size -AutoSize

If the disk is larger but the C partition is not, you need to extend the partition. A disk with PartitionStyle RAW or OperationalStatus Offline is a new data disk that needs initializing. You can also press Win + R, run diskmgmt.msc and choose Action → Rescan Disks.

Step 2: Extend the C drive in Disk Management

In Disk Management, if a black "Unallocated" area sits directly to the right of C:, right-click C:, choose "Extend Volume", accept the default (all available space) and click Finish. Extending a volume is an online operation: no reboot is needed and no data is lost.

"Extend Volume" is only available when the unallocated space is directly to the right of C:. If a Recovery Partition sits between them, the option is greyed out — see the FAQ below or open a ticket for assistance.

Step 3: Extend the partition with diskpart extend or PowerShell

If you prefer the command line, extend C: with diskpart. In CMD run:

diskpart
rescan
list volume
select volume C
extend
exit

Without parameters, extend uses all contiguous unallocated space to the right. PowerShell can do it in one go — query the maximum supported size, then resize to it:

$max = (Get-PartitionSupportedSize -DriveLetter C).SizeMax
Resize-Partition -DriveLetter C -Size $max
Get-Volume -DriveLetter C

To extend D: or another data partition, simply change the drive letter.

Step 4: Bring the new data disk online and initialize it

A newly attached data disk may be offline and uninitialized. Confirm the disk number first (assumed to be 1 below), then bring it online and initialize it. Disks larger than 2 TB must use GPT, and GPT is a good default for all new disks:

Set-Disk -Number 1 -IsOffline $false
Set-Disk -Number 1 -IsReadOnly $false
Initialize-Disk -Number 1 -PartitionStyle GPT

If the disk goes offline again after every reboot, the SAN policy is probably OfflineShared or OfflineAll. Change it in diskpart:

diskpart
san
san policy=OnlineAll
exit

Step 5: Create a partition and format the data disk

After initialization, create a partition that uses the whole disk, assign a drive letter and format it as NTFS:

New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel "Data" -Confirm:$false
Get-Volume

The new data drive (usually D: or E:) now appears in This PC. In Disk Management the same thing takes a few clicks: right-click the disk → Online, then Initialize Disk, then right-click the unallocated space → New Simple Volume and follow the wizard.

FAQ

"Extend Volume" is greyed out.

Usually the unallocated space is not directly to the right of C: (a recovery partition is in the way), or the disk is MBR and has hit the 2 TB limit. You can back up and remove the recovery partition, or ask support to help adjust the layout.

Will extending C: lose data or require a reboot?

A normal volume extension keeps existing data and needs no reboot. Still, take a snapshot or backup first just in case.

I upgraded the disk but Windows does not show the extra space.

Restart the server first, then use Rescan Disks in Disk Management or run Update-HostStorageCache.

If you still need help, submit a ticket to IMIDC 24/7 technical support and attach a screenshot of Disk Management.

Was this answer helpful?

Related Tutorials