Skip to main content
NetApp Knowledge Base

Why would file be created with 0 byte size in a NFS share?

Views:
26
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

Applies to

  • ONTAP 9
  • NFS

Answer

  • When a file is shown as 0 byte in size this is likely due to a copy operation that has been interrupted
  • 0 byte files can be seen after an NDMP restore
    • An NDMP restore is a data recovery process that uses the Network Data Management Protocol (NDMP) to move data directly from backup storage to NAS devices
  • NFS Client Hangs/Timeouts - If the NFS client hangs during a large file transfer, the file entry may exist, but the data never finishes writing, resulting in a 0-byte file
  • Clients creating the files may not have the relevant permissions:
    • The file is created with permissions 777, but a subsequent SETATTR call to change the file permissions to 755 fails with an NFS3ERR_PERM error
    • CREATE Call: Client sends a CREATE call with permissions 777, and the file is created successfully
    • SETATTR Call: Client sends a SETATTR call to set the file permissions to 755, which fails with an error
    • File Exists Check: Client checks if the file exists, and it does
    • File Update: Client updates the file's mtime
    • File Write: Client writes to the file
    • Ensure that the client has the necessary permissions to change file attributes
    • Verify that the SETATTR call is correctly formatted and that the client has the required permissions to modify the file's attributes
  • Capacity issues - check with volume show to ensure there is enough capacity on the required volumes
NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.