The result here is rather technical, so beware...
Copy this text into a file, say $HOME/smartstat
#!/bin/bash
b="----------------" # 16 dashes
lsblk -p \
| grep disk \
| cut -d' ' -f1 \
| while read disk ;do
echo -e "\n$(tput rev)$b\n ${b: -2} $disk ${b: -2} \n$b$(tput sgr0)"
sudo smartctl -a $disk
done
Then do: chmod 755 smartstat
(in Terminal, at the bash prompt) to set it as being an executable. After that ./smartstat
will run it... providing a wealth of information for each "disk" that lsblk recognizes (append | less
to use the text reader, instead of relying on terminal scrollback).
A disk/drive that has "SMART" tech embedded MIGHT show something that tells IF or even WHAT problems there exists in that drive - but there is a lot to read and ponder on.
You might need to read up on how to interpret all those numbers.
I have yet to see the output from a failed drive, so cannot advice about that.
Maybe others can fill in regarding it.
These may be helpful:
https://www.linuxjournal.com/article/6983?page=0%2C1
https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
https://www.smartmontools.org/wiki/FAQ
https://serverfault.com/questions/419007/understanding-smartctl-a-output
info:
smartctl is part of smartmontools, for ubuntu, can't tell for other distro's
lsscsi
to list things. It looks likelsblk
has a-a
option which shows empty drives. Depending on how it is failing, maybe that would show some other drives? Once you identify the failing drive, you can usehdparm -i /dev/sda
to get it to print out the serial, etc., which hopefully corresponds to stuff printed on a physical label on the drive.cat /var/log/syslog | grep kernel | grep '/dev/sd\|/dev/zd'
to filter for any error messages being reported by disks. You say you are being told you have failing disks; by who or what? If it is unable to tell you which disk and why, it isn't exactly a reliable source.