diff --git a/castor/db/oracleTapeGateway.sql b/castor/db/oracleTapeGateway.sql index 4de48414ca359f0f0ff9162ea11c21ba45514105..90e759e93e33c0d3c4383d0aaa3497978affa4d1 100644 --- a/castor/db/oracleTapeGateway.sql +++ b/castor/db/oracleTapeGateway.sql @@ -1571,3 +1571,13 @@ BEGIN COMMENTS => 'Creates RecallMount entries when new recalls should start'); END; / + + +/* Insert the bare minimum to get a working system. Inserted late in the creation + * script in order to use getTime(). + * - Create the default recall group to have a default recall mount traffic shaping. + */ +INSERT INTO RecallGroup (id, name, nbDrives, minAmountDataForMount, minNbFilesForMount, maxFileAgeBeforeMount, vdqmPriority, lastEditor, lastEditionTime) +VALUES (ids_seq.nextval, 'default', 20, 10*1024*1024*1024, 10, 30*3600, 0, '2.1.13 upgrade script', getTime()); + +/* End of oracleTapeGateway.sql. This trailer makes sure the previous statement is followed by a new line. */ diff --git a/ns/oracleTrailer.sql b/ns/oracleTrailer.sql index b0c0ae5d189bb10ed87aee712b191a18f0cc8b25..724b84bf60fe1006919d1fb662c19fa2614965a5 100644 --- a/ns/oracleTrailer.sql +++ b/ns/oracleTrailer.sql @@ -541,3 +541,20 @@ BEGIN COMMIT; END; / +/* Insert the bare minimum to get a working system. Inserted late in the creation + * script in order to use getTime(). + * - Create a default 'system' fileclass. Pre-requisite to next step. + * - Create the root directory. + * - Create a synonym to access the VMGR. This requires CNS and VMGR co-location + * in the same database. + */ +-- Root entry + insert into cns_class_metadata (classid, name, owner_uid, gid, min_filesize, max_filesize, flags, maxdrives, max_segsize, migr_time_interval, mintime_beforemigr, nbcopies, retenp_on_disk) +values ( 1, 'system', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +insert into cns_file_metadata (fileid, parent_fileid, guid, name, filemode, nlink, owner_uid, gid, filesize, atime, mtime, ctime, fileclass, status, csumtype, csumvalue, acl) +values ( 2, 0, NULL, '/', 16877, 0, 0, 0, 0, getTime(), getTime(), getTime(), 1, '-', NULL, NULL, NULL); + +-- A synonym allowing to acces the VMGR_TAPE_SIDE table from within the nameserver DB +UNDEF vmgrSchema +ACCEPT vmgrSchema CHAR DEFAULT 'vmgr' PROMPT 'Enter the name of the VMGR schema (default vmgr): '; +CREATE OR REPLACE SYNONYM Vmgr_tape_side FOR &vmgrSchema..Vmgr_tape_side; \ No newline at end of file