FreeNAS-scripts icon indicating copy to clipboard operation
FreeNAS-scripts copied to clipboard

date parsing in zpool_report.sh fails if scrub takes longer than 24 hrs

Open khorton opened this issue 4 years ago • 4 comments

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]]

khorton avatar Dec 13 '20 04:12 khorton

Thanks, I'll look into this when I have some spare time.

Spearfoot avatar Dec 13 '20 13:12 Spearfoot

Question: are you using the latest version?

Spearfoot avatar Dec 13 '20 13:12 Spearfoot

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.

khorton avatar Dec 13 '20 15:12 khorton

I just posted an updated version; let me know how it works for you.

Spearfoot avatar Dec 16 '20 20:12 Spearfoot