Updating component attributes

This section discusses how to update component attributes in an IBM Storage Scale System 3200 system. Sample output in this topic might not match the output produced on your system.

You can change some component attributes such as the name or serial number. This example updates the name of the third enclosure so that it includes the product serial number as recommended:

$ mmchcomp 3 --name S1E3-SX98760044
$ mmlscomp --type storageenclosure
 
    Storage Enclosure Components
 
Comp ID  Part Number  Serial Number   Name                 Display ID
-------  -----------  -------------   ------------------   ----------
      1  1818-80E      SV12345001     1818-80E-SV12345001  21
      2  1818-80E      SV12345007     1818-80E-SV12345007  01
      3  1818-80E      SV12345003     S1E3-SX98760044      13
      4  1818-80E      SV12345005     1818-80E-SV12345005  05
      5  1818-80E      SV12345004     1818-80E-SV12345004  37
      6  1818-80E      SV12345002     1818-80E-SV12345002  25
      7  1818-80E      SV12345008     1818-80E-SV12345008  17
      8  1818-80E      SV12345006     1818-80E-SV12345006  33

The mmchcomp Component argument may be either the component ID, the component serial number, or the component name. This example uses the component ID (the value 3).

Changing one component at a time can be slow, so you can use a stanza file to make multiple changes with a single command. As an aid, mmlscomp can list components in stanza format. You can capture this output into a file, edit the file to make the desired updates, then use the stanza file as input to mmchcomp. The following example uses this procedure to rename the remaining enclosures:

$ mmlscomp --format stanza > rename.stanza
$ cat rename.stanza 
%comp:
  compId=9
  compType=rack
  partNumber=1410HEA
 
%comp:
  compId=1
  compType=storageEnclosure
  displayId=21
  name='1818-80E-SV12345001'
  partNumber=1818-80E
  serialNumber=SV12345001
 
%comp:
  compId=2
  compType=storageEnclosure
  displayId=1
  name='1818-80E-SV12345007'
  partNumber=1818-80E
  serialNumber=SV12345007
 
%comp:
  compId=3
  compType=storageEnclosure
  displayId=13
  name='S1E3-SX98760044'
  partNumber=1818-80E
  serialNumber=SV12345003
 
...

Edit rename.stanza to define new enclosure names, then apply the changes using mmchcomp.

$ vi rename.stanza
$ cat rename.stanza
%comp:
  compId=9
  compType=rack
  name=R01C01
  partNumber=1410HEA
 
%comp:
  compId=1
  compType=storageEnclosure
  displayId=21
  name='S1E5-SX98760048'
  partNumber=1818-80E
  serialNumber=SV12345001
 
%comp:
  compId=2
  compType=storageEnclosure
  displayId=1
  name='S1E1-SX98760044'
  partNumber=1818-80E
  serialNumber=SV12345007
 
%comp:
  compId=3
  compType=storageEnclosure
  displayId=13
  name='S1E3-SX98760041'
  partNumber=1818-80E
  serialNumber=SV12345003
 
...
 
$ mmchcomp -F comp.stanza 
$ mmlscomp --sort name
 
    Rack Components
 
Comp ID  Part Number  Serial Number  Name
-------  -----------  -------------  ------
      9  1410HEA                     R01C01
 
    Storage Enclosure Components
 
Comp ID  Part Number  Serial Number   Name                Display ID
-------  -----------  -------------   ------------------  ----------
      2  1818-80E      SV12345007     S1E1-SX98760044     01
      4  1818-80E      SV12345005     S1E2-SX98760049     05
      3  1818-80E      SV12345003     S1E3-SX98760041     13
      7  1818-80E      SV12345008     S1E4-SX98760036     17
      1  1818-80E      SV12345001     S1E5-SX98760048     21
      6  1818-80E      SV12345002     S1E6-SX98760050     25
      8  1818-80E      SV12345006     S1E7-SX98760039     33
      5  1818-80E      SV12345004     S1E8-SX98760052     37