Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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
Uwe Zessin
Honored Contributor

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

I don't know what "HTE" means and I don't know what you are trying to prove. You have successfully demonstrated that a disk (handled by the XQP) looks different than a tape (handled by the MTAACP, when mounted as an F11 volume).

Although I am a bit short on time, I have run a test - please see the attachment.
.
Uwe Zessin
Honored Contributor

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

Well, the tape was in the drive anyway, so here are two more results - just ignore the wrap, there a 4 filenames per line, but I'm too lazy to handle an attachment, now.

$ dir mkc0:[itrc_is_great]

Directory MKC0:[]

AXPBINJUN011.BCK;1 AXPBINJUN012.BCK;1 AXPBINJUN013.BCK;1 AXPBINJUN014.BCK;1
AXPBINJUN015.BCK;1 AXPBINJUN016.BCK;1 AXPBINJUN017.BCK;1 AXPBINJUN018.BCK;1
AXPBINJUN019.BCK;1 AXPDOCJUN011.BCK;1 AXPDOCJUN012.BCK;1

Total of 11 files.
$ dir mkc0:[itrc.is.great]

Directory MKC0:[]

AXPBINJUN011.BCK;1 AXPBINJUN012.BCK;1 AXPBINJUN013.BCK;1 AXPBINJUN014.BCK;1
AXPBINJUN015.BCK;1 AXPBINJUN016.BCK;1 AXPBINJUN017.BCK;1 AXPBINJUN018.BCK;1
AXPBINJUN019.BCK;1 AXPDOCJUN011.BCK;1 AXPDOCJUN012.BCK;1

Total of 11 files.
$
.
Willem Grooters
Honored Contributor

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

Uwe,

HTE = Hope This Explains

Prove: The difference is [] you specified on DIR command. I run into this difference every day (and forget it once in a while)

If you do SET DEF to a searchlist, DIR (without anything) will walk down the searchlist, DIR [] will just use the first entry only.

I'm not certain how it will be on tape but I doubt there is a significant difference to disk...

Willem
Willem Grooters
OpenVMS Developer & System Manager
Dale A. Marcy
Trusted Contributor

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

Although it seems inconsistent to me, Uwe is correct that just adding the [] to the command will eliminate the duplicate listings. I just tried it on a tape mounted on a VMS V6.2-1h3 system with my default set to sys$system:. When I did a dir tape:, it duplicated the filenames. When I did a dir tape:[] it did not duplicate the filenames.
Uwe Zessin
Honored Contributor

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

Willem,
I suggest you check the attachment of my message from 'Aug 25, 2004 12:32:24' to see the difference...

""If you do SET DEF to a searchlist, DIR (without anything) will walk down the searchlist, DIR [] will just use the first entry only.""

Have you tried it? I get this result on OpenVMS Alpha V7.3-2:
$ set defa sys$system
$ pipe dir | search sys$input sysexe
Directory SYS$SYSROOT:[SYSEXE]
Directory SYS$COMMON:[SYSEXE]
$ pipe dir [] | search sys$input sysexe
Directory SYS$SYSROOT:[SYSEXE]
Directory SYS$COMMON:[SYSEXE]
$

-----
Dale,
I have explained it on 'Aug 23, 2004 19:26:41'.
.
Dale A. Marcy
Trusted Contributor

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

Uwe,

The inconsistency to me is because I have always read the [] as meaning to use the default directory specification which in this case is a search list. I would therefore have expected it to produce the same results as not specifying a directory which also is supposed to use the default directory specification.
Uwe Zessin
Honored Contributor

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

The default directory specification is not 'the search list':

$ set defa sys$manager
$ show log sys$disk
"SYS$DISK" = "SYS$SYSROOT:" (LNM$PROCESS_TABLE)
1 "SYS$SYSROOT" = "DSA0:[SYS0.]" (LNM$SYSTEM_TABLE)
= "SYS$COMMON:"
2 "SYS$COMMON" = "DSA0:[SYS0.SYSCOMMON.]" (LNM$SYSTEM_TABLE)
"SYS$DISK" = "DSA0:" (LNM$SYSTEM_TABLE)
$ show def
SYS$SYSROOT:[SYSMGR]
= SYS$SYSROOT:[SYSMGR]
= SYS$COMMON:[SYSMGR]
$

A 'default specification' consists of two parts:
- the default 'device', stored in logical SYS$DISK
- the default 'directory', stored somewhere in P1 memory


You see from my message dated 'Aug 25, 2004 13:34:59' that a tape does not really have a directory. It looks to me that programs like DIRECTORY or COPY want to embedd a directory specification, no matter if they go to disk or tape. If one does not specify a directory, it is taken from the default context. The behaviour we see looks like an unfortunate side-effect of RMS' treating a search list.


Try this from the 'silly experiments' department:
$ set default sys$login
$ show default
USRDSK:[ZESSIN]
$
$ define a sys$sysroot:[sysexe],[sysmgr]
$ set default a:
$ show default
A:[ZESSIN]
= SYS$SYSROOT:[SYSEXE]
= SYS$COMMON:[SYSEXE]
$ directory
...
.