Does mhvtl free up space on virtual tape after files deleted?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Does mhvtl free up space on virtual tape after files deleted?

rohr22
This post was updated on .
Hi. We have an application that is using the mhvtl tape library. I noticed a possible issue today. I experienced this issue with both the 1.5.3 and 1.4.7 versions. The issue is that when I delete a file from the virtual tape, the file space under /opt/vtl is not freed up. This is an issue since we are writing large files to several different virtual tape volumes and then deleting them. The file system is running out of space. It seems like the space under /opt/vtl is not cleaned up after deleting the files. Is there some setting we need to enable to cause mhvtl to free up the disk space after we delete files from the virtual tape? Or, it is normal for mhvtl to not free up the disk space when files are deleted?

Here is our /etc/mhvtl/mhvtl.conf file contents:
# Home directory for config file(s)
MHVTL_CONFIG_PATH=/etc/mhvtl

# Media capacity of 400GB
CAPACITY=409600

# Set default verbosity [0|1|2|3]
VERBOSE=1

# Set kernel module debuging [0|1]
VTL_DEBUG=0


Thank you,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Does mhvtl free up space on virtual tape after files deleted?

Mark Harvey
Administrator
Hello Peter,

Can you please describe the process of "delete a file from the virtual tape" ?

I assume you don't mean "rm -r /opt/mhvtl/<barcode>"..
Space reclamation in the above situation would be an operating system issue.  It would also be bad practice as the mhVTL code expects the virtual media to exist if attempted to be opened by the vtltape daemon.

These sorts of queries are typically derived from 'deleting' or 'expiring' data on the virtual tape from within an application. Most applications do not expect a tape to be available when deleting/expiring data. Hence they do not attempt to 'clean up' any data on the tape(s) themselves.

If you write a small block of data (say 1k) to the tape, you should find the space is then reclaimed back to the file system.

You can use the utility 'dump_tape -f <barcode>' to view the format / metadata on the tape in question.
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Does mhvtl free up space on virtual tape after files deleted?

rohr22
I spoke to someone else on our project who thought it was normal behavior for the space not to be freed up when files are deleted from the virtual tape. When our application uses real tapes, my understanding is that we don't really delete all the data from the tape when files are deleted from it. I guess it is something like what happens when files are deleted from the file system. The space that was used for these files is made available for future file writes.

Thank you for the idea to use dump_tape. I found out about that recently to determine what the capacity is on the virtual tapes.