Unable to delete files on Windows Server 2022 cluster volume formatted with ReFS

I have a 2 node Windows 2022 Server with a cluster volume on Storage Spaces, formated with ReFS.

When I try to delete a file, I get a wierd error messages and the file is not deleted.

Using powershell:

PS C:\Users\administrator.SALESMAN> cd C:\ClusterStorage\Volume1\

PS C:\ClusterStorage\Volume1> dir 1.txt

Directory: C:\ClusterStorage\Volume1

Mode LastWriteTime Length Name

---- ------------- ------ ----

-a---- 26-4-2023 10:32 4194816 1.txt

PS C:\ClusterStorage\Volume1> remove-item 1.txt

remove-item : Cannot remove item C:\ClusterStorage\Volume1\1.txt: The parameter is incorrect.

At line:1 char:1

+ remove-item 1.txt

+ ~~~~~~~~~~~~~~~~~

+ CategoryInfo : WriteError: (C:\ClusterStorage\Volume1\1.txt:FileInfo) [Remove-Item], IOException

+ FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand

PS C:\ClusterStorage\Volume1> remove-item 1.txt -Force

remove-item : Cannot remove item C:\ClusterStorage\Volume1\1.txt: The parameter is incorrect.

At line:1 char:1

+ remove-item 1.txt -Force

+ ~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : WriteError: (C:\ClusterStorage\Volume1\1.txt:FileInfo) [Remove-Item], IOException

+ FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand

PS C:\ClusterStorage\Volume1>

Since this is a ReFS volume, the integrity for the volume should always be correct and running chkdsk is not possible.

What does the error message 'The paramter is incorrect' mean and how can I delete the file.

I get the same error message for any file I try to delete on the volume.

|

Hi Adri,

Hope you're doing well.

The error message "The parameter is incorrect" typically indicates that there is an issue with the file or the file system that is preventing the operation from being completed successfully. In the context of a ReFS volume, this could be related to metadata or file system corruption, even though ReFS is designed for high resiliency.

Here are some steps you can try to resolve the issue:

1. Try using the '\\?\' prefix in your PowerShell command to bypass the normal path parsing and allow for longer paths:

Remove-Item \\?\C:\ClusterStorage\Volume1\1.txt

2. Ensure that the file is not in use or locked by another process. You can use tools like 'Process Explorer' to check for any open handles to the file.

3. Although 'chkdsk' is not available for ReFS, Windows has a built-in 'Repair-Volume' cmdlet that can be used to repair issues on ReFS volumes. Run the following command:

Repair-Volume -DriveLetter C -Scan -Repair

4. In addition, CSV is only used to store virtual machines. It is not recommended to put other files in CSV.

Best Regards

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Adri,

Hope you're doing well.

The error message "The parameter is incorrect" typically indicates that there is an issue with the file or the file system that is preventing the operation from being completed successfully. In the context of a ReFS volume, this could be related to metadata or file system corruption, even though ReFS is designed for high resiliency.

Here are some steps you can try to resolve the issue:

1. Try using the '\\?\' prefix in your PowerShell command to bypass the normal path parsing and allow for longer paths:

Remove-Item \\?\C:\ClusterStorage\Volume1\1.txt

2. Ensure that the file is not in use or locked by another process. You can use tools like 'Process Explorer' to check for any open handles to the file.

3. Although 'chkdsk' is not available for ReFS, Windows has a built-in 'Repair-Volume' cmdlet that can be used to repair issues on ReFS volumes. Run the following command:

Repair-Volume -DriveLetter C -Scan -Repair

4. In addition, CSV is only used to store virtual machines. It is not recommended to put other files in CSV.

Best Regards

Hi Xu,

Thank you for your answer.

1, Attempting to remove the file using the '\\?\' prefix doesn't gibe an error message, but the file is not removed.

2. The file is not locked or used by another process.

3. Running 'Repair-Volume -DriveLetter C -Scan' results in the message 'NoErrorsFound'. I did run this, while 'Redirected access' was enabled for the CSV.

4. I know, the CSV is used for storing Virtual Machines and Virtual Disks. This was just a little test file, I created to ensure it would be unused and not locked.

The error message occurs on all files and all CSV volumns, not just a single file.

Best regards,

Adri.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

IT Admin

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I fail to see how this helps to solve my problem.

I already have CSV volumes created, formatted with ReFS.

I can create files, read files, write files, change attributes etc. without problems.

I just can't delete any files.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated July 18, 2024 Views 187 Applies to: