[Simh] attaching a tape virtual file without stopping simulation - a solution!

Boucher, François boucher.francois at uqam.ca
Mon Feb 4 16:30:11 EST 2008


Hi, 

I don't think it could be possible to copy the tape.tap file while
It is still attached, as this could corrupt the file contents.
To make sure there is no corruption, I wrote the detach/rename/attach
to empty file modification that is run at the simh level.  This guarantees there is no corruption.

Your cron job can always copy the tape8_*.tap to a given destination,
And you don't have to shutdown the simulated vax to get the tapefile.

When you do a backup /rewind or a dismount/nounload, the tape metafile
Stays attached to the sim, as expected.  But you cannot be sure that copying then the contents of the tape.tap would not give you some corruption.
You cannot also guarantee there are no IOs done by VMS to the metafile when you will be copying the file.  So, detaching the file take care of this concern.

>(I'm using an older version of the simulator, and the auto-attach
>seems to work only at boot time; if I dismount without /nounload
>the next time I try to use the tape there is a repeating message
>on the conslole requesting the operator to mount the tape; exactly
>like a real vax. 

This repeating message is what made me write the mod.  I always want a virgin tape metafile attached to the simulated tape after a dismount is issued.  Of course, you still need to init mua0: LABEL to initialise it, but that is a minor issue IMHO.

Francois Boucher ing.

-----Message d'origine-----
De : Edward Berry [mailto:eaberry1 at pacbell.net] 
Envoyé : 4 février 2008 13:41
À : Boucher, François
Cc : simh at trailing-edge.com
Objet : Re: [Simh] attaching a tape virtual file without stopping simulation - a solution!

That is useful!
I wonder if it would be possible to just copy the tape image file
without de-ttaching?
Say on sunday at 3AM the vax does backup
   backup/rewind . . .
   dismount/nounload . .
Then at 4AM a cron job on the host does:
   cp -p tape.tpe back${date}.tpe

or even:
   mv tape.tpe back${date}.tpe
   touch tape.tpe

The latter would have the advantage of starting with an empty tape
each time where the former would overwrite the previous tape and
if size of the images never decreases, all backups would be the
size of the largest.
The latter would only work if the tape image is reopened by filename
each time it is mounted; not if it is opened once when attached, and
referred to by file handle thereafter?
(easy enough to test, anyway)

(I'm using an older version of the simulator, and the auto-attach
seems to work only at boot time; if I dismount without /nounload
the next time I try to use the tape there is a repeating message
on the conslole requesting the operator to mount the tape; exactly
like a real vax. I don't always have access to the console and I
have vax.ini set to write out nvram and shut down cold upon exit
to the emulator so I can shutdown remotely if the linux has to
be rebooted.)

Ed



More information about the Simh mailing list