FreeNAS-scripts
FreeNAS-scripts copied to clipboard
date parsing in zpool_report.sh fails if scrub takes longer than 24 hrs
I have one TrueNAS 12 server with an encrypted pool and a slow CPU which takes more than 24 hours to do a scrub.
zpool status | grep scan scan: scrub repaired 0B in 1 days 11:56:46 with 0 errors on Wed Dec 9 06:07:04 2020
This results in:
Failed conversion of 9-on-Wed_Dec'' using format
%Y-%b-%e_%H:%M:%S''
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] [-v[+|-]val[ymwdHMS]]
Thanks, I'll look into this when I have some spare time.
Question: are you using the latest version?
I cloned from git just a few minutes before testing it.
I had been using a predecessor script which threw the same error with TN12 (it was OK with FN11), found your version when searching and hoped that perhaps it could handle this.
I just posted an updated version; let me know how it works for you.