This document provides the procedures needed to stop archiving and/or staging activity.

Step 1. Idle the archive and stage process

# samcmd aridle

# samcmd stidle

Confirm the processes are idle

# samcmd a

Archiver status samcmd     4.6.85 09:47:29 Apr  5 2010
samcmd on s4v-t2000c-brm03

sam-archiverd:  Waiting for :arrun

sam-arfind:  samfs1  mounted at /sam1
Waiting for :arrun

# samcmd n

Staging status samcmd     4.6.85 09:47:32 Apr  5 2010
samcmd on s4v-t2000c-brm03

Log output to: /var/adm/stager.log

Waiting for :strun

Step 2. Make sure there are no tapes in any of the tape drives.

 samcmd r

Removable media samcmd     4.6.85 10:00:16 Apr  5 2010
samcmd on s4v-t2000c-brm03

Removable media status: all
ty   eq  status      act  use  state    vsn
li  301  --l------r    0   0%  ready    000019
       idle
li  302  ---------p    0   0%  notrdy
       empty

Unload the tape drives

# samcmd unload 301

# samcmd r

Removable media samcmd     4.6.85 10:00:30 Apr  5 2010
samcmd on s4v-t2000c-brm03

Removable media status: all
ty   eq  status      act  use  state    vsn
li  301  --l-UR-o-r    0   0%  ready    000019
       Rewinding|01 00 00 00 00 00
li  302  ---------p    0   0%  notrdy
       empty

# samcmd r

Removable media samcmd     4.6.85 10:01:13 Apr  5 2010
samcmd on s4v-t2000c-brm03

Removable media status: all
ty   eq  status      act  use  state    vsn
li  301  ---------p    0   0%  notrdy
       drive cleared
li  302  ---------p    0   0%  notrdy
       empty 

Step 3. Once the above procedures are complete run the following command:

# samd stop

The samd stop command stops the sam-amld process. The result of sam-amld stopping is all the processes related to communicating with the tape library are stopped. The archive and stage processes continue to show in the ps/ptree output

Example of ptree output before samd stop

# ptree 1650
1650  /usr/lib/fs/samfs/sam-fsd
 14007 sam-amld
   14008 sam-catserverd 2 3
   14009 sam-scannerd 2 3
   14010 sam-robotsd 2 3
     14011 sam-genericd 2 3 300
 14023 sam-archiverd
   14026 sam-arfind samfs1
 14024 sam-stagealld
 14025 sam-stagerd

Example of ptree output after samd stop

# samd stop

# ptree 1650
1650  /usr/lib/fs/samfs/sam-fsd
 14023 sam-archiverd
   14026 sam-arfind samfs1
 14024 sam-stagealld
 14025 sam-stagerd

Once the above steps are done, proceed with any maintenance needed for the tape library. This would include clearing a tape that is stuck in the tape drive. The above should also be done if restarting the processes or updating a configuration file.

To start up the process run the following:

# samd config

# samd start


If you just need to restart the archiver run the following command

# samcmd arrestart

Note:

The above should be run after the archiver.cmd file has been changed. Running the samcmd arrestart command will rebuild all the archreq and apply the updated changes in the archiver.cmd file to the new archreqs.