difference in image expiration, erase, quick erase, long erase and format
Hi,
bpexpdate - changes the expiration date of the images in a tape. As per me if an image gets expired (or if -d 0 was selected in bpexpdate then all the images in that tape expires), that means data is still there and physically it is not deleted from the tape. Say if all the images are expired then when next backup will run for that pool the data in this tape will get overwritten. Am I right? And if not then what exactly expiration is doing with the data?
erase - If you do not need contents stored on tape, you can erase tapes. Erase will be enabled if the tape has no valid image and the tape is deassigned.
Short erase (fast) — use this option to speed up the erase process. The short erase operation does not physically erase data written on the tape. It simply loads the tape to the drive and wipes the tape header.
Quick erase writes an indicator at the beginning of the media and the contents of the media are made inaccessible. I did not get this.
Long erase (slow) – use this option to clear all data written to tape. The long erase operation loads the tape to the drive, rewinds the tape and physically erases all data written to the tape. I understood this.
Is formatting and erase same here? Or they are different?
Or can somebody explain the difference in leyman.
Thanks.
Say if all the images are expired then when next backup will run for that pool the data in this tape will get overwritten. Am I right? And if not then what exactly expiration is doing with the data?
Yes - this is 100% correct
I should add.
NBDB is one big database ... but we talk about 'volume database' and 'media database' as well (but this info is all in NBDB).
vmquery -a command - shows volume DB stuff, mainly physical, robot, slot number in robot, density etc ...
bpmedialist command shows 'media DB stuff' and this relates to images (eg. number of images on tape).
If a tape shows in the media section of the GUI (or vmquery output) it is in the volume DB and the only way to remove it would be to 'delete' the tape from NBU (only possible if there are no valid images on the tape.
When a tape is selected for backup, it is given an assign time and then appears in the bpmedialist command - and we then say 'it's in the media database).
A tape should only have one assign time, it keeps this, until the last image expires - at which point the tape is marked to expire, but remains in the media DB for a short time, until the 12 hr image cleanup runs (bpimage -delete_all_expired), or bptm -deassignempty runs (every 10 mins I think - but does not show in activity monitor, but does in the bprm log). (Hopefully I got those command options the right way round, but you get the idea). THe tape then loses its assign time, and will no longer appear in the bpmedialist output.
The tape expire time should be equal or maybe just after the expire time of the last image, image expire and tape expire are in fact seperate, although as they are usually in sync, they look the same, they are not. If a tape expires before the images, NBU thinks the images still exsist, but in fact the tape could be reused.
This should not happen, but can - and is one of the things nbcc looks for and warns about - though is fairly rare and can have various different causes.
If a tape should get overwritten, then the old images will still exsist in the catalog. The new image(s) will also exsist, but will have a more recent assign time. The tape media id, and assign time are part of the image fragement table, and is how NBCC spots overwritten tapes, if a tape has two assign times in NBDB, then the images relating to the earliest assign time have, for 100% certainty, been overwritten.
Generally speaking, it's safe to say that if a tape has an assign time it has valid images.
OK, if you have this ... | = filemark
<PHYSICAL BOT> <MEDIA HEADER> |<BACKUP HEADER> <DATA> <DATA>| <BACKUP HEADER> <DATA> <EMPTY HEADER> <LOGICAL EOT> <PHY EOT>
After the relabel ...
<PHYSICAL BOT> <NEW MEDIA HEADER> | <LOGICAL EOT> <MEDIA HEADER> |<BACKUP HEADER> <DATA> <DATA>| <BACKUP HEADER> <DATA> <EMPTY HEADER> <LOG EOT> <PHY EOT>
...the new media header overwrites the old, the a LOG EOT and then whatever was there before is still there ... but the drive won't go past the first LOG EOT.