question

jamesatbiztech avatar image
0 Votes"
jamesatbiztech asked jamesatbiztech answered

Repair-Volume reboot prompt

The chkdsk /f command "Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer." I am well familiar with this offer of a fix on next restart, and it has been very useful when the endpoint happens to be a server that can't be restarted at that very moment. I follow up the command with scheduling a restart after hours, and I am pretty much done as chkdsk takes care of the rest.

I would like to use the Repair-Volume -SpotFix cmdlet and switch to repair a volume that is showing as "Spot Fix Needed", but I am concerned about the "Takes the volume briefly offline" statement. The volume in question has a database on it which means it would not be a good idea to take the volume offline. Yet, I cannot find any information whatsoever to indicate if logic is built into Repair-Volume, as it is with chkdsk, to let me know if the volume cannot be locked and therefore will be "spot fixed" on next restart. I would like to know if this will happen or if the cmdlet will just force the volume offline, creating a potentially big problem for me.

Thanks!

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

Per my test, the Repair-Volume cmdlet has no such logic as chkdsk. You can still use chkdsk in PowerShell.

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jamesatbiztech avatar image
0 Votes"
jamesatbiztech answered

Just a final comment: Interestingly, a chkdsk /f and reboot after hours did not fix the problem. The Get-Volume status still showed as needing a spot fix. Since the client had confirmed the volume was not currently in use, I went ahead and ran Repair-Volume. That cleared the issue. So I guess this means chkdsk and Repair-Volume do not necessarily fix the same issues.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.