Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
77ff4428
Commit
77ff4428
authored
5 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Put back unloading of MHVTL tape drives before testing starts
parent
95634eed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
+16
-18
16 additions, 18 deletions
...ousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
with
16 additions
and
18 deletions
continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
+
16
−
18
View file @
77ff4428
...
...
@@ -78,9 +78,8 @@ else
fi
:
<<
'
COMMENT_LABEL_PART
'
if
[
!
$LIBRARYTYPE
==
"mhvtl"
]
;
then
echo "Real tapes
, not labell
ing";
echo
"Real tapes
- do noth
ing"
;
else
# library management
# BEWARE STORAGE SLOTS START @1 and DRIVE SLOTS START @0!!
...
...
@@ -91,22 +90,21 @@ else
# normally, there is no need to rewind with virtual tapes...
mtx
-f
/dev/
${
LIBRARYDEVICE
}
unload
$(
echo
${
unload
}
|
sed
-e
's/^.*-slot//'
)
$(
echo
${
unload
}
|
sed
-e
's/drive//;s/-.*//'
)
||
echo
"COULD NOT UNLOAD TAPE"
done
echo "Labelling tapes using the first drive in
${
LIBRARYNAME
}
:
${
DRIVENAMES
[
${
driveslot
}
]
}
on /dev/
${
DRIVEDEVICES
[
${
driveslot
}
]
}
:"
for ((i=0; i<
${#
TAPES
[@]
}
; i++)); do
vid=
${
TAPES
[
${
i
}
]
}
tapeslot=
$((${
i
}
+
1
))
# tape slot is 1 for tape[0] and so on...
echo -n "
${
vid
}
in slot
${
tapeslot
}
"
mtx -f /dev/
${
LIBRARYDEVICE
}
load
${
tapeslot
}
${
driveslot
}
cd /tmp
echo "VOL1
${
vid
}
CASTOR 3">label.file
mt -f /dev/
${
DRIVEDEVICES
[
${
driveslot
}
]
}
rewind
dd if=label.file of=/dev/
${
DRIVEDEVICES
[
${
driveslot
}
]
}
bs=80 count=1
mt -f /dev/
${
DRIVEDEVICES
[
${
driveslot
}
]
}
rewind
mtx -f /dev/
${
LIBRARYDEVICE
}
unload
${
tapeslot
}
${
driveslot
}
echo "OK"
done
#
echo "Labelling tapes using the first drive in ${LIBRARYNAME}: ${DRIVENAMES[${driveslot}]} on /dev/${DRIVEDEVICES[${driveslot}]}:"
#
for ((i=0; i<${#TAPES[@]}; i++)); do
#
vid=${TAPES[${i}]}
#
tapeslot=$((${i}+1)) # tape slot is 1 for tape[0] and so on...
#
#
echo -n "${vid} in slot ${tapeslot} "
#
mtx -f /dev/${LIBRARYDEVICE} load ${tapeslot} ${driveslot}
#
cd /tmp
#
echo "VOL1${vid} CASTOR 3">label.file
#
mt -f /dev/${DRIVEDEVICES[${driveslot}]} rewind
#
dd if=label.file of=/dev/${DRIVEDEVICES[${driveslot}]} bs=80 count=1
#
mt -f /dev/${DRIVEDEVICES[${driveslot}]} rewind
#
mtx -f /dev/${LIBRARYDEVICE} unload ${tapeslot} ${driveslot}
#
echo "OK"
#
done
fi
COMMENT_LABEL_PART
echo
"### INIT COMPLETED ###"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment