Directory Version Limit

Management of storage subsystems: SAN, volume shadowing, logical disks, file systems, and more.

Topic author
compinia
Member
Posts: 7
Joined: Fri Jun 05, 2020 9:51 am
Reputation: 0
Status: Offline

Directory Version Limit

Post by compinia » Tue May 17, 2022 6:43 am

For our logfiles we use a common directory which can be accessed via the logical SYS$LOG.
Now we want to limit the number of files in this directory. For this purpose a version limit was set for the directory, but the version_limit attribute is ignored when a new logfile is created for example with $ reply/log or $ set acc/new. We can adjust the version_limit via the file attribute, but we have to stop the corresponding processes for this purpose, which is not always the best solution.

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by volkerhalle » Tue May 17, 2022 7:24 am

Hi compinia,

tested on VSI OpenVMS Alpha V8.2-2L2:

Code: Select all

$ cre/dir sys$sysdevice:<tmp>/vers=2
$ def/sys OPC$LOGFILE_NAME sys$sysdevice:<tmp>
$ reply/enable
$ reply/log
$ reply/log
VSIAXP $ dir SYS$SYSDEVICE:[TMP]OPERATOR.LOG

Directory SYS$SYSDEVICE:[TMP]

OPERATOR.LOG;2      OPERATOR.LOG;1

Total of 2 files.
VSIAXP $ reply/log
%%%%%%%%%%%  OPCOM  17-MAY-2022 13:17:50.59  %%%%%%%%%%%
Logfile was closed by operator _TNA7:
Logfile was VSIAXP::SYS$SYSDEVICE:[TMP]OPERATOR.LOG;2

VSIAXP $
%%%%%%%%%%%  OPCOM  17-MAY-2022 13:17:50.72  %%%%%%%%%%%
Logfile has been initialized by operator _TNA7:
Logfile is VSIAXP::SYS$SYSDEVICE:[TMP]OPERATOR.LOG;3

VSIAXP $ dir SYS$SYSDEVICE:[TMP]OPERATOR.LOG

Directory SYS$SYSDEVICE:[TMP]

OPERATOR.LOG;3      OPERATOR.LOG;2

Total of 2 files.
Looks like it's behaving as expected.

Note: files created BEFORE setting the version limit on the .DIR file will NOT automatically inhert the new version limit.

Regards and say hello to John,

Volker.


Topic author
compinia
Member
Posts: 7
Joined: Fri Jun 05, 2020 9:51 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by compinia » Wed May 18, 2022 9:44 am

Hallo Volker,

that is clear so far. I have tested as follows:

$ creat/dir sys$sysdevice:<tmp>
$ set dir sys$sysdevice:<tmp>/version=3
$ def/sys opc$logfile_name sys$sysdevice:<tmp>
%DCL-I-SUPERSEDE, previous value of OPC$LOGFILE_NAME has been superseded
$ repl/ena
%%%%%%%%%%% OPCOM 18-MAY-2022 13:55:03.31 %%%%%%%%%%%
Operator _LSTSYS$FTA8414: has been enabled, username SYSTEM

$
%%%%%%%%%%% OPCOM 18-MAY-2022 13:55:03.31 %%%%%%%%%%%
Operator status for operator _LSTSYS$FTA8414:
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY,
LICENSE, OPER1, OPER2, OPER3, OPER4, OPER5, OPER6, OPER7, OPER8, OPER9, OPER10,
OPER11, OPER12

$ repl/log
%%%%%%%%%%% OPCOM 18-MAY-2022 13:55:07.55 %%%%%%%%%%%
Logfile was closed by operator _LSTSYS$FTA8414:
Logfile was LSTSYS::DSA114:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_LSTSYS.LOG;201

$
%%%%%%%%%%% OPCOM 18-MAY-2022 13:55:07.63 %%%%%%%%%%%
Logfile has been initialized by operator _LSTSYS$FTA8414:
Logfile is LSTSYS::SYS$SYSDEVICE:[TMP]OPERATOR.LOG;1

$ dir sys$sysdevice:<tmp>opertor.log/full
%DIRECT-W-NOFILES, no files found
$ dir sys$sysdevice:<tmp>operator.log/full

Directory SYS$SYSDEVICE:<TMP>

