Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cciss discovery #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions discovery-scripts/nix/smartctl-disks-discovery.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
die "Unable to find smartctl. Check that smartmontools package is installed.\n" unless (-x $smartctl_cmd);
my $sg_scan_cmd = "/usr/bin/sg_scan";
my $nvme_cmd = "/usr/sbin/nvme";
my $cciss_dev_dir = "/dev/cciss";
my @input_disks;
my @global_serials;
my @smart_disks;
Expand Down Expand Up @@ -100,6 +101,24 @@
}
}

if (-d $cciss_dev_dir){
#cciss_vol_status /dev/cciss/c0d0 -V should be used for listing of drives, but currently I have no servers
#with more than 1 drive with this contoller

opendir(DIR, $cciss_dev_dir);
while (my $file = readdir(DIR)) {
next unless ($file =~ m/^c\d+d\d+$/);
my ($disk_name) = $cciss_dev_dir."/".$file;
my ($disk_args) = "-d cciss,0";

push @input_disks,
{
disk_name => $disk_name,
disk_args => $disk_args
};
}
}

if (-x $nvme_cmd){
foreach my $line (`$nvme_cmd list`) {
## sg_scan -i
Expand Down