lffpires
1 Copper

Truncate files to sizes other than 0

Hi,

is there a way to truncate files stored on the Atmos servers to non-zero sizes? If not, do you have any plans to implement this in the future?

It would be useful, in order to support direct mounting of file systems on Atmos, especially for Windows clients. On Windows, at least on the box I tested, file copies start with a truncation of the destination file to the desired length, resulting in reduced file fragmentation. (and it may be possible to use something similar to allocate space on the Atmos servers as well)

Thanks!

Luis

0 Kudos
3 Replies
David_Oswill
1 Copper

Re: Truncate files to sizes other than 0

Luis,

The UpdateObject call can be used to overwrite an object with a smaller amount of content essentially truncating the object to a smaller size. Atmos does not currently have a specific function to just truncate a file to a specific size without accompanying content except for the case where UpdateObject can be used to truncate to 0 bytes.

As far as direct mounting of filesystems to the Atmos servers, the Atmos onLine service only provides access via REST web services. An on-premise deployed Atmos can be configured to provide for NFS and CIFS interfaces if filesystem access is required.

Regards,

Dave

0 Kudos
lffpires
1 Copper

Re: Truncate files to sizes other than 0

Dave,

according to my tests, UpdateObject is only able to truncate a file to 0 bytes. In the scenario you described, only the bytes in the specified range are overwritten, and the rest of the file is left intact. I agree with this behavior, it should not truncate the file in this case. If a client really wants to replace the contents of a file with a smaller set of data, it should first truncate the file to 0 bytes and then use UpdateObject to write the new data.

Is there any plan to add a TruncateObject or something similar to the API?

Thanks,

Luis

0 Kudos
Highlighted
David_Oswill
1 Copper

Re: Truncate files to sizes other than 0

Luis,

I verified the behavior you described of the object not being truncated when overwriting a subsection of the object and you are correct in that the object will not (and should not) be truncated. As you stated you will need to truncate to 0 and then update the object with the new content. Currently there are no plans to provide a TruncateObject call to the API.

Regards,

Dave

0 Kudos