OPERATOR.LOG;1 File ID: (2017,2370,0)
Size: 0KB/72KB Owner: [SYSTEM]
Created: 18-MAY-2022 13:55:07.58
Modified: 18-MAY-2022 13:55:07.58 (0)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: 18-MAY-2022 13:55:07.58
Attr Mod: 18-MAY-2022 13:55:07.58
Data Mod: 18-MAY-2022 13:55:07.58
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 144, Extend: 180, Global buffer count: 0, Version limit: 3
Record format: Variable length, maximum 0 bytes, longest 0 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Client attributes: None

Total of 1 file, 0KB/72KB
$
************************************
This works.
Now off the system disk:

$ dsn OPC$LOGFILE_NAME DSA800:[sysfiles.system.logfiles]operator_'node'.log ! def/sys/nolog
SYSTEM:SYS$LOG:<000000>>dir DSA800:[SYSFILES.SYSTEM]logfiles.dir/full

Directory DSA800:[SYSFILES.SYSTEM]

LOGFILES.DIR;1 File ID: (4935,1,0)
Size: 3/96 Owner: [SYSTEM]
Created: 2-JUL-2002 16:51:44.43
Modified: 18-MAY-2022 13:58:18.56 (859)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attr Mod: <None specified>
Data Mod: <None specified>
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 96, Extend: 0, Global buffer count: 0, Default version limit: 30, Contiguous, Directory file
Record format: Variable length, maximum 512 bytes, longest 512 bytes
Record attributes: No carriage control, Non-spanned
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWE, Group:RE, World:E
Access Cntrl List: None
Client attributes: None

Total of 1 file, 3/96 blocks.
SYSTEM:SYS$LOG:<000000>>repl/ena
%%%%%%%%%%% OPCOM 18-MAY-2022 15:02:32.31 %%%%%%%%%%%
Operator _ADEV01$FTA140: has been enabled, username SYSTEM

%%%%%%%%%%% OPCOM 18-MAY-2022 15:02:32.31 %%%%%%%%%%%
Operator status for operator _ADEV01$FTA140:
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY,
LICENSE, OPER1, OPER2, OPER3, OPER4, OPER5, OPER6, OPER7, OPER8, OPER9, OPER10,
OPER11, OPER12

SYSTEM:SYS$LOG:<000000>>repl/log
%%%%%%%%%%% OPCOM 18-MAY-2022 15:02:36.26 %%%%%%%%%%%
Logfile was closed by operator _ADEV01$FTA140:
Logfile was ADEV01::DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR.LOG;4

SYSTEM:SYS$LOG:<000000>>
%%%%%%%%%%% OPCOM 18-MAY-2022 15:02:36.28 %%%%%%%%%%%
Logfile has been initialized by operator _ADEV01$FTA140:
Logfile is ADEV01::DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;43

SYSTEM:SYS$LOG:<000000>>dir DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;43/full

Directory DSA800:[SYSFILES.SYSTEM.LOGFILES]

OPERATOR_ADEV01.LOG;43 File ID: (534,4146,0)
Size: 2/96 Owner: [SYSTEM]
Created: 18-MAY-2022 15:02:36.28
Modified: 18-MAY-2022 15:02:36.28 (0)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attr Mod: <None specified>
Data Mod: <None specified>
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 96, Extend: 180, Global buffer count: 0, No version limit
Record format: Variable length, maximum 0 bytes, longest 92 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Client attributes: None

Total of 1 file, 2/96 blocks.
SYSTEM:SYS$LOG:<000000>>
*******************************
In this case it w'ont work as expected.

Any idea?

Grüße von John ud mir,

Uwe

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by volkerhalle » Wed May 18, 2022 12:09 pm

Uwe,

I can't reproduce this (on VSI OpenVMS Alpha V8.4-2L2):

VSIAXP $ cre/dir dsa64:[sysfiles.system.logfiles]/vers=3
VSIAXP $ dir/full dsa64:[sysfiles.system]logfiles.dir

Directory DSA64:[SYSFILES.SYSTEM]

