Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Sunday, 26 June 2011

AIX- Device Management

AIX- Device Management

In this device management, we can do following things.

1. Make/Add a Device
2. Change Device
3. List Device
4. Remove Device
5. List Device properties
6. List Device configuration


1. Make/Add a Device

We want to install new device in server, this case we should run following command
Suppose we want to install new Hard disk

#smitty mkdev (not recommended)

After executing the above command, one sort will come; in this sort we should fill some details about hard disk drive, such as model, make, capacity, etc.

The above command is not recommended because first we should know all the details about HDD, so instead of that we can use cfgmgr command.

When we run the cfgmgr command it will detect all the newly installed devices,

First you connect hard disk and run the cfgmgr command it will detect the hdd.

#cfgmgr (It will detect the all the devices)

#cfgmgr scsi0

Directly you want to detect hard disk then directly u should check the hdd parent device scsi0

When you run the above command it will detect only Scsi0 devices i.e. HDD, Cdrom, and Tape.

Like this we can configure newly installed devices.


2. Change Device

Suppose we want to change device configuration, this case we should run following command.

We want to change PVID (Physical volume ID) for Hdd

#chdev –l hdisk0 –a pv=clear (To clear the PVID)
#chdev –l hdisk0 –a pv=yes (To assign the PVID)

Whenever we installing the new hdd, system will generate some Identification number for hdd, we can change this PVID using chdev commands

Like this we can change duplex mode for network card and block size for tape media.

#chdev –l inet0 –a hostname=si (To change the host name for inet0)

#chdev –l rmt0 –a block_size=512 (To Change tape drive block_size is 512 blocks)

#chdev –l ent0 –a media_speed=100_full_duplex (To Change Ethernet card duplex speed)



3. List Device

Suppose we want to list device configuration details, this case se should run following command.

Whenever we list the device information that information is listed from ODM because ODM is storing the device information.

#lsdev –C (To list the Customized device configuration information from ODM)
#lsdev – P (To list the Predefined device configuration information from ODM)

The above commands list the object class device information; it will list all the device information.



Suppose we want to see particular device (object) information,

#lsdev –Cc disk
#lsdev –Cc processor
#lsdev –Cc adapter
#lsdev –Cc memory

C – Customized (object class)
c – for device (object)

If any confusion please refer the ODM notes


4. Remove Device

Suppose you want to remove device from server. Suppose it is one HDD.

First you have removed the HDD from server. Then you checking device configuration details using

#lsdev –Cc disk

Or

#odmget CuDv

It will show the device status

There is two options is available in device removal

#rmdev –dl hdisk5

The above command is used to remove hdisk5 device from ODM (complete removal from OS)

After executing the above command this hdisk5 configuration is not available in ODM

#odmget CuDv | grep hdisk5

It wont display anything because device configuration is removed from ODM

Suppose you want to remove device from the server not from ODM
This case you should use the following command.

#rmdev –l hdisk5

The above command is used to remove hdisk5 device from server, this device configuration is available in ODM (not from OS)

After executing the above command this hdisk5 configuration is available in ODM and device status is defined

#odmget CuDv | grep hdisk5

It will show Hdisk5 configuration details but device status is 0


If you want install hdisk5 device again, you should run the following command

#cfgmgr

#cfgmgr scsi0 (Directly you can search device on Parent device scsi0)

After executing above commands the device hdisk5 become to Available state.
And device status is 1

5. List device Properties (attributes)


Suppose you want to check the device attributes details, you should use following commands.


You want to see memory details,

#lsattr –El mem0 (For memory)
#lsattr –El processor0 (For processor)
#lsattr –El ent0 (For Ethernet card)
#lsattr –El rmt0 (For Tape drive)

E – Effective
l - Device
Like this all the devices.


6. List device Configuration


Suppose you want to check the device configuration details, you should use following commands.

Suppose you want to see HDD FRU number

#lscfg (it will show full system information)

#lscfg –vl hdisk0 (It will show HDD configuration details FRU)
#lscfg –vl eth0 (It will so MAC address details of eth0)

Like this all the devices.

NOTE:
#bindprocessor –q (It will show processor information)

Suppose you are using backup device, currently connected and configured with server.

First you switch on the server, at this time tape driver is not switched on. While booting the server, it is checking the tape drive, but tape is now powered on so tape drive is moved to defined state, status will be 0, Now tape drive is switched on now we want to activate the tape drive, we can activate the tape drive without rebooting the server using
#mkdev –l rmt0 (After executing the command tape drive is come to available state)

No comments:

Post a Comment