1q04-dum

  • Upload
    hldeneb

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 8/9/2019 1q04-dum

    1/4

    POWER SOLUTIONS March 200476

    Remotely Managing UNIX and Linux Servers Using the

    Dell RAC Serial/Telnet ConsoleIntroduced in the 3.0 release of Dell remote access controller (RAC) firmware, the RAC

    serial/telnet console provides administrators with a standard serial console for remotely

    managing Dell PowerEdge servers running UNIX or Linux operating systems. The

    console offers system power management capabilities, preoperating system redirec-

    tion capabilities, and support for kernel-mode messaging.

    Dell remote access controllers (RACs) provide remote

    systems management capabilities on supported Dell

    PowerEdge servers. Although four types of RACs are

    availableDell Remote Access Card III (DRAC III),

    DRAC III/XT, Embedded Remote Access (ERA), and

    Embedded Remote Access Option (ERA/O)they share

    many of the same features and are supported by a common

    software stack, which is part of Dell OpenManage Server

    Administrator.

    One new feature introduced in the 3.0 release of

    RAC firmware is the RAC serial/telnet console, which

    provides administrators with a standard serial console

    for remote management of servers running UNIX or

    Linux operating systems. Dell has enhanced its stan-

    dard serial console with new functionality, none of

    which requires custom software to be installed or run-

    ning on the host:

    System power management to enable power up,power down, power cycle, or reset

    Redirection of preoperating system firmware suchas BIOS screens

    Support for kernel-mode messaging using SysRqmagic keys

    This article explains how the RAC serial/telnet con-

    sole is implemented, provides details on how to config-

    ure the console, and includes an example of how to set

    up the IT environment for optimal console performance.

    Understanding the functionality of the

    RAC serial/telnet console

    The RAC serial/telnet console provides a means by which

    administrators can access the ttyS1 serial console and

    video console of a UNIX or Linux host through either a

    serial connection (using a VT-100 or ANSI client) or a LAN-

    based Telnet connection. The RAC serial/telnet console pro-

    vides a rich set of commands for performing system power

    management tasks, configuring the RAC, and viewing RAC

    and system logs. The serial/telnet console uses the same

    set of commands as the Racadm command-line utility that

    originally was part of the RAC software stack. Therefore,

    administrators need not learn a new set of commands to

    use the RAC console.

    The RAC acts as a gate between its PowerEdge host

    system and the remote administrator, providing optimal

    console-redirection performance combined with user-

    level security. Depending on the hardware interfaces

    and support offered by its host, the RAC can provide

    S Y S TE M S M A N A G E M E N T

    B Y A U R E LI A N D U M I TR U

  • 8/9/2019 1q04-dum

    2/4

    access to the host console through a serial connection to the RAC,

    a Telnet connection, or both. For example, provided that the

    RAC is properly configured, the Dell PowerEdge 2650 server offers

    connectivity using either a VT-100 or ANSI serial client or a LAN-

    based telnet client.

    As shown in Figure 1, the RAC hardware features two serial inter-

    faces (RAC serial 1 and RAC serial 2) and one video interface

    (RAC video interface). The RAC serial 1 interface is used for host-

    to-RAC serial communication; the RAC serial 2 interface is used for

    RAC-to-client communication. Thus, administrators must properly

    set up two baud rates (baud_rate_1 and baud_rate_2) to gain remote

    access to the serial console on the host. Baud_rate_1 in the RAC

    configuration must be in sync with the Linux ttyS1 baud rate.

    Baud_rate_2 must be in sync with the baud rate of the VT-100 or

    ANSI client. Any mismatch between these values will make the

    RAC serial/telnet console unusable. Note that baud_rate_1 andbaud_rate_2 are not necessarily set to the same value.

    For optimal performance, Dell recommends setting baud_rate_1

    to 57,600 bps and baud_rate_2 to 115,200 bps, as well as enabling

    hardware flow control for the host. RAC relies on hardware flow

    control to avoid dropped characters during serial communication;

    flow control enables the host to respond to Request To Send/Clear

    To Send (RTS/CTS) signals.

    Regardless of whether a serial or Telnet connection is established

    with the RAC, the console will present the user with a login prompt.

    The login is authenticated against the RAC user database, which

    resides on the RAC. Because the authentication is RAC-based, not

    host-based, administrators can log in to the RAC console even on

    a dead server, provided that the server has power. Once authenti-

    cated, the administrator connects to the serial console using the

    connect com2 command, or to the video console of the host using

    the connect video command.

    To maintain security, all users are not granted all privileges.

    All administrators should be able to access the serial and video

    consoles of the host. However, only the root user can power up

    the system or configure the RACfor instance, to change a baud

    rate. In addition, the root users password and location within the

    RAC user database can be changed.

    Configuring the RAC serial/telnet console

    To set up the RAC serial/telnet console, the following RAC configu-

    ration parameters need to be modified in the following sequence:

    1. Upgrade the RAC firmware to version 3.0.

    2. Upgrade the host system BIOS to the latest version available,

    or check to make sure that the current system BIOS supports

    the RAC serial/telnet console.

    3. Configure and enable the RAC serial/telnet console by saving

    the following sample RAC configuration in a text file (for

    instance, rac.cfg) and then applying the configuration using

    the Racadm interface:

    #

    # Object Group "cfgSerial"

    #

    [cfgSerial]

    cfgSerialBaudRate=115200

    cfgSerialConsoleEnable=1

    cfgSerialConsoleQuitKey=,./

    cfgSerialTelnetEnable=1

    #

    # Object Group "cfgRacTuning"

    #

    [cfgRacTuning]

    cfgRacTuneHostCom2BaudRate=57600

    The preceding sample configuration file will:

    Enable the RAC serial console

    Enable the RAC telnet console

    Set the RAC-to-client baud rate to 115,200 bps

    Set the host-to-RAC baud rate to 57,600 bps

    Set the console quit key sequencewhich allows theadministrator to exit the host ttyS1 serial console or

    video console redirection and go back to the RAC

    serial/telnet consoleto ,./ (comma dot slash)

    In the sample configuration file, the names in square brackets

    are the groups into which the various configuration parameters

    SYSTEMS MANAGEMENT

    www.dell.com/powersolutions POWER SOLUTIONS 77

    Telnet clientVT-100 client

    Host serialinterface

    RAC serial 1(baud_rate_1)

    RAC firmware

    RAC serial 2(baud_rate_2)

    RAC videointerface

    RAC networkinterface

    card (NIC)

    Host videointerface

    COM2 RS-232circuitry and

    DB-9 connector RAC

    Null modem cable LAN

    Figure 1. RAC serial/telnet console configuration on PowerEdge 2650 server

  • 8/9/2019 1q04-dum

    3/4

    are organized. Refer to theDell Remote Access Controller

    Racadm Users Guide for additional information on RACconfiguration parameters.

    4. Use the following racadm command to apply these changes:

    racadm remote connect options config f

    config filename

    where remote connect options is -r rac_ip_addr

    -u root p passwordand config filename is the name of

    the configuration file (for instance, rac.cfg). The remote

    connect options variable is needed only for executing

    Racadm remotely, for example when configuring a remote

    RAC from a management station over a LAN. From the

    RACs host console, administrators need not use this vari-

    able because Racadm can communicate directly with the

    RAC that exists in that system.

    5. Reset the RAC using the following command to make the

    changes effective:

    racadm remote connect options racreset

    6. Reboot the RAC host, enter the BIOS configuration page,

    and select Integrated Devices. On the PowerEdge 2650,

    verify that Serial Port 2 is set to COM2. On the

    PowerEdge 1750, verify that Serial Port 1 is set to Off.

    7. Select Console Redirection from the main BIOS configu-

    ration page. The three settings should be configured as

    follows for the PowerEdge 2650 server:

    Console Redirection: Serial Port 2

    Remote Terminal Type: VT-100

    Redirection After Boot: Enabled

    For the PowerEdge 1750 server, the administrator must

    choose RAC instead of Serial Port 2.

    8. Save the changes and reboot the system. The system reboot

    is important because it allows the RAC and the BIOS to syn-

    chronize their communication parameters. Depending on the

    specific configuration of a system, the RAC may not redirect

    BIOS screens if the BIOS and the RAC do not sync up.

    Because the BIOS and the RAC synchronize when the system

    boots, at least one system boot needs to occur after the

    administrator enables and configures the RAC serial/telnet

    console. No additional reboots are required thereafter.

    9. After both the RAC and the BIOS are in sync, at least three

    Linux files must be changed to enable ttyS1 serial console

    redirection: /etc/grub.conf or /etc/lilo.conf (depending on

    the bootloader used), /etc/inittab, and /etc/securetty. How-

    ever, none of these changes is required if only access to the

    host video console is needed. Required modifications to the

    three files are shaded in Figures 2, 3, and 4.

    Note: In Figure 2, the Linux host baud rate is set to

    57,600 bps in the /etc/grub.conf or /etc/lilo.conf file,

    which is in sync with the host-to-RAC baud rate set in

    the sample RAC configuration text file (rac.cfg) in the

    SYSTEMS MANAGEMENT

    POWER SOLUTIONS March 200478

    serial --unit=1 --speed=57600

    terminal --timeout=10 console serial

    title Red Hat Linux Advanced Server (2.4.9-e.3smp)

    root (hd0,0)kernel /boot/vmlinuz-2.4.9-e.3smp ro root=/dev/sda1 hda=ide-scsi console=tty0 console=ttyS1,57600

    initrd /boot/initrd-2.4.9-e.3smp.img

    title Red Hat Linux Advanced Server-up (2.4.9-e.3)

    root (hd0,0)

    kernel /boot/vmlinuz-2.4.9-e.3 ro root=/dev/sda1 s

    initrd /boot/initrd-2.4.9-e.3.im

    # Run gettys in standard runlevels

    co:2345:respawn:/sbin/agetty h -L 57600 ttyS1 vt100

    1:2345:respawn:/sbin/mingetty tty1

    2:2345:respawn:/sbin/mingetty tty2

    3:2345:respawn:/sbin/mingetty tty3

    4:2345:respawn:/sbin/mingetty tty4

    5:2345:respawn:/sbin/mingetty tty5

    6:2345:respawn:/sbin/mingetty tty6

    Figure 2. Modifications to /etc/grub.conf to enable ttyS1 serial console redirection

    Figure 3. Modifications to /etc/inittab to enable ttyS1 serial console redirection

  • 8/9/2019 1q04-dum

    4/4

    previous example. The same host-to-RAC baud rate of

    57,600 bps is used when invoking the agetty command

    (see Figure 3). Nevertheless, the h flag, when present on

    the same line, forces agetty to use hardware flow controlfor the communication. As explained in Understanding

    the functionality of the RAC serial/telnet console, the

    RAC relies on hardware flow control for reliable serial

    communication with its host.

    10. After modifying the files, restart agetty or reboot the RAC

    host to complete the configuration process. The RAC is now

    ready to redirect its host serial console.

    Optimizing the IT environment for serial/telnet console performance

    Depending on the IT environment and the hardware capabili-

    ties of the RAC host, administrators may choose to use either

    a serial connection or a Telnet connection to the RAC. Many

    organizations use serial concentrators, or terminal servers, to

    consolidate multiple serial connections. Unfortunately, not all

    serial concentrators are alike: they vary with respect to

    configuration parameters, configuration interface, and wiring.

    Most serial concentrators use an RJ-45toDB-9 adapter. For

    connection schematics for two adapters that can be used to

    connect a RAC to a Cisco 2511 serial concentrator, visit Dell

    Power Solutions online at http://www.dell.com/magazines_extras.

    Regardless of whether a serial or Telnet connection is used,

    administrators must first log in to the RAC prompt to view

    RAC system logs, then redirect either ttyS1 serial consoles or

    video consoles, andif logged in as rootconfigure the RAC or

    reboot the system. Some organizations also use SysRq magic

    keys to capture kernel-level status information as part of the

    IT support process.

    The RAC serial/telnet console supports SysRq functionality,

    although the methodology is slightly different for a remote con-

    nection than for a local console. At the local console, the adminis-

    trator normally would press the Alt + SysRq + magic_key sequence

    to get the expected SysRq output. If using the remote connection, the

    administrator enters the send break command on the serial or

    telnet client and then presses one of the SysRq magic keys. This

    SysRq functionality will work only when redirecting ttyS1; it will

    not be present if the administrator connects to the remote con-

    sole and then redirects the hosts video console. To gain access to

    ttyS1, administrators must use the connect com2 command in the

    RAC console.

    For example, an administrator may want to collect as much

    information as possible to assist with a problem diagnosis and

    to store this information in a file. Generally the problems encoun-

    tered can be divided into two areas: an unresponsive system or

    a system that has crashed. In either case, the administrator may

    need to connect to the RAC and then access the host ttyS1 serial

    console or video console. If the system appears to be hung, the

    administrator probably requires output from the b, m, p,

    and t SysRq magic keys. Once that information is gathered, theRAC can be used remotely to restart the server, after which the

    administrator can examine the boot screens for further clues. If

    the system appears to have crashed, then the best approach may

    be to examine the RAC system logs. Depending on the state of

    the system, the administrator may choose to use the RAC to

    restart the server.

    Enabling server recovery and configuration management

    through RAC

    The RAC serial/telnet console can be a valuable remote management

    tool for IT administrators. Besides supporting industry-wide systems

    management practices, the RAC serial/telnet console is enhanced with

    features that allow for server recovery, system configuration man-

    agement, and RAC configuration management. The RAC serial/telnet

    console is software-independent and helps administrators interact

    smoothly with the RAC host.

    Aurelian Dumitru ([email protected]) is a senior software engineer with the Custom

    Solutions Engineering team at Dell, where he works to deploy and customize systems man-

    agement for medium to large enterprises. Before joining the Custom Solutions Engineering

    team, he held the lead engineer position for the Remote Management Delivery team.

    Aurelian has 12 years of experience in hardware, software, and system design and integra-

    tion. He has an M.S.E.E. degree from the Technical University of Iasi, Romania.

    SYSTEMS MANAGEMENT

    www.dell.com/powersolutions POWER SOLUTIONS 79

    Figure 4. Modifications to /etc/securetty to enable ttyS1 serial console redirection

    .

    .

    .

    tty8

    tty9

    tty10

    tty11

    ttyS1

    F O R M O R E I N F O R M A T I O N

    Dell Remote Access Controller Racadm Users Guide :

    http://docs.us.dell.com/docs/software/smdrac3/RAC/en/index.htm

    Remote serial console how-to:

    http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html