Using ACSLS: Last Updated On 8 August 2005. New Items Are Marked by
Using ACSLS: Last Updated On 8 August 2005. New Items Are Marked by
Using ACSLS: Last Updated On 8 August 2005. New Items Are Marked by
Contents
Access to ACSLS
Stopping and starting ACSLS
Logs kept by ACSLS
Status of library components
Inventory of VIDs in the library
Owners of VIDs in the library
Clearing locks on volumes in the library
Full and partial audits of the library
Insert and eject of VIDs to and from the library
Moves of individual VIDs within the library
Query on individual VIDs or drives
Mount and dismount of VIDs on drives
crontab tasks
vary commands
Cleaning cartridges
view command completely missing!
Access to ACSLS
Most of the functions of ACSLS used at CERN are straightforward, and are
summarised here. Note that to use ACSLS other than directly on the controlling
Sun, you need to ssh to it. The username and password are available from CSC or
JFL if need be.
You can also use ssh from the Suns to other systems, ie from sunstk51/sunstk53
(513 vault, SL8500_0, STK_ACS4), sunstk61/sunstk61 (STK_ACS5 in bat.613).
The ssh software has been installed by invoking (as root)
/usr/sue/etc/sue.install ssh
You can use ssh:
/usr/sue/bin/ssh -V
OpenSSH_3.4p1-CERN20020827, SSH protocols 1.5/2.0, OpenSSL 0x0090605f
/usr/sue/bin/ssh -l username lxplus
Current controller
sunstk51
sunstk53
Location Use
513 s/s T10K, LTO3,
513 s/s
9940B
STK_ACS5
sunstk61
sunstk61
613
9940B
Once you have a window available, you should be in the home directory:
/export/home/ACSSS
under
Sun Microsystems Inc.
You should now:
SunOS 5.8
Generic Patch
October 2001
set -o emacs
to improve the behaviour of the window. The 'backspace' key will now probably
function, and command recall is offered by 'ctrl-P'. AFS is currently offered on
the Sun, and you can ssh as yourself.
If you set your own username files can be sent to (or obtained from) your normal
AFS home directory.
Stopping and starting ACSLS
It is not often that this needs to be done, but we have done this a few times to apply
patches. Most recently, we did this to apply a patch preventing ACSLS from
writing any important files into '/tmp'.
The patch was PTF804765S for ACSLS 7.1 Here is how it was done:
1. Download the patch to your server.
2. Stop ACSLS and its database, by:
3. Login as acsss
4. $ cmd_proc -l
5. ACSSA> idle
6. ACSSA> logoff
7. $ kill.acsss
8. $ db_command stop
login as root
# uncompress PTF804765S.tar.Z
# tar -xvf PTF804765S.tar
# pkgadd -d PTF804765S
Apply the modification
login as acsss
$ cd utils
$ su
# switch to root (no dash)
# ./change_tmp.sh -s
;# no message is good message
# exit # back to acsss
2. $ rc.acsss
Check the /export/home/ACSSS/log/acsss_event.log (any special messages in
there?)
ACSLS versions
We presently run ACSLS 7.1 in all ACSLS libraries:
7.1 SL8500_0 513 Streamline library, via 'sunstk51'
7.1 STK_ACS4 513 Powderhorn library, via 'sunstk53' (STK_ACS4)
7.1 STK_ACS5 613 Powderhorn library, via 'sunstk61' (STK_ACS5)
To determine the version, login to the relevant Sun and issue the command
'cmd_proc'. For example, on sunstk61, as user 'acsss', you will see the line:
-----------------------------------------ACSLS
7.1.0-----------------------------------------
ACSLS 7.1.0 appears to address some of the current shortcomings of ACSLS 7.1.
In particular, these versions offer no sensible 'event notification' and no WWW
interface .
Logs kept by ACSLS
There are several logs offered by ACSLS, but none is 'complete'. Even looking at
several, information is still missing . The most complete seems to be found in:
/export/home/ACSSS/log/acsss_stats.log
with previous logs in eg
/export/home/ACSSS/log/vol_stats0.log
...
/export/home/ACSSS/log/vol_stats9.log
be well before it came to be executed) nor is there any explicit trace of passthrough movements for a volume. This would be useful for the notorious 'lost
volume' cases. The multi-line per event format is also unhelfpul .
Status of library components
There are 4 items that may be usefully queried: 'lmu' (library management unit),
'cap' (cartridge access port), 'lsm' (library storage module or 'silo') and 'clean'
(cleaning cartridges, handled not quite like normal VIDs). A crontab query runs
for each library, and can be seen in:
http://it-dep-fio-ds.web.cern.ch/it-dep-fiods/Documentation/tapedrive/ACS4.status.html
for STK_ACS4, for example.
To issue such queries you need to ssh to 'sunstk53' for STK_ACS4 (building 513
basement), and to 'sunstk61' for STK_ACS5 (building 613). Contact CSC or JFL
for the username and password if need be. Once logged in, open the 'cmd_proc'
window and you can issue queries from it:
cmd_proc
Library Management Units (Powderhorn libraries)
There are 2 of these, normally cross-connected to the 2 controlling Sun systems.
Those in bat.513 attached to STK_ACS4 are connected to sunstk53 using ethernet
TCP/IP. Those in bat.613 attached to STK_ACS5 are connected to sunstk61 using
ethernet TCP/IP.
ACSSA> q lmu all
2004-03-31 12:53:55
ACS:
0
Mode: Dual LMU
Port
0, 0
0, 1
ACSSA>
Port State
online
online
LMU Status
Master Status: Communicating
Standby Status: Communicating
Role
Master(A)
Standby(B)
CL
12
12
Port Name
lmua
lmub
Size
21
21
21
21
40
40
1
CAP Status
State
online
online
online
online
online
online
online
Mode
automatic
automatic
automatic
automatic
automatic
automatic
automatic
Status
available
available
available
available
available
available
available
LSM Status
Free Cell Audit
Mount
Dismount
Enter
Count
C/P
C/P
C/P
C/P
0, 0
online
261
0/0
0/0
0/0
0/0
0, 1
online
3700
0/0
0/0
0/0
0/0
0, 2
online
1325
0/0
0/0
0/0
0/0
0, 3
online
455
0/0
0/0
0/0
0/0
0, 4
0/0
ACSSA>
online
3158
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
Cleaning cartridges
ACSSA> q clean all
2003-09-26 14:20:02
Cleaning Cartridge Status
Identifier Home Location
Max Usage Current Usage
CLN103
0, 1, 4, 6,13 100
56
CLN104
0, 1,12, 1, 7 100
0
CLN105
0, 1,13, 1,14 100
0
CLN106
0, 1,14, 1,10 100
0
CLN107
0, 1, 6, 4, 4 100
0
CLN301
0, 0,10, 4, 3 100
15
CLN302
0, 0, 2, 1, 3 100
4
CLN303
0, 0,17, 2, 5 100
4
CLN304
0, 0,16, 1, 7 100
3
CLN305
0, 3,19, 4,15 100
0
CLN306
0, 3, 3, 5, 5 100
0
CLN601
0, 2,18, 3,13 100
75
CLN603
0, 3, 3, 0, 0 100
61
CLN604
0, 3, 4, 0, 0 100
1
CLN605
0, 3, 5, 0, 0 100
0
CLN606
0, 1,12, 1,11 100
0
ACSSA>
Status
home
home
home
home
home
home
home
home
home
home
home
home
home
home
home
home
Drives
ACSSA> q drive all
2003-09-26 14:20:03
Identifier
State
0, 0,10, 0 online
0, 0,10, 1 online
0, 0,10, 2 online
0, 0,10, 3 online
0, 0,10, 4 online
0, 0,10, 5 online
0, 0,10, 6 online
0, 0,10, 7 online
0, 0,10, 8 online
0, 0,10, 9 online
0, 1, 7, 0 online
0, 1, 7, 1 online
0, 1, 7, 2 online
0, 1, 7, 3 online
0, 1,10, 0 online
0, 1,10, 1 online
0, 1,10, 2 online
0, 2,10, 0 online
0, 2,10, 1 online
0, 2,10, 2 online
Drive Status
Status
Volume
available
available
available
available
available
available
available
in use
R05064
available
available
available
available
available
available
available
available
available
available
available
available
Type
9840
9840
9840
9840
9840
9840
9840
9840
9840
9840
9490
9490
9490
9490
9490
9490
9490
T9940B
T9940B
T9940B
Type
JLABEL
JLABEL
JLABEL
JLABEL
JLABEL
STK1U
STK1U
STK1U
STK1U
STK1U
STK1U
STK2W
STK2W
STK2W
STK2W
STK2W
0, 2,10, 3 online
0, 2,10, 4 online
0, 2,10, 5 online
0, 2,10, 6 online
0, 2,10, 7 online
0, 2,10, 8 online
0, 2,10, 9 online
0, 2,10,10 online
0, 2,10,11 online
0, 3,10, 0 online
0, 3,10, 1 online
0, 3,10, 2 online
0, 3,10, 3 online
0, 3,10, 4 online
0, 3,10, 5 online
0, 3,10, 6 online
0, 3,10, 7 online
0, 3,10, 8 online
0, 3,10, 9 online
0, 3,10,10 online
0, 3,10,11 online
2003-09-26 14:20:04
Identifier
State
0, 3,10,12 online
ACSSA>
available
in use
P23016
in use
P00740
available
available
in use
P13348
available
available
in use
P12166
available
in use
P05324
available
in use
P20562
in use
P22834
available
in use
P03984
available
in use
P22962
available
in use
P22954
available
Drive Status
Status
Volume
available
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
T9940B
Type
T9940B
This generated the reports below, one for the volumes in the library and one for
their 'owners'.
The report generated looks like this:
VOLUME REPORT UTILITY
2003-09-29 00:05:08
TOTAL VOLUMES: 19260
Volume
Home
Last Used-----|
Label
Location
Date
Time
AV0019
0, 1, 1,10,17
05-16 16:49:41
AV0020
0, 1, 8, 1,18
05-25 14:36:40
AV0021
0, 1,15, 1, 7
08-25 16:08:57
AV0022
0, 1, 1,10, 1
06-13 10:31:41
Times
|-----Entered------| |---Date
Time
Ext.
D/JLABEL
2003-05-14 14:22:03
2003-
Ext.
D/JLABEL
10
2003-05-14 15:25:20
2003-
Ext.
D/JLABEL
2003-05-13 11:20:03
2003-
Ext.
D/JLABEL
2003-05-22 11:48:47
2003-
.......
Page Number: 316
Volume
Home
Last Used-----|
Label
Location
Date
Time
R09530
0, 0, 7, 9, 2
08-20 01:03:02
R09531
0, 0,15,12, 2
09-06 22:05:25
R09532
0, 0,12, 2, 3
07-12 18:01:07
R09533
0, 0,19, 9,10
07-29 05:14:43
R09534
0, 0, 8,13, 7
07-14 20:55:44
Label Volume
Times
|-----Entered------| |---Date
Time
Ext.
D/STK1R
2003-05-21 17:11:10
2003-
Ext.
D/STK1R
2003-05-20 17:52:20
2003-
Ext.
D/STK1R
2003-05-20 17:32:09
2003-
Ext.
D/STK1R
2003-05-20 18:20:53
2003-
Ext.
D/STK1R
2003-05-20 17:18:21
2003-
Ext.
D/STK2P
2003-09-18 12:10:16
2003-
Ext.
D/STK2P
15
2003-08-25 15:50:50
2003-
.......
STK101
0, 3,15, 0, 6
09-18 12:24:04
STK102
0, 3,11, 3, 4
09-26 10:27:33
Note that in the output of volrpt, data cartridges are of type 'D' and cleaning
cartridges are of type 'C'. The media indicators for different data cartridges are as
follows:
Type
' ' (blank)
E
J
J
K
JA
A
B
C
P
P
R
R
S
D
L3
Unit type
3480
3490
3590
3590E
3590E
3592
SD3 'Redwood'
SD3
SD3
9940A
9940B
9840A
9840B
SDLT
DLTIV
LTO3 HP
Capacity
200 MB
800 MB
10 GB
20 GB
40 GB
300 GB
10 GB
25 GB
50 GB
60 GB
200 GB
20 GB
40 GB
110 GB
10/20/35/40 GB DLT models
400 GB
The 'owner' report generated by the above crontab task looks like this:
VOLUME REPORT UTILITY
2003-09-12 11:46:20
TOTAL VOLUMES: 19253
Volume
Label
Volume
Status
Owner
ID------------------
AV0019
AV0020
AV0021
AV0022
AV0023
AV0024
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
adsm
adsm
adsm
adsm
adsm
adsm
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
VOLUME_HOME
castor
castor
castor
castor
castor
......
RT0004
RT0006
RT0008
STK011
STK102
The default 'owner' is 'castor', and the others are specifically set with commands in
the cmd_proc window. Ownerships essentially define the IP address of a host
system which is entitled to mount or dismount the volume. The file specifying
which IP address corresponds to owner 'adsm' and so on is
/export/home/ACSSS/data/external/access_control/internet.addresses
and looks like this:
# P4_Id - $Id:
//depot/acsls_dev/misc/access_control/internet.addresses.SAMPLE#1 $
###########################################################################
#
#
# Filename: internet.addresses
#
# This file contains a list of Internet addresses for which you want to
# have the ACSLS software automatically fill in the User ID (also known
# as the Access ID) in the message header.
#
# Each line should consist of a "dotted quad" Internet address and an
# associated name, separated by spaces or tabs. Neither the address or
# the name may have embedded tabs or spaces. Anything to the right of
# the name is treated as a comment. Blank lines, and lines starting
# with # are ignored.
#
# Revision History:
# xx/xx/xx Name
Description of change.
#
###########################################################################
#
This is adsm2
This the adsm test machine tsmtest1
137.138.189.81 legato
137.138.138.71 legato
This is sunnsr01
This is sunnsr02
castor
Alternatively, you can specify an owner for a volume in the 'cmd_proc' window:
set owner "castor" volume P12345
Clearing locks on volumes in the library
A feature of ADSM/TSM is that it sets locks as it uses its volumes. These must be
cleared if you need to eject such volumes from the library. To query locks and to
clear them, open a cmd_proc window and use commands like these:
query lock volume AW1001
or
query lock volume all
clear lock volume AW1001
Full and partial audits of the library
It is possible to audit the library while it continues to operate for users, but this is
so slow as to be impractical. It requires ~2-3 hours . You can audit silos, or parts
of silos. It is essential to issue this command first, to quiesce ACSLS activity:
idle
If you forget to issue 'idle', then it is unlikely that the requested 'vary offlines' will
complete. Re-issue them, adding the 'force' option.
A complete audit of ACS4 or ACS5 takes ~2-3 hours, and is fastest if the silos are
full. Apparently empty slots are checked for the presence of an unstickered volume,
which is slow compared with reading the barcode sticker normally on a
volume. This checking for unstickered volumes should be a site configurable
option .
Insert and eject of VIDs to and from the library
Insertion is easy. All you need to do is open the CAP you wish to use, and insert
the volumes. The CAP locks, and volumes are scanned and move to storage slots
without further intervention. Once the insertion is finished, the CAP unlocks.
It is not straightforward to determine when an insert or eject is finished unless you
are present and listening for the quite loud 'unlock' . present and listening for the
quite loud 'unlock'. Two approaches you can use are to scan the 'event log'
maintained by ACSLS for messages such as
Remove cartridges from CAP
or
Eject operation complete
and then email yourself from a looping script such as this one:
#!/bin/csh
echo CAP INSERT and EJECT messages from acsss_event.log
set NL=`wc -l /export/home/ACSSS/log/acsss_event.log | awk '{print $1}' `
echo Log size starts at $NL
#set NL = 18000
set NPASS = 0
while (1)
@ NPASS = $NPASS + 1
echo Pass $NPASS
date
rm /tmp/CAP.messages
tail +$NL /export/home/ACSSS/log/acsss_event.log
tail +$NL /export/home/ACSSS/log/acsss_event.log | egrep 'Remove cart|Enter
operation completed' > /tmp/CAP.messages
set NLC=`wc -l /tmp/CAP.messages | awk '{print $1}' `
echo New CAP messages found $NLC
if ( $NLC > 0 ) then
echo Mailing csc
cat /tmp/CAP.messages
mailx -s "CAP ACS4 Messages" [email protected] < /tmp/CAP.messages
mailx -s "CAP ACS4 Messages" [email protected] <
/tmp/CAP.messages
set NL=`wc -l /export/home/ACSSS/log/acsss_event.log | awk '{print $1}' `
echo Log size now starts at $NL
sleep 300
end
Alternatively, you start up a script like this one which (in this case) transfers three
lists of up to 21 volumes via 'ftp' from a system where you organise the work and
repeatedly performs 'q vol Pnnnnn' for them until they are all ejected:
#!/bin/csh
while (1)
echo 'Moving cartridges'
echo 'Packet 1 eject.vid.'$1
echo 'Packet 2 eject.vid.'$2
echo 'Packet 3 eject.vid.'$3
rm get.list.commands
echo 'get eject.vid.'$1 > get.list.commands
echo 'get eject.vid.'$2 >> get.list.commands
echo 'get eject.vid.'$3 >> get.list.commands
echo 'quit' >> get.list.commands
cat get.list.commands
ftp -v wacdr < get.list.commands
rm totaleject
cat eject.vid.$1 eject.vid.$2 eject.vid.$3 > totaleject
rm qtotaleject
sed -e "s/P/q vol P/g" totaleject > qtotaleject
ls -al qtotaleject
rm ntoeject
Type
Type
STK2P
2003-09-29 14:05:58
Identifier
State
0, 3,10, 8 online
ACSSA>
Drive Status
Status
Volume
in use
P22958
Type
T9940B
Beware that drive addresses for ACSLS are decimal, although for CERN
/etc/TPCONFIG and so on 10, 11 and 12 appear as hexdecimal A, B and
C. Commands where relevant should be indifferent to decimal or hexadecimal
notations .
Mount and dismount of VIDs on drives
If you are reasonably sure that a volume is not in use (see query above) and that a
suitable drive is available and reserved for the purpose
(use vdqm_admin or tpsrv_in_prod for this) you can mount a volume directly:
mount P12346 0,3,10,8
Subsequently you could manipulate the volume directly on the attached and
reserved tape server, tpsrev108 in this case. For example, to view the VOL1 and
HDR1 labels:
ssh -l root tpsrv108
mt -f /dev/nst0 status
mt -f /dev/nst0 rewind
dd if=/dev/nst0 ibs=80 count=2
mt -f /dev/nst0 rewoffl
dismount P12346 0,3,10,8
or
dismount P12346 0,3,10,8 force (if you cannot issue mt rewind and offline)
crontab tasks
Monitoring of library components and weekly reports of contents ('volrpt') and
ownership of volumes are performed by crontab tasks. These can be seen by
issuing crontab -l:
# START of ACSSS CRON entry.
00 00 * * * (/bin/sh; /export/home/ACSSS/install/timed_bkup.sh >
/export/home/ACSSS/log/cron_event.log 2>&1)
55 * * * * (/bin/sh; /export/home/ACSSS/install/full_disk.sh >
/export/home/ACSSS/log/cron_event.log 2>&1)
03,33 * * * * (/bin/sh; /export/home/ACSSS/hourly.sh >
/export/home/ACSSS/log/cron_event.log 2>&1)
05 00 * * 1 (/bin/sh; /export/home/ACSSS/monday.sh >
/export/home/ACSSS/log/cron_event.log 2>&1)
0,5,10,15,20,25,30,35,40,45,50,55 * * * * (/bin/sh;
/export/home/ACSSS/tvstatus4.sh > /export/home/ACSSS/log/cron_event.log
2>&1)
0 0 * * 0 (/bin/sh; /export/home/ACSSS/install/reset_dblog.sh >
/export/home/ACSSS/log/cron_event.log 2>&1)
# END of ACSSS CRON entry.
Changing the crontab list is done with 'crontab e', which seems to invoke the
dreadful 'ed' editor. See the man ed pages for details, but note that roughly
speaking 'ed' starts just stating the number of characters seen in the file and waits
for a command:
ed myfile
1,$p
2p
2d
2i
new line
ctrl-C
w
Prints line 2
Deletes line 2 (lines renumber now!)
Inserts new line at 2
give new line text
ends entry
Saves new version
In principle you can invoke the more tractable vi by issuing (before 'crontab -e'):
export EDITOR=vi
as the standard ACSLS user uses ksh. See man setenv on the Sun for more details.
vary commands
This command can be used to change the status of a library component or a drive.
Its form is for example:
vary CAP 0,1,0 offline vary CAP 0,1,0 online
This is useful, in fact, if the CAP does not lock or unlock correctly after an insert or
eject, shown by both the 'LOCK' and 'EJECT' lights being on at the same time. It
will normally reset the CAP to a working condition.
Cleaning cartridges
These cartridges are not handled quite like others. They are first inserted normally
in the CAP, with labels as follows (they should of course not exist already in the
library). You can look at the output of volrpt or alternatively:
query clean all (check existing cleaning cartridges)
VID
Media letter
CLNnnn
U
CLNnnn
W
CLNnnn
J
CLNnnn
CU
Type
9940A or 9940B
9840A
3590E
LTO 3, Hewlett Packard
Once inserted, you need to set the maximum cleaning count taking into accoount
any previous cleaning use (if need be, perhaps following an eject):
set clean 100 CLN901
view command completely missing!
Oddly, for silos equipped with 2 cameras each, there is no longer
any view command to allow for example:
view lsm 0,1 hand 0 volume P12345 10
is in lsm 0,1 for 10 seconds)
or
view hand 1 drive 0,3,8,1 25
seconds)
or
view hand 1 ptp 0,1 0,2 30
0,2 from 0,1 for 30 seconds)