Code:
awk '
/storage-view:/ {SNAME[++CNT]=$2
}
/virtual-volume:/ {VV=$2
HA=$4
BA=$6
RA=$7
}
/logical-unit:/ {LL=$2
}
/storage-array:/ {SA=$2
for (i=1; i<=CNT; i++)
printf "%s,%s,%s,%s,%s,%s,%s\n", SNAME[i], VV, LL, HA, BA, RA, SA
CNT=0
}
' file
PU04B_SV,DEVICE_SYMM209_PUCC_SHARED_35BF_1_vol,VPD83T3:60000970000195702009533033354246,local,cluster-1,,running),EMC-SYMMETRIX-19570209
PU04A_SV,DEVICE_SYMM209_PUCC_SHARED_35BF_1_vol,VPD83T3:60000970000195702009533033354246,local,cluster-1,,running),EMC-SYMMETRIX-19570209
PU03B_SV,DEVICE_SYMM209_PUCC_SHARED_35BF_1_vol,VPD83T3:60000970000195702009533033354246,local,cluster-1,,running),EMC-SYMMETRIX-19570209
PU03A_SV,DEVICE_SYMM209_PUCC_SHARED_35BF_1_vol,VPD83T3:60000970000195702009533033354246,local,cluster-1,,running),EMC-SYMMETRIX-19570209
PU02B_SV,DEVICE_SYMM209_PUCC_SHARED_35BF_1_vol,VPD83T3:60000970000195702009533033354246,local,cluster-1,,running),EMC-SYMMETRIX-19570209
PUCHA01_SV,PUCHA01_1B8E_BOOT,VPD83T3:60000970000195702009533031423845,local,cluster-1,,running),EMC-SYMMETRIX-19570209
HDIUS1N1_N2_SV,device_HDIUS1N1_N2_Symm209_1BD3_1_vol,VPD83T3:60000970000195702009533031424433,local,cluster-1,,running),EMC-SYMMETRIX-19570209