diff --git a/CHANGELOG b/CHANGELOG index 91e0182..b96ae21 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,8 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed +* ignore one of the errors in disklabel, bioctl and atactl due to incompatible disk types + ### Fixed ### Removed diff --git a/dump-server-state.sh b/dump-server-state.sh index 047d50a..dda4c0c 100644 --- a/dump-server-state.sh +++ b/dump-server-state.sh @@ -296,7 +296,7 @@ task_disks() { last_result=$(${disklabel_bin} "${disk}" 2>&1 > "${dump_dir}/partitions-${disk}") last_rc=$? - if [ ${last_rc} -eq 0 ]; then + if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "disklabel: DIOCGDINFO: Input/output error" ]; }; then debug "* disklabel ${disk} OK" else debug "* disklabel ${disk} ERROR" @@ -312,7 +312,7 @@ task_disks() { last_result=$(${bioctl_bin} "${disk}" 2>&1 > "${dump_dir}/bioctl-${disk}") last_rc=$? - if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: DIOCINQ: Inappropriate ioctl for device" ]; }; then + if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: DIOCINQ: Inappropriate ioctl for device" ]; } || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: BIOCINQ: Input/output error" ]; }; then debug "* bioctl ${disk} OK" else debug "* bioctl ${disk} ERROR" @@ -328,7 +328,7 @@ task_disks() { last_result=$(${atactl_bin} "${disk}" 2>&1 > "${dump_dir}/atactl-${disk}") last_rc=$? - if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATA device returned error register 0" ]; }; then + if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATA device returned error register 0" ]; } || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATAIOCCOMMAND failed: Input/output error" ]; }; then debug "* atactl ${disk} OK" else debug "* atactl ${disk} ERROR"