Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561868 - sys-apps/cciss_vol_status: support hpsa driver in cron job
Summary: sys-apps/cciss_vol_status: support hpsa driver in cron job
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-29 21:58 UTC by Michael Orlitzky
Modified: 2017-06-30 17:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cciss_vol_status.cron (cciss_vol_status.cron,1011 bytes, application/x-shellscript)
2015-09-29 21:58 UTC, Michael Orlitzky
Details
cciss_vol_status.cron-r1 (cciss_vol_status.cron,1.57 KB, text/plain)
2015-10-03 16:23 UTC, Michael Orlitzky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2015-09-29 21:58:41 UTC
Created attachment 413310 [details]
cciss_vol_status.cron

I've got two servers with the hpsa driver now, so I can actually test this. The cciss_vol_status program will succeed even on drives that don't exist, so we can simplify the drive-finding logic a little bit. The only caveat is that it still prints to stderr for wrong/missing drives, so we have to hide that (and other) stderr output.

@grknight and @blueness: I recall you guys have the hardware for this. If not, sorry!
Comment 1 Michael Orlitzky gentoo-dev 2015-10-03 16:23:58 UTC
Created attachment 413590 [details]
cciss_vol_status.cron-r1

Here's another version that doesn't ignore stderr, but requires a temp file. The only other way I could come up with would be to run the command twice. I also switched the backticks to $() in this one -- apparently the $() is POSIX, just not supported by ancient shells.

I tested it with both cciss/hpsa and on a random non-HP desktop machine, but (unfortunately?) I don't have any dead hard drives at the moment. If somebody wants to pull a drive out of a server, great =)
Comment 2 Michael Orlitzky gentoo-dev 2016-06-07 23:30:06 UTC
Good news! One of my hard drives died. I can confirm that both versions of the cron job I posted report the degraded array.
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2017-06-30 17:49:21 UTC
Very sorry for the delay on this, this is in the tree now as part of the 1.12 ebuild.