Operating System - OpenVMS
1752794 Members
5890 Online
108789 Solutions
New Discussion юеВ

Re: image backup to tape produces two identical save sets.

 
SOLVED
Go to solution
Kirk Reindl
Frequent Advisor

image backup to tape produces two identical save sets.

OVMS 7.3-2
AS1200

I have followed the OVMS documentation for creating an image backup from a disk to tape.

When I complete the operation and mount the tape as a "files 11" device, then do a directory listing it looks like I'm getting a duplicate entry. Here is the output:

SYS_OSIBK1>dir $2$mga2:

Directory $2$MGA2:[]

FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00
FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00

Total of 2 files, 176.61MB
SYS_OSIBK1>

Is this normal?
The following is the exact sequence of commands I used to produce the output you are seeing:

SYS_OSIBK1>init $2$mga2: osibk1
SYS_OSIBK1>mount /over=id $2$mga2:
%MOUNT-I-MOUNTED, OSIBK1 mounted on _$2$MGA2: (OSIBK1)
SYS_OSIBK1>dir $2$mga2:
%DIRECT-W-NOFILES, no files found
SYS_OSIBK1>dismount /nounload $2$mga2:
SYS_OSIBK1>backup/image osibk1$dkb0: $2$mga2:fullsys.sav /label=osibk1/ignore=(interlock,label)

SYS_OSIBK1>dism /nounl $2$mga2:
SYS_OSIBK1>recal mount
SYS_OSIBK1>mount /over=id $2$mga2:
%MOUNT-I-MOUNTED, OSIBK1 mounted on _$2$MGA2: (OSIBK1)
SYS_OSIBK1>dir $2$mga2:

Directory $2$MGA2:[]

FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00
FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00

Total of 2 files, 176.61MB
SYS_OSIBK1>

Thanks for any insight you can give me.
Kirk
16 REPLIES 16
Volker Halle
Honored Contributor
Solution

Re: image backup to tape produces two identical save sets.

Kirk,

did you run this from an account with a default directory like SYS$SYSROOT (i.e. including a logical with multiple translations) ? If so, then this is expected. Try $ SET DEF SYS$COMMON:[SYSMGR] and repeat the DIR command.

Volker.
Kirk Reindl
Frequent Advisor

Re: image backup to tape produces two identical save sets.

Volker:

Excellent work.

SYS_OSIBK1>show def
SYS$SYSROOT:[SYSMGR]
= SYS$SYSROOT:[SYSMGR]
= SYS$COMMON:[SYSMGR]
SYS_OSIBK1>mount /over=id $2$mga2:
%MOUNT-I-MOUNTED, OSIBK1 mounted on _$2$MGA2: (OSIBK1)
SYS_OSIBK1>dir $2$mga2:

Directory $2$MGA2:[]

FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00
FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00

Total of 2 files, 176.61MB
SYS_OSIBK1

SYS_OSIBK1>set def sys$common:[sysmgr]
SYS_OSIBK1>show def
SYS$COMMON:[SYSMGR]

SYS_OSIBK1>recal dir
SYS_OSIBK1>dir $2$mga2:

Directory $2$MGA2:[]

FULLSYS.SAV;1 88.30MB 23-AUG-2004 00:00:00.00

Total of 1 file, 88.30MB
SYS_OSIBK1>

I'm having trouble understanding why this happens though. I'm simply doing a directory listing of the tape in the tape drive. Do you know of a good resource that explains the "OS" logical defs? I still don't have a clear understanding of how they work. I haven't had much luck with the standard OVMS doc.

Thanks
Kirk
Uwe Zessin
Honored Contributor

Re: image backup to tape produces two identical save sets.

Kirk,

it is an old, old problem [first seen in VAX/VMS V4.x] with logical name search lists.

If you do a '$ directory tape:', then you are leaving off the directory specification and the record manager (RMS) grabs one from your 'set default' context.

SYS$SYSROOT: is a search list that contains two elements. So, a directory specification is applied two times and you see the same file two times.

There are two workarounds:

- 'set default' to a unique context as Volker has suggested

- do a 'directory tape:[]'
this gives an explicit directory specification and RMS does not need to grab one from your 'default context'
.
Jan van den Ende
Honored Contributor

Re: image backup to tape produces two identical save sets.

Kirk,

I spotted a small, but significant typo in Uwe's answer:

do a 'directory tape:[]'


but that is exactly what you originally did...

Add a "*" between "[]", giving:
$ DIRE tape_dev:[*]
and NOW you specify : "any directory on the tape"; which is just one.

If you really get linguistic about it, the DCL syntax SET DEFAULT says exactly what it does.
In many other OSses you SET a WORKING DIRECTORY or some equivalent; in speaking often: "Go stand in a directory".

The workings of VMS's file name parser are MUCH more extended, and the way to make it workable for humans follow suit.

ANY file you reference in VMS has (directly or indirectly) to be evaluated to its fysical location, by its full file specification.
A full VMS filespec consists of nodename::devicespec:[dirspec-with-potentially-subdirspecs]filename.extension;version.

ANd HERE is where SET DEFAULT kicks is: it is [only!!] a special memory location specifying a string that is used by the file parser to complete any filespec part that is NOT given explicitly.
(for completeness: nodename here defaults to local node).

So, now back to your question:

DIR TAPEDEV:

NO node-spec => use local node
device: tapedev => use specified by command
NO dir spec: => use from default string
>>> this is a search list from two dirs, so search both!
NO filename, extension, version: the DIRECTORY command defaults that to *.*;*

ANd, as seen, completely consistent: IF you SET DEFAULT to a string that evaluates a single DIR, you get ONE answer,
If you specify [*}. you specify explicitly ALL tape directories, being only one.
BUT, if you specify to use the default string, that specifies two different passes.


hth,


Jan

Don't rust yours pelled jacker to fine doll missed aches.
Uwe Zessin
Honored Contributor

Re: image backup to tape produces two identical save sets.

Jan,
can you tell me the line number in Kirk's message? I see that the output says 'tape:[]', but I don't see it as input...
.
Dale A. Marcy
Trusted Contributor

Re: image backup to tape produces two identical save sets.

UWE,

You are correct that the user does not specify the [], but [] means use the default directory which is the original problem because the default directory is a multiply defined logical.
Jan van den Ende
Honored Contributor

Re: image backup to tape produces two identical save sets.

Uwe,



SYS_OSIBK1>dir $2$mga2:

Directory $2$MGA2:[]


I obviously reacted too quick, and I to the answer syntax to frase the wuestion as well.

... and here __I__ am accusing __YOU__ of inaccurasy in typing... :-(

Nevrtheless, DEV: and DEV:[] behave the same, so the argumentation remains valid.


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Uwe Zessin
Honored Contributor

Re: image backup to tape produces two identical save sets.

Has any one of you tried out the difference between:
- directory tape:
and
- directory tape:[]

?? It's been some time *I* tried it and I can't do on a current VMS system now, but I assure you that '[]' *did* work in the past.
.
Willem Grooters
Honored Contributor

Re: image backup to tape produces two identical save sets.

Uwe,

just tried (not on tape but disk but the principle will be equal) on 7.3-2:

$ dir []

gave me the contents of the current directory. Is the same as simply specifying $ dir

$ dir sys$sysdevice:[]

gave me an error (obviously since the directory is not on that device)

$ dir sys$sysdevice:[*]

gave me a listing of that device (1st level directory, in this case since I specified "*")

$ dir sys$sysdevice:[*.*]

gave me a listing of that device (2nd level directories only, in this case since I specified "*.*")

HTE

Willem
Willem Grooters
OpenVMS Developer & System Manager