Growing a disk was always been so easy in the past, but with Nano server, you have to figure out a way to do it via PowerShell, as the option to Grow partition was grayed out for me in Server Manager (added as a remote server), and there is no DiskPart.
The procedure is pretty simple once you get it figured out. I took most of the information from another blog, but modified it a little bit to deal with CSV, as the other blog did not. I tried to find the link to the original blog but couldn't find it.
Anyways, here are the steps required:
- Expand the LUN on your SAN first.
- Connect to a remote PoweShell session on your Nano Server.
- Execute Update-HostStorageCache to rescan for storage changes.
- Type get-disk to get the information about the disks on your system. Take note of the disk number in the first colum. Let's assume I am working with disk 1.
- Type get-parition -DiskNumber 1 this will show you the partitions on the disk in question. Take note of the Partition Number, in my case, it's 2.
- Execute Get-PartitionSupportedSize -DiskNumber 1 -ParitionNumber 2 to verify that the SizeMin and SizeMax are different numbers. SizeMax should be the size of your underlying disk, whereas SizeMin would be your current parition size.
- Set a variable to match SizeMax so that you can grow the partition to the full size of the disk. Execute the following command, $MaxSize = (Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber
- Finally run this command to change your disk to the size set in the MaxSize variable, Resize-Partition -DiskNumber 1 -PartitionNumber 2 -Size