quinta-feira, 3 de abril de 2014

STORAGE - Como descobrir o ID do disco do storage?




Hoje vou falar de uma ferramenta fornecida pela EMC que é fantástica. Essa ferramenta chama-se inq.

O mesmo pode ser baixado no ftp:
ftp://ftp.emc.com/pub/symm3000/inquiry/v7.2.1.0/

Ele abrange muitos tipos de sistemas operacionais como Linux, Solaris, AIX, Windows, etc.

Em muito ambientes existe um problema para coletar e visualizar as informações do storage que está configurado para o ambiente, como vendor, equipamento, lun ID e size.

Com o inq é possível tudo isso.

Recomendo o uso do mesmo quando não temos instalado no servidor o powerpath como gerenciador de multipath.

Feito o download, basta fazer o upload para o servidor correspondente e executá-lo pelo terminal ou pelo DOS.

Existe um help com todos os parâmetros e explicações para que serve:

[root@centos-srv01 ~]# ./inq.linux -help
Inquiry utility, Version V7.3-1159 (Rev 1.0)      (SIL Version V7.2.1.0 (Edit Level 1159)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.



ERROR: -help is an invalid option.

                                                                               
Usage: inquiry <options>                                                       
                                                                               
    display types:                                                             
       -h               : display this help screen                             
       -et              : display emulation and type info   (Symmetrix only)   
       -ckd             : display CKD device info           (Symmetrix only)   
       -page0           : display detailed page0 (only valid with -dev option) 
       -pagec0          : display detailed pagec0 (only valid with -dev option 
                          and on CLARiiON devices)                             
       -parent          : display both PowerPath and OS device relationships   
       -celerra         : display Celerra lable devices                        
       -sid             : display Symmetrix Serial Number                      
       -sym_wwn         : display Symmetrix device wwn and Serial Number       
       -clariion        : display CLARiiON device information                  
       -clar_wwn        : display CLARiiON WWN and Serial Number               
       -showvol         : display Symmetrix Volume Number.                     
       -compat          : display old format                                   
       -btl             : display Bus Target and Lun                           
       -sw_wwn          : display StorageWorks WWN and Serial Id               
       -hds_wwn         : display HDS WWN and Serial Id                        
       -s80_wwn         : display S80 WWN and Serial Id                        
       -invista_wwn     : display Invista WWN and Serial Id                    
       -shark_wwn       : display IBM Shark WWN and Serial Id                  
       -compaq_wwn      : display Compaq WWN and Serial Id                     
       -netapp_wwn      : display Netapp WWN and Serial Id                     
       -hba             : display HBA info only. See options below             
       -identifier <device_name | nice_name | hp_id | vms_id>                  
                        : display device identifier info (EMC devices only)    
       -mapinfo         : display target mapping information                   
       -wwn             : display devices WWN                                  
       -native          : display the real device identity                     
                                                                               
    filter options:                                                            
       -no_filters      : show every device even if no data available          
       -f_powerpath     : filter -  only powerpath devices                     
       -f_pseudo        : filter -  only pseudo devices                        
       -f_real          : filter -  only real devices                          
       -f_emc           : filter -  only EMC devices                           
       -f_ckd           : filter -  only ckd devices                           
       -f_celerra       : filter -  only Celerra devices                       
       -f_4k            : filter -  only Symmetrix volumes < 4096              
       -f_clariion      : filter -  only CLARiiON devices                      
       -f_storwrks      : filter -  only Compaq StorageWorks devices           
       -f_hds           : filter -  only Hitachi HDS devices           
       -f_s80           : filter -  only Fujitsu Siemens S80 devices           
       -f_invista       : filter -  only EMC Invista devices                   
       -f_shark         : filter -  only IBM SHARK devices                     
       -f_size <size>   : filter -  only show devices with <= size in kbytes   
                                                                               
    query options:                                                             
       -skipread        : do not request Read Capacity                         
       -skipinq         : do not request Inquiry data                          
       -skipboth        : do not request Read Capacity or Inquiry data         
                                                                               
    device options:                                                            
       -dev  <device>   : do inquiry on specified device                       
       -symmvol <vol#>  : show devices with Symm HEX volume #= <vol#>          
       -clar_file <file-name>: show clariion devices in file                   
                                                                               
    other options:                                                             
       -no_dots         : do not display status dots                           
       -sortoff         : do not perform ANY sorting                           
       -sortsymm        : sort by Symmetrix serial number   (Symmetrix only)   
                                                                               
    sym_wwn options:                                                           
       -sid_wwn <sid>   : the 12 digit SID of the symm for which you want wwn's 
       -symdev  <dev>   : the device for which you want the wwn                
                                                                               
    HBA specific options:                                                      
       -hba               : display HBA info only                              
       -fibre             : display FC HBA info only                           
       -iscsi             : display ISCSI HBA info only                        
       -scsi              : display SCSI HBA info only                         
       -hba_file <file>   : external HBA file to use. -fibre only              
       -create            : create external HBA file specified by -hba_file    
      Usage :                                                                 
       inquiry -hba [-fibre [-hba_file <file>] [-create]] [-scsi] [-iscsi]      
                                                                               
Release notes:                                                                 
     Only options listed above are supported, although other options           
     may continue to work, they are subject to change or removal.              
                                                                               
     the following parameter changes have occurred                             
       -nodots              ->  -no_dots                                       
       -c                   ->  -ckd                                           
       -v                   ->  -page0                                         
       -r <devicename>      ->  -dev <devicename>                              
       -s SymmVolumeNumber  ->  -symmvol SymmVolumeNumber                      
       -xr                  ->  -f_pseudo                                      
       -xps                 ->  -f_real                                        
       -system              ->  no longer exists                               


[root@centos-srv01 ~]# 



Aqui um exemplo de execução do inq:

[root@centos-srv01 ~]# ./inq.linux 
Inquiry utility, Version V7.3-1159 (Rev 1.0)      (SIL Version V7.2.1.0 (Edit Level 1159)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.

..

--------------------------------------------------------------------------
DEVICE          :VEND    :PROD            :REV   :SER NUM    :CAP(kb)     
--------------------------------------------------------------------------
/dev/sda        :ATA     :VBOX HARDDISK   :1.0   :           :    10485760
[root@centos-srv01 ~]# 
[root@centos-srv01 ~]# 

Neste exemplo, não apareceu nenhum storage pois este servidor é virtual, mas serve como exemplo para execução do inq.