Closed suedi closed 8 years ago
You're right. The branch beginning with if [ $PVS_RC -eq 0 ]
should only execute if /sbin/pvs
was able to generate usable data (i.e. $PVS_DATA
should not be empty). The check should be if [ $PVS_RC -eq 0 ] && [ -n "$PVS_DATA" ]
.
The vdev_warn
and vdev_error
methods in subr.sh
currently do not check vdevd.conf, but they could be extended to do so.
small things but best to handle when you come across them.
I think it would be a good idea to have some logging function that honors vdevd.conf
loglevel settings. Perhaps not replacing vdev_warn
and vdev_error
Hi @suedi,
The PVS probing should be fixed in f367dce7402e073cf78808f633fe17695892c8d8. I have code to fix vdev_warn
and vdev_error
to honor the loglevel in vdevd.conf
, but I can't commit it yet since it interacts with code that addresses #53 (which is still being tested).
Good news man,
I will wait for your commit then
Seems the fix is in now.
closing...
I came across this in disk.sh at line 552
In the else statement with vdev_warn shouldn't PVS_RC be set to something other than
0 means that pvs suceeded but in the else statement to "if [ -x /sbin/pvs ]; then " there is no executable pvs on the system ergo PVS_RC should be set to fail and as a consequence the next "if [ $PVS_RC -eq 0 ]; then " would fail.
comment?
also is there a way to log messages with debug priority from bash files that respects loglevel in vdevd.conf