August 20, 2010

Windows Server: sfc /scannow error after expanding disk

Having installed Windows Server 2008 R2 Core as a virtual machine on a Hyper-V cluster, I had some problems setting up it as DC, and one hint was to run sfc /scannow to repair some files. When running the command in command prompt, I was greeted with error:

“Windows resource protection could not perform the requested operation”

As I had installed the VM with only 4 GB HD, I had just expanded the HD size to 5 GB. After that the sfc started giving me this error. What I did was to use diskpart (as there are no fancy graphical UI) to expand the partition to correspond with the new size of the HD:

  1. In command prompt, run: diskpart
  2. In diskpart, first list disks: list disk
  3. Select the desired dish you wish to expand: select disk N (where N is disk number)
  4. List partitions: list partition
  5. Select the desired partition: select partition N
  6. List volumes: list volume
  7. Select the desired volume: select volume N
  8. Extend the filesystem on the selected volume to cover the entire volume: extend filesystem
  9. Exit diskpart: exit

1 comment:

  1. I encountered the same error as well. I ran a disk check-up and it seems my NTFS had a problem in memory allocation.