Feature request: Truncate Virtual Tape File on overwrite

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

Feature request: Truncate Virtual Tape File on overwrite

zacha
Hello!

I know that mhvtl is not made for production use and this may not be interesting for demonstration or testing purposes but I think it should not be very hard to implement:

When your backup software is reusing a tape and begins writing at the beginning mhvtl could truncate the file on the hard disk to release space.

This allows your pool to shrink eventually and not only to extend. As the label won't be rewritten in the most cases this should not only apply if the tape is written from block address 0.

This is how the Overland Reo does it:

"if the tape position in the backup software corresponds to a logical-block address (LBA) that is less than 3, the software treats the device as though it were overwriting a tape, and the REO appliance reduces the capacity of the device to 1GB"

what do you think- is this a good point?

As it is theoretically possible that a software does overwrite at the beginning while there is still valuable data at a position behind this could be made configurable, although that this is not very likely.
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: Truncate Virtual Tape File on overwrite

shark laser
I believe that both the data and index files are truncated (check vtlcart.c : check_for_overwrite()) I think what you mention about Overland REO is probably got to do with some kind of dynamic allocation policy - that is when to release space back to the pool.

Reply | Threaded
Open this post in threaded view
|

Re: Feature request: Truncate Virtual Tape File on overwrite

zacha
you are absolutely right. it is already there. I had been trying this before and meant it does not truncate files. But I was wrong. I did another test again with LTO3 emulation and files are truncated. I think it is exactly that what Overland means with "storage is released to pool" ... as the tape is not consuming any storage as soon as it is being overwritten from the beginning.

and the dynamic allocation means that a tape does only comsume as much as there has been written to it. (besides the usage of compression)

okay.. they pre allocate some space before writing which is possibly a performance thing - but in general it seem to work the same way.