• No results found

Checking for Errors

In document Exadata (Page 36-42)

Let’s see a practical use of the named attributes clause. From time to time you will see errors popping up on disk drives, which may have to be replaced. To show the error related attributes, you may choose a script to select only a few attributes related to errors, as shown below:

CellCLI> list physicaldisk attributes

There is no error on any of these disks; so you see those fields remaining unpopulated.

Filtering

What if you are interested in only a certain type of disk, or filter on some attribute? You can use the SQL-esque predicate WHERE clause. Here you want to see some attributes for all hard disks.

CellCLI> list physicaldisk attributes name, physicalInterface, physicalInsertTime

-> where disktype = 'HardDisk'

34:6 sas 2011-01-21T14:33:06-05:00

If you want to change the way the date and time are displayed, you can set the dateformat environmental variable.

CellCLI> set dateformat local

Date format was set: Apr 1, 2011 4:05:54 PM.

CellCLI> list physicaldisk attributes name, physicalInterface, physicalInsertTime

-> where disktype = 'HardDisk'

34:0 sas Jan 21, 2011 2:32:35 PM 34:1 sas Jan 21, 2011 2:32:40 PM

… output truncated …

Filtering can also be specified with negation, i.e. !=.

CellCLI> list physicaldisk where diskType='Flashdisk' [1:0:0:0] 5080020000f21a2FMOD0 normal

Now that you know how to display the objects, let’s see how you can modify the properties. The properties of the physical disks are not modifiable, except one: the display of service LED. You can turn on or off the service LED of disks 34:0 and 34:1 by issuing the following commands.

CellCLI> alter physicaldisk 34:0,34:1 serviceled on CellCLI> alter physicaldisk 34:0,34:1 serviceled off

To turn service LED on all the hard disks of that cell, use the following command:

CellCLI> alter physicaldisk harddisk serviceled on On all disks (hard disks and flash disks):

CellCLI> alter physicaldisk all serviceled on

Creation

There is no creation operation of physical disks because they come with the Exadata machine.

Deletion

There is no deletion operation of physical disks either because they have to be removed by an engineer.

Managing LUN

From the earlier installments you learned that the physical disks are carved up into LUNs. Let’s see the common LUN management commands. To show the LUNs in this cell, you use the following command:

CellCLI> list lun

0_0 0_0 normal 0_1 0_1 normal 0_2 0_2 normal

… output truncated …

As in the case of physical disks, you can also display the details of these LUNs by the following command:

CellCLI> list lun detail

If you want the details for one specific LUN, use its name as the modifier.

CellCLI> list lun 0_0 detail

Like the previous cases you can show the LUNs in a tabular format by selecting all the attributes as well:

CellCLI> list lun attributes all

If you want to see the available attributes of a LUN, use the describe command.

CellCLI> describe LUN

You can use any of these attributes instead of “all”.

CellCLI> list lun attributes name, cellDisk, raidLevel, status 0_0 CD_00_prolcel14 0 normal

0_1 CD_01_prolcel14 0 normal 0_2 CD_02_prolcel14 0 normal

… output truncated …

Modification

The properties of a LUN are not modifiable, except one. The LUNs are re-enabled after a failure. If one is not automatically re-enabled after the failure is corrected, you can manually re-enable it by the following command:

CEllCLI> alter lun 0_0 reenable

Sometimes the LUN may be already enabled but may not be shown as such. To resync this reality with the system, you may need to enable it forceably. The force modifier allows that.

CEllCLI> alter lun 0_0 reenable force

Deletion

There is no delete operation for LUNs in the CellCLI.

Creation

Similarly you don’t create LUNs in CellCLI so there is no create lun command.

Managing Cells

From the previous installments you learned that storage cells, also called simply cells, are where the disks are located and they are presented to the database nodes. A full rack of Exadata contains fourteen such cells. To display the information on cells, you give the list cell command.

CellCLI> list cell

Cell01 online

The output does not say much except the name of the cell and if it is online. To display more information, use the detail modifier.

status: online

You will understand the meaning of all these attributes as you explore the cell modifications later in this

section.To display the output in a tabular format in one line, as you saw in the case of the physical disks, use the attribute modifier:

[email protected],[email protected],[email protected] FALSE online 25.0 normal 32 days, 21:52 running running running

The output comes as one line containing all the attributes. Of course, you can use specific attributes as you did in other cases. To see all the available attributes, use the previously explained describe command.

CellCLI> describe cell

smtpPort modifiable

The word modifiable above means that specific attribute can be modified by an ALTER verb. It’s not possible to give all the possible combinations in this short article and not all are used often anyway; so, let’s see the most common ones.

A cell runs muliple services, e.g. the Restart Server, the Management Server and Cell Services. To shut down a cell, you can shut down specific services by name or the entire service. To shutdown only one service, e.g. the Restart Server service, execute:

CellCLI> alter cell shutdown services rs Stopping RS services...

The SHUTDOWN of RS services was successful.

To restart that particular service, use the restart modifier, shown below:

CellCLI> alter cell restart services rs

At any point you can confirm it by checking the status:

CellCLI> list cell attributes rsStatus

What if you want to shutdown the entire cell? The “all” modifier is a shotcut to shutdown all the services:

CellCLI> alter cell shutdown services all Stopping the RS, CELLSRV, and MS services...

The SHUTDOWN of services was successful.

To restart all the services, execute the following command:

CellCLI> alter cell restart services all

Starting MS services...

The STARTUP of MS services was successful.

To turn on or off the LED on the chassis of the cell, execute:

CellCLI> alter cell led on CellCLI> alter cell led off

In document Exadata (Page 36-42)

Related documents