C H A P T E R 4 |
This chapter describes how to use the hd utility, also known as hdtool on Linux. The hd utility is a hard drive mapping tool used to determine the logical-to-physical device mapping and can be used on the Sun Fire X4500/X4540 servers.
You can install the utility from the Tools and Drivers CD, if available. The hd utility is also available on the server product download page and resides in the Tools and Drivers CD in the /solaris/tools/hdtool/ directory
You can install the utility from the Tools and Drivers CD, if available, or from your product Tools and Drivers CD image, downloadable from the product web page.
The Linux version of the hd utility resides in the /linux/tools/hdtool/ directory.
Tip - On the Sun Fire X4500/X4540 servers, the hd utility is included in the SUNWhd package preinstalled in /opt/SUNWhd/hd/bin/hd. |
Once you have downloaded hd, from a command line, go to its directory and type:
You use the utility to get a logical-to-physical mapping of the devices. This mapping can help you to administer the system, manage the hard drives, and troubleshoot the server.
The hd utility works with existing Linux disk maintenance, configuration, and administration commands like cfgdisk.
The hd utility provides a color-coded hard drive location map. It has the following functions:
To use hd utility you must have the hd package installed. For additional commands related to hd, see the following man pages for additional commands: cfgdisk, hd,and hdadm.
You can use the drive mapping output from hd utility for remote analysis. The utility probes and displays the available storage devices in the system.
The hd utility output makes the distinction between controllers, slots, and storage devices that are physically present in the machine and visible to Linux.
This chapter includes the following sections:
The hd utility maps the disks and produces output that can help you to identify empty slots and drives that have not been enumerated.
The following command displays a map of the disk drives.
# hd |
For example, here is output for the Sun Fire X4500 server that includes a list of drives, format and vendor, followed by a mapping table.
% hd platform = SUN FIRE X4500 sdaa ATA HITACHI HDS7250 K2AO sdab ATA HITACHI HDS7250 K2AO sdac ATA HITACHI HDS7250 K2AO sdad ATA HITACHI HDS7250 K2AO sda ATA HITACHI HDS7250 K2AO sdae ATA HITACHI HDS7250 K2AO sdaf ATA HITACHI HDS7250 K2AO sdag ATA HITACHI HDS7250 K2AO sdah ATA HITACHI HDS7250 K2AO sdai ATA HITACHI HDS7250 K2AO sdaj ATA HITACHI HDS7250 K2AO sdak ATA HITACHI HDS7250 K2AO sdal ATA HITACHI HDS7250 K2AO sdam ATA HITACHI HDS7250 K2AO sdan ATA HITACHI HDS7250 K2AO sdao ATA HITACHI HDS7250 K2AO sdap ATA HITACHI HDS7250 K2AO sdaq ATA HITACHI HDS7250 K2AO sdar ATA HITACHI HDS7250 K2AO sdas ATA HITACHI HDS7250 K2AO sdat ATA HITACHI HDS7250 K2AO sdau ATA HITACHI HDS7250 K2AO sdav ATA HITACHI HDS7250 K2AO sdb ATA HITACHI HDS7250 K2AO sdc ATA HITACHI HDS7250 K2AO sdd ATA HITACHI HDS7250 K2AO sde ATA HITACHI HDS7250 K2AO sdf ATA HITACHI HDS7250 K2AO sdg ATA HITACHI HDS7250 K2AO sdh ATA HITACHI HDS7250 K2AO sdi ATA HITACHI HDS7250 K2AO sdj ATA HITACHI HDS7250 K2AO sdk ATA HITACHI HDS7250 K2AO sdl ATA HITACHI HDS7250 K2AO sdm ATA HITACHI HDS7250 K2AO sdn ATA HITACHI HDS7250 K2AO sdo ATA HITACHI HDS7250 K2AO sdp ATA HITACHI HDS7250 K2AO sdq ATA HITACHI HDS7250 K2AO sdr ATA HITACHI HDS7250 K2AO sds ATA HITACHI HDS7250 K2AO sdt ATA HITACHI HDS7250 K2AO sdu ATA HITACHI HDS7250 K2AO sdv ATA HITACHI HDS7250 K2AO sdw ATA HITACHI HDS7250 K2AO sdx ATA HITACHI HDS7250 K2AO sdy ATA HITACHI HDS7250 K2AO sdz ATA HITACHI HDS7250 K2AO |
The following command displays a map of the disk drives:
# hdadm display |
Here is an example of using the hdadm command to display the hard drive’s physical slot number, logical name, and status:
# hdadm display ------------------------Sun Fire X4500 Server--------Rear----------- 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: sdab sdaf sdt sdx sdar sdav sdaj sdan sdl sdp sdd sdh ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: sdaa sdae sds sdw sdaq sdau sdai sdam sdk sdo sdc sdg ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: sdz sdad sdr sdv sdap sdat sdah sdal sdj sdn sdb sdf ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: sdy sdac sdq sdu sdao sdas sdag sdak sdi sdm sda sde ^b+ ^b+ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ ^++ -------*-----------*----Sun Fire X4500 Server----*---Front-----*---- |
The Sun Fire X4500/X4540 server comes with six controllers, each supporting up to eight SATA drives, for a total of 48 SATA drives. Before you reinstall the Linux OS, you need to determine the logical device name that corresponds to the two bootable disks, which is in the form:
Where sdX is the SCSI disk name.
A Sun Fire X4500/X4540 server with 48 disks is the only supported configuration. For the Sun Fire X4500 server, the boot device nodes are in:
For the Sun Fire X4540 server, the boot device notes are in:
These are the bootable disks, and the operating system must be installed on one of these device nodes.
Use the hd command parameters to determine the status of a hard drive. The command parameters and the information they display are shown in TABLE 4-1.The hd output can also help you identify the empty slots and drives that have not been recognized by the Linux operating system.
Use the hd command parameters to determine the status of a hard drive. The command parameters and the information they display are shown in TABLE 4-1.
The following command displays the drive’s physical slot number, logical name, and status (present or absent) in sequential order.
Here is sample output for the Sun Fire X4500 server:
Physical Slot Number Name Status 0 sdy present 1 sdac present 2 sdq present 3 sdu present 4 sdao present 5 sdas present 6 sdag present 7 sdak present 8 sdi present 9 sdm present 10 sda present 11 sde present 12 sdz present 13 sdad present 14 sdr present 15 sdv present 16 sdap present 17 sdat present 18 sdah present 19 sdal present 20 sdj present 21 sdn present 22 sdb present 23 sdf present 24 sdaa present 25 sdae present 26 sds present 27 sdw present 28 sdaq present 29 sdau present 30 sdai present 31 sdam present 32 sdk present 33 sdo present 34 sdc present 35 sdg present 36 sdab present 37 sdaf present 38 sdt present 39 sdx present 40 sdar present 41 sdav present 42 sdaj present 43 sdan present 44 sdl present 45 sdp present 46 sdd present 47 sdh present |
The following command displays utility help.
# hd -h # hd -h Usage: hd [ -c(olor mode) ] [ -s(ummary) ] [ -B (list Bootable slot number, devname with present/absent status) ] [ -q (list drive slot number in seQuential list) ] [ -r (List SMART data for all disks in drive slot number for x4540) ] [ -R (List SMART data’s indivdual id in landscape view for all disks) ] [ -e <sdXY> (List SMART data for specified disk) for x4540 ] [ -E <sdXY> (List raw hex SMART data for specified disk) for x4540 ] [ -j (list x4500/x4540 controller number) ] [ -o (list x4540 ( HBA/Target sdname sysfs ) ] [ -x (Generate hd_map.html) ] |
The hdadm command is a hard drive management tool for the x64 systems, such as the Sun Fire X4500 server. This command supports drive hot-plugging features and assists with configuring disk drives before they are inserted or removed.
Additionally, the hdadm command consist of subcommands that allows you to configure hard disk drives using the disk logical name or physical slot number.
The hdadm subcommands allows the system administrator to choose command combinations to configure disks online or offline. The hdadm command along with the hd and cfgdisk commands provides a full range of tools to configure and manage their Sun Fire X4500/X4540 server disk drives.
This section contains examples of common hdadm commands. For more information and options, refer to the hdadm man page.
This chapter includes the following sections:
For example, to take a drive offline in slot 11 by its physical slot number, perform the following steps:
For example, to take a disk drive in slot 11 online by using its physical slot number, perform the following steps:For example, to take a disk drive in slot 11 online by using its physical slot number, perform the following steps:
Copyright © 2010, Oracle and/or its affiliates. All rights reserved.