Subversion Repositories sysadmin_scripts

Rev

Rev 173 | Last modification | Compare with Previous | View Log | Download | RSS feed

Last modification

Path Last modification Log Download RSS
[NODE][NODE] [FILE] findMissing 174  1 d 16 h rodolico Log Download RSS
[NODE][NODE] [FILE] getDriveInfo 173  1 d 17 h rodolico Log Download RSS
[NODE][NODE] [FILE] README.md 173  1 d 17 h rodolico Log Download RSS

getDriveInfo

Scans all hard drives on Unix systems, using smartctl to determine parameters

like make/model, serial number, hours uptime, etc... and sends a tab

delimited report to STDOUT

Looks for file /etc/drive_bays and, if it exists, populates the physical bay

a drive in.

Looks for the following binaries and uses if they exist. Will not fail if the

binaries do not exist.

Tested on Devuan Linux and FreeBSD

Utilities

findmissing is a simple Perl script to use if you have run this program and

populated it with the bays the drives are in. I wrote this to handle a

situation where I know a drive has failed, but I have no bloody idea which

one it is in.

It will look for all drives on the system, grab the serial numbers, then

compare that list with [/usr/local]/etc/drive_bays,

[/usr/local]/etc/drives.tsv or what is sent in via STDIN (usually a pipe).

It wil then simpy dump the line which does NOT match.