LOGFILES.DIR;1 File ID: (51121,1462,0)
Size: 1/16 Owner: [1,1]
Created: 18-MAY-2022 18:03:50.81
Modified: 18-MAY-2022 18:03:50.81 (0)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: 18-MAY-2022 18:03:50.81
Attr Mod: 18-MAY-2022 18:03:50.81
Data Mod: 18-MAY-2022 18:03:50.81
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 16, Extend: 0, Global buffer count: 0
Default version limit: 3, Contiguous, MoveFile disabled
Directory file
Record format: Variable length, maximum 512 bytes, longest 512 bytes
Record attributes: No carriage control, Non-spanned
RMS attributes: None
Journaling enabled: None
File protection: System:RWE, Owner:RWE, Group:RE, World:E
Access Cntrl List: None
Client attributes: None

Total of 1 file, 1/16 blocks.
VSIAXP $ def/sys OPC$LOGFILE_NAME DSA64:[SYSFILES.SYSTEM.logfiles]operator_vsiaxp.log
VSIAXP $ reply/log
VSIAXP $
%%%%%%%%%%% OPCOM 18-MAY-2022 18:05:05.44 %%%%%%%%%%%
Logfile was closed by operator _TNA9:
Logfile was VSIAXP::SYS$SYSROOT:[SYSMGR]OPERATOR.LOG;65

VSIAXP $
%%%%%%%%%%% OPCOM 18-MAY-2022 18:05:05.62 %%%%%%%%%%%
Logfile has been initialized by operator _TNA9:
Logfile is VSIAXP::DSA64:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_VSIAXP.LOG;1

VSIAXP $
%%%%%%%%%%% OPCOM 18-MAY-2022 18:05:05.62 %%%%%%%%%%%
Operator status for operator VSIAXP::DSA64:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_VSIAXP.LOG;1
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY,
LICENSE, OPER1, OPER2, OPER3, OPER4, OPER5, OPER6, OPER7, OPER8, OPER9, OPER10,
OPER11, OPER12

VSIAXP $ dir/ful DSA64:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_VSIAXP.LOG;1

Directory DSA64:[SYSFILES.SYSTEM.LOGFILES]

OPERATOR_VSIAXP.LOG;1 File ID: (51122,482,0)
Size: 0/96 Owner: [1,1]
Created: 18-MAY-2022 18:05:05.57
Modified: 18-MAY-2022 18:05:05.57 (0)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: 18-MAY-2022 18:05:05.57
Attr Mod: 18-MAY-2022 18:05:05.57
Data Mod: 18-MAY-2022 18:05:05.57
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 96, Extend: 180, Global buffer count: 0
Version limit: 3
Record format: Variable length, maximum 0 bytes, longest 0 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Client attributes: None

Total of 1 file, 0/96 blocks.

Which OpenVMS version are you using ?

Volker.
Last edited by volkerhalle on Thu May 19, 2022 10:34 am, edited 1 time in total.


Topic author
compinia
Member
Posts: 7
Joined: Fri Jun 05, 2020 9:51 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by compinia » Thu May 19, 2022 7:36 am

Volker,

we are using VSIVMS V8.4-2L1

Uwe

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by volkerhalle » Thu May 19, 2022 10:34 am

Uwe,

could this really make a difference ? V8.4-2L2 vs. V8.4-2L1 ?

Or is it something else ? ODS-2/5 disk ?

Volker.

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by volkerhalle » Fri May 20, 2022 8:56 am

Uwe,

what does DIR/FULL DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;-0 report ? Does the OLDEST file with that name in that directory have /VERSION_LIMIT=30 ?

The DSA800:[SYSFILES.SYSTEM]LOGFILES.DIR had been created 2-JUL-2002 16:51:44.43 and modified 859 times. Since when does it have /VERSION_LIMIT=30 ?

And when did the oldest OPERATOR_ADEV01.LOG file get created in that directory ?

The version-limit for NEW files in such a directory will inherit the default version limit from the directory. Creating NEW versions of existing files without a version-limit in that directory will NOT inherit the version limit from the directory.

Volker.


jonesd
Valued Contributor
Posts: 74
Joined: Mon Aug 09, 2021 7:59 pm
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by jonesd » Fri May 20, 2022 9:58 am

The documentation is misleading. The implicit version limit for a directory (distinct from a .dir file) is always 1, so they use the version limit field in the directory file's directory entry to mean the default version limit for new files in the directory

The file system isn't happy if you rename a .DIR file to a version number other than ;1.

Added in 17 minutes 14 seconds:
volkerhalle wrote:
Fri May 20, 2022 8:56 am
Uwe,

