bundles/zfs: import bundle from work repository
This commit is contained in:
parent
b690ae25b0
commit
4934eb46fb
11 changed files with 841 additions and 0 deletions
15
bundles/zfs/files/check_zpool_online
Normal file
15
bundles/zfs/files/check_zpool_online
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ] ; then
|
||||
echo "Please provide pool name as first argument, e.g. 'tank'."
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if [ "$(zpool status "$1" | grep '^ state:')" = ' state: ONLINE' ]
|
||||
then
|
||||
echo "OK - Pool '$1' is online"
|
||||
exit 0
|
||||
else
|
||||
echo "CRITICAL - Pool '$1' is FAULTY or NOT ONLINE"
|
||||
exit 2
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue