Task | Required Privilege Class |
---|---|
Start, halt, and restart the server | System or operator |
To start the server, complete the following steps:
Enter:
cd /usr/lpp/adsmserv/bin
Enter:
dsmserv
Note: | If the server does not start, set the ulimit parameter to unlimited.
For example,
ulimit -d unlimited |
ADSM displays the following information when the server is started:
The following events occur when the server is started:
You may choose to run the server in the background. When the server runs in the background, you control the server through your administrative client.
Attention: | Before you run the server in the background, ensure the following
conditions exist:
If you do not follow these steps, you cannot control the server. When this occurs, you can only stop the server by canceling the process, using the process number displayed at startup. You may not be able to take down the server cleanly without this process number. |
To start the server running in the background, enter the following:
nohup dsmserv -quiet &
You can check your directory for the output created in the nohup.out file to determine if the server has started.
You can capture ADSM server console messages to a user log file with the ADSM dsmulog utility. You can invoke the utility with the ADSMSTART shell script which is provided as part of the ADSM AIX server package. You can have the server messages written to one or more user log files. When the dsmulog utility detects that the server it is capturing messages from is stopped or halted, it closes the current log file and ends its processing.
When you specify more than one file, ADSM manages the user logs as a circular list of files based on size or change of day. You can manage the amount of space the logs used in the file system by specifying a size parameter (in kilobytes) in the ADSMSTART shell script for the dsmulog utility. When the specified limit is reached, ADSM closes the current user log and opens the next user log. When the specified limit is reached on the next user log, ADSM writes to the next user log and can overwrite the previous contents of the file. If a size parameter is not specified, the utility writes to the next user log file when it detects a change of day.
If the user log file names are not fully qualified in the ADSMSTART shell script, the user logs are created in the directory where ADSMSTART is invoked. The user logs should not be placed in the /usr/lpp file system because space constraints in the file system can prevent the ADSM server from starting.
The following is an example of how to set up and invoke the dsmulog utility to rotate through the user logs on a daily basis:
cd /usr/lpp/adsmserv/bin
cp adsmstart.smp ./adsmstart
dsmulog /u/admin/log1 /u/admin/log2 /u/admin/log3
The following steps automatically start the server with console logging when the system is rebooted:
In the above example, if you invoke the utility on Friday, on Friday the server messages are captured to log1, on Saturday the messages are captured to log2, on Sunday the messages are captured to log3. On Monday the messages are captured to log1 and the previous Friday messages are overwritten.
The following example shows how to invoke the dsmulog utility to rotate through the user logs based on size limit:
dsmulog /u/admin/log1 /u/admin/log2 /u/admin/log3 size=500
When the server is started, the utility captures the server messages to log1 until it reaches a file size of 500 kilobytes and then changes to log2.
Tip: If the ADSM server goes down unexpectedly, copy the current user logs to other file names before you restart the server. This will prevent the dsmulog utility from overwriting the current logs. You can then view the user logs to try and determine the cause of the unavailability of the server.
To log console messages during the current session, do the following:
/usr/lpp/adsmserv/bin/dsmserv 2>&1 | dsmulog /u/admin/log1 /u/admin/log2
To stop console logging and have the server automatically start after a system reboot, complete the following steps:
cd /usr/lpp/adsmserv/bin
The following ADSM command options specify how you can start the server in other modes as part of the dsmserv command. For example:
dsmserv -option
Where -option can be any one of the following:
Note: | Before issuing this command, you must have an administrative client registered and authorized with system authority. The administrative client must be started. Otherwise, the server will run in the quiet mode and you will not be able to access the server. |
To have multiple servers running on a single machine, issue the DSMSERV FORMAT command from different directories to create multiple pairs of recovery log and database files. You do not have to install the server executable files in more than one directory.
However, if non-root users will be running servers, you must modify the access permission by adding read permission to the following files:
Use these commands as a root user to modify the permission for these files:
chmod 755 /usr/lpp/adsmserv/bin/adsmlicense chmod 755 /usr/lpp/adsmserv/bin/dsmnetb1.drv chmod 755 /usr/lpp/adsmserv/bin/dsmnetb2.drv chmod 755 /usr/lpp/adsmserv/bin/dsmtli.drv
The following procedure shows how to set up an additional ADSM server:
mkdir /usr/lpp/myserver
cp /usr/lpp/adsmserv/bin/dsmserv.opt dsmserv.opt /usr/lpp/myserver/dsmserv.opt
Note: | Ensure that the communication parameters are unique from all other ADSM
server. The communication protocols are:
For example, if your first server is using the default TCPport of 1500, ensure that the new server is using a TCPport other than 1500 by providing a real value in the server options file. |
To define the DSMSERV_DIR, enter:
export DSMSERV_DIR=/usr/lpp/adsmserv/bin
Ensure that you are in the target directory before continuing.
/usr/lpp/adsmserv/bin/dsmfmt -m -db dbvol2 5 /usr/lpp/adsmserv/bin/dsmfmt -m -log logvol2 9
In this example, db indicates the database log, --m indicates megabytes and log indicates the recovery log. Refer to ADSM Administrator's Reference for more information on these commands.
/usr/lpp/adsmserv/bin/dsmserv format 1 logvol2 1 dbvol2
Note: | You need additional license authorizations to run additional servers. You can use the register license file command to register these licenses. |
You can halt the server without warning if an unplanned operating system problem requires the server to be stopped.
When you halt the server, all processes are abruptly stopped and client sessions are canceled, even if they are not completed. Any in-progress transactions are rolled back when the server is restarted. When the server is halted, administrator activity is not possible.
If possible, halt the server only after current administrative and client node sessions have completed or canceled. To shut down the server without severely impacting administrative and client node activity with the server, you must:
Note: | The QUIESCE option on the HALT command is recommended only if you plan to do a database dump by using the DSMSERV DUMPDB command immediately after halting. Because ADSM supports online database backup (BACKUP DB command), the DSMSERV DUMPDB command should be rarely, if ever, needed. |
If you started the server as a background process and want to stop the server, connect to the server as an administrative client and issue the HALT command. If you cannot connect to the server with an administrative client and you want to stop the server, you must cancel the process by using the kill command with the process ID number (pid) that is displayed at initialization.
Note: | Before you issue the kill command, ensure that you know the correct process ID for the ADSM server. |
To start the server after it has been halted, follow the instructions in "Starting the Server".
When you restart the server after it has been halted, ADSM rolls back any operations that had been in process to ensure that the database remains in a consistent state.