what does DIR/FULL DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;-0 report ? Does the OLDEST file with that name in that directory have /VERSION_LIMIT=30 ?
The version limit is stored in the directory entry (page 54 of McCoy's book), not the file header, so all versions show the same version limit. If you make a hard link to the file, the new entry has an independant version limit.

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by volkerhalle » Fri May 20, 2022 1:58 pm

David,

thanks for the clarification: so every file in that directory with the same name and type has the same version limit (0 or higher).

So I have to re-phrase my question:

When has the file DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;-0 (i.e. the oldest version of that file) been created ? Did the .DIR file had the version_limit=30 set BEFORE that oldest .LOG file had been created ?

Volker.

Added in 1 minute 1 second:
Uwe,

please repeat the test 'off the system disk' and slightly change OPC$LOGFILE_NAME to:

$ dsn OPC$LOGFILE_NAME DSA800:[sysfiles.system.logfiles]operator-'node'.log (dash instead of underscore)

Does it work now ? Does it create OPERATOR-'node'.LOG;1 with the expected version limit of 30 ?

Volker.
Last edited by volkerhalle on Fri May 20, 2022 11:44 pm, edited 1 time in total.


Topic author
compinia
Member
Posts: 7
Joined: Fri Jun 05, 2020 9:51 am
Reputation: 0
Status: Offline

Re: Directory Version Limit

Post by compinia » Mon May 23, 2022 8:03 am

Hi Volker,

I set the Version limit to 0 before I the test, always. Therefor die listings shows then newest version.
I tested now as you have mentioned and the "-" was the solution, I hope for the version V8.4-2L1, only.

$ def/system/nolog opc$logfile_Name DSA800:[sysfiles.system.logfiles]operator-Adev01.log
SYSTEM:SYS$LOG:<000000>>dir DSA800:[SYSFILES.SYSTEM]logfiles.dir/full

Directory DSA800:[SYSFILES.SYSTEM]

LOGFILES.DIR;1 File ID: (4935,1,0)
Size: 2KB/48KB Owner: [SYSTEM]
Created: 2-JUL-2002 16:51:44.43
Modified: 23-MAY-2022 13:41:34.86 (862)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attr Mod: <None specified>
Data Mod: <None specified>
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 96, Extend: 0, Global buffer count: 0, Default version limit: 3, Contiguous, Directory file
Record format: Variable length, maximum 512 bytes, longest 512 bytes
Record attributes: No carriage control, Non-spanned
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWE, Group:RE, World:E
Access Cntrl List: None
Client attributes: None

Total of 1 file, 2KB/48KB
SYSTEM:SYS$LOG:<000000>>repl/ena
%%%%%%%%%%% OPCOM 23-MAY-2022 13:42:01.00 %%%%%%%%%%%
Operator status for operator _ADEV01$FTA140:
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY,
LICENSE, OPER1, OPER2, OPER3, OPER4, OPER5, OPER6, OPER7, OPER8, OPER9, OPER10,
OPER11, OPER12

SYSTEM:SYS$LOG:<000000>>repl/log
%%%%%%%%%%% OPCOM 23-MAY-2022 13:42:06.74 %%%%%%%%%%%
Logfile was closed by operator _ADEV01$FTA140:
Logfile was ADEV01::DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR_ADEV01.LOG;49

SYSTEM:SYS$LOG:<000000>>
%%%%%%%%%%% OPCOM 23-MAY-2022 13:42:06.75 %%%%%%%%%%%
Logfile has been initialized by operator _ADEV01$FTA140:
Logfile is ADEV01::DSA800:[SYSFILES.SYSTEM.LOGFILES]OPERATOR-ADEV01.LOG;1

SYSTEM:SYS$LOG:<000000>>dir sys$log:operator-adev01.log /full

Directory DSA800:[SYSFILES.SYSTEM.LOGFILES]

OPERATOR-ADEV01.LOG;1 File ID: (2384,25,0)
Size: 1KB/48KB Owner: [SYSTEM]
Created: 23-MAY-2022 13:42:06.74
Modified: 23-MAY-2022 13:42:06.74 (0)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attr Mod: <None specified>
Data Mod: <None specified>
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 96, Extend: 180, Global buffer count: 0, Version limit: 3
Record format: Variable length, maximum 0 bytes, longest 91 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Client attributes: None

Total of 1 file, 1KB/48KB
SYSTEM:SYS$LOG:<000000>>

Post Reply