Project

General

Profile

Feature #7307

Better message with Import Disk results in case of read error

Added by Ilmārs Poikāns over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Suraj Ravichandran
Category:
Middleware
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

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]

Related issues

Related to FreeNAS - Bug #14477: Rsync command fails on importing certain media with permission errorsResolved2016-04-06

Associated revisions

Revision 567ec290 (diff)
Added by Suraj Ravichandran over 3 years ago

Improve Import Disk routines to be lesss error prone, have better error reporting and work with windows target datasets.

By default the underlying rsync command now does not save ownership (neither user nor group),
is lenient with modification times, does not copy over permissions and does not preserve device specials.

Also slightly improve stupid suraj code from 2014 (its still suraj code...)

Ticket: #11535
Ticket: #14477
Ticket: #11028
Ticket: #7307

History

#1 Updated by Jordan Hubbard over 4 years ago

  • Category set to 59
  • Assignee set to Suraj Ravichandran
  • Target version set to Unspecified

#2 Updated by Suraj Ravichandran over 4 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.

#3 Updated by Suraj Ravichandran over 3 years ago

  • Related to Bug #14477: Rsync command fails on importing certain media with permission errors added

#4 Updated by Suraj Ravichandran over 3 years ago

This should be fixed with my upcoming cleanup of the media import utility

#5 Updated by Suraj Ravichandran over 3 years ago

  • Status changed from Screened to Ready For Release
  • % Done changed from 0 to 100

#6 Updated by Vaibhav Chauhan over 3 years ago

  • Target version changed from Unspecified to 261

#7 Updated by Vaibhav Chauhan about 3 years ago

  • Target version changed from 261 to 9.10-STABLE-201605240427

#8 Updated by Vaibhav Chauhan about 3 years ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF