2

I wrote a script fetching the RAID configuration of the latest VirtualDisk.

On one server I get :

# omreport storage vdisk controller=0 -fmt ssv | awk '-F;' '/^ID/{print}/Virtual\s*Disk\s*[0-9]+;/{line=$0;value=$7}END{print line;print value}'
ID;Status;Name;State;Hot Spare Policy violated;Encrypted;Layout;Size;T10 Protection Information Status;Associated Fluid Cache State ;Device Name;Bus Protocol;Media;Read Policy;Write Policy;Cache Policy;Stripe Element Size;Disk Cache Policy
14;Ok;VirtualDisk16;Ready;Not Applicable;No;RAID-0;7,451.50 GB (8000987201536 bytes);No;Not Applicable;/dev/sdo;SAS;HDD;No Read Ahead;Write Through;Not Applicable;64 KB;Unchanged
RAID-0
#

On another server, I get :

# omreport storage vdisk controller=0 -fmt ssv | awk '-F;' '/^ID/{print}/Virtual\s*Disk\s*[0-9]+;/{line=$0;value=$7}END{print line;print value}'
ID;Status;Name;State;Hot Spare Policy violated;Virtual Disk Bad Blocks;Encrypted;Layout;Size;T10 Protection Information Status;Associated Fluid Cache State ;Device Name;Bus Protocol;Media;Read Policy;Write Policy;Cache Policy;Stripe Element Size;Disk Cache Policy
16;Ok;Virtual Disk 16;Ready;Not Applicable;No;No;RAID-0;3,725.50 GB (4000225165312 bytes);No;Not Applicable;/dev/sdp;SAS;HDD;Read Ahead;Force Write Back;Not Applicable;64 KB;Disabled
No
#

The difference between these two servers is the PERC H730 Mini firmware version :

According to omreport system version, the first has PERC H730 Mini v25.5.2.0001 and the second PERC H730 Mini v25.5.0.0018.

SebMa
  • 359
  • 1
  • 10

1 Answers1

3

It probably depends on different omreport or firmware versions. In general, be careful tailoring your script for very specific output, as any small change can break your parsing.

shodanshok
  • 47,711
  • 7
  • 111
  • 180