Better message with Import Disk results in case of read error
Using FreeNAS-9.3-STABLE-201412240734 with minimal setup - ZFS pool (with few datasets) and some shares created, no custom settings via command line.
When "Import Disk" (initiated via GUI) finishes and there were some read errors in the source disk, GUI shows following status:
Import of Volume /dev/ada1s1 Failed. Reason Import Process was Abruptly Terminated.
Reason of failure shown to user is not really correct, rsync has finished on its own (wasn't terminated), in my case one file had read error.
As I understand "Import Disk" uses output from rsync that is redirected to separate file:
[root@freenas] ~# tail /var/run/importcopy/vol_rsync_stats ... ERROR: <full path to file> failed verification -- update discarded. 319,795,730,497 100% 46.43MB/s 1:49:29 (xfr#1448, to-chk=0/1793)rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1166) [sender=3.1.1]
It would be more useful to show to user message that disk import finished, but some file(s) had errors. It would be ideal to show (or let download) list of files (might be huge list, if really bad disk with many files) that had errors.
[root@freenas] ~# grep errors /var/run/importcopy/vol_rsync_stats rsync: read errors mapping "/var/run/importcopy/tmpdir/<full path to file>": Input/output error (5) rsync: read errors mapping "/var/run/importcopy/tmpdir/<full path to file>": Input/output error (5) 319,795,730,497 100% 46.43MB/s 1:49:29 (xfr#1448, to-chk=0/1793)rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1166) [sender=3.1.1]
#2 Updated by Suraj Ravichandran about 5 years ago
- Status changed from Unscreened to Screened
This (Import Disk) was meant to be a ghetto feature just to allow the content of non-zfs disks to be copied over to your main pool. That is why I do not have all these various error messages 'properly' formatted.
That being said let me see what can be done.
Thanks for reporting this.
Also, you seem to be the first user genuinely testing this feature to its limit as well as nice enough to get back with error messages and suggested fixes. We (especially I) thank you for this.