disk=sda
model=$(sudo hdparm -I /dev/${disk}|grep -i "Model Number")
serial=$(sudo hdparm -I /dev/${disk}|grep -i "Serial Number")

# 	Model Number:       HGST HTS541010A9E680
#	Serial Number:      JA1000102T3MZP

model_parts=(${(@s|:|)model})
Model=(${(@s| |)model_parts[2]})

serial_parts=(${(@s|:|)serial})
Serial=(${(@s| |)serial_parts[2]})

 disk_name="ata-${Model[1]}_${Model[2]}_${Serial}"
 echo $disk_name
 echo "ata-HGST_HTS541010A9E680_JA1000102T3MZP"

#----------
# single call to hdparm using lower i
disk=sda
model=$(hdparm -i /dev/${disk}|grep -i "SerialNo")

# Model=HGST HTS541010A9E680, FwRev=JA0OA560, SerialNo=JA1000102T3MZP

parts=(${(@s|,|)model})

model_parts=(${(@s|=|)parts[1]})
Model=(${(@s| |)model_parts[2]})

Serial=(${(@s|=|)parts[3]})


disk_name="ata-${Model[1]}_${Model[2]}_${Serial[2]}"
echo $disk_name
echo "ata-HGST_HTS541010A9E680_JA1000102T3MZP"

