Project

General

Profile

Bug #28216

Adding disk to mirror boot device fails without useful information if new disk is too small

Added by Warren Block over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Important
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Seen in:
Severity:
Low Medium
Reason for Closing:
Duplicate
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When adding a disk to convert the boot device into a mirror, a disk that is too small causes a traceback that tells the user nothing:

[MiddlewareError: Command '('gpart', 'add', '-t', 'freebsd-zfs', '-I', '2', '-a', '4k', '-s', '16008040448B', 'da0')' returned non-zero exit status 1.]

See https://forums.freenas.org/index.php?threads/problem-attaching-boot-drive.61315/

Before calling gpart, this code should query the new device capacity. If the available capacity is too small to mirror the existing device, return an error message with that information, then stop.

The new 'Sandisk 16G USB' device only has 15.6 GiB available capacity. To mirror the boot device, at least 16.0 GiB is required.  Operation aborted.

Related issues

Related to FreeNAS - Bug #27860: Display proper error message when mirroring boot device fails due to target device size being too smallDone2018-01-182018-02-12

History

#1 Updated by Warren Block over 1 year ago

  • Related to Bug #27860: Display proper error message when mirroring boot device fails due to target device size being too small added

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Not Started to Closed
  • Target version changed from 11.2-RC2 to N/A
  • Reason for Closing set to Duplicate

Also available in: Atom PDF