Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid "not large enough" checks for Windows drives that report themselves as 0.0 GB #1483

Closed
jviotti opened this issue Jun 1, 2017 · 5 comments · Fixed by #1574
Closed

Comments

@jviotti
Copy link
Contributor

jviotti commented Jun 1, 2017

See balena-io-modules/drivelist#142

In summary, WMI sometimes fails to detect the real size of the drive, and detects a unreasonably small drive size (e.g. 8 MB) that gets coerced into 0.0 GB by the Etcher UI.

We have a real fix for this (which involves to re-write drivelist on C++), but let's make Etcher not take the size of these problematic drives into consideration for now.

@lurch
Copy link
Contributor

lurch commented Jun 1, 2017

Umm nope, this is in fact opposite to what @alexandrosm was suggesting in gitter!
We don't want to filter out (ignore) drives that report themselves as 8MB, we want to ignore the size they report, and allow any-size-image to be written to them anyway.

@jviotti
Copy link
Contributor Author

jviotti commented Jun 1, 2017

Yeah, my bad, I totally mixed things up. I'll rephrase the issue.

@jviotti jviotti changed the title Ignore Windows drives that report themselves as 0.0GB Avoid "not large enough" checks for Windows drives that report themselves as 0.0 GB Jun 1, 2017
@alexandrosm
Copy link
Contributor

basically we should set a "minimum plausible drive size" and ignore any responses that are below that, simply reporting them as "unknown size", and as a result, not applying any size checks

@lurch
Copy link
Contributor

lurch commented Jun 1, 2017

...and there's then a nice symmetry between drives who's size we don't know, with images who's size we don't know ;-)

@jviotti jviotti modified the milestones: 1.1, Backlog Jun 16, 2017
jviotti added a commit to balena-io-modules/drivelist that referenced this issue Jun 28, 2017
We were using WMI to get the size of a physical drive, however turns out
that is number is not very accurate (since its based on CHS), and even
plain wrong in some cases.

As a solution, we now use the IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl to
get the size of a physical drive.

See: balena-io/etcher#995
See: balena-io/etcher#1483
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit to balena-io-modules/drivelist that referenced this issue Jun 28, 2017
We were using WMI to get the size of a physical drive, however turns out
that is number is not very accurate (since its based on CHS), and even
plain wrong in some cases.

As a solution, we now use the IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl to
get the size of a physical drive.

See: balena-io/etcher#995
See: balena-io/etcher#1483
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit to balena-io-modules/drivelist that referenced this issue Jun 29, 2017
We were using WMI to get the size of a physical drive, however turns out
that is number is not very accurate (since its based on CHS), and even
plain wrong in some cases.

As a solution, we now use the IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl to
get the size of a physical drive.

See: balena-io/etcher#995
See: balena-io/etcher#1483
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit to balena-io-modules/drivelist that referenced this issue Jun 29, 2017
We were using WMI to get the size of a physical drive, however turns out
that is number is not very accurate (since its based on CHS), and even
plain wrong in some cases.

As a solution, we now use the IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl to
get the size of a physical drive.

See: balena-io/etcher#995
See: balena-io/etcher#1483
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 6, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 6, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

- Cleanup temporary scripts after execution

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Fixes: #1571
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 11, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

- Cleanup temporary scripts after execution

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Fixes: #1571
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 11, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

- Cleanup temporary scripts after execution

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Fixes: #1571
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 12, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

- Cleanup temporary scripts after execution

This PR also sets the DRIVELIST_DEBUG environment variable to enable
debug information from Windows' drivelist implementation.

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Fixes: #1571
See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added a commit that referenced this issue Jul 12, 2017
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  balena-io-modules/drivelist#142)

- Cleanup temporary scripts after execution

This PR also sets the DRIVELIST_DEBUG environment variable to enable
debug information from Windows' drivelist implementation.

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: #1108
Fixes: #1054
Fixes: #995
Fixes: #1483
Fixes: #1142
Fixes: #1571
See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@lurch
Copy link
Contributor

lurch commented Jul 13, 2017

Please see #1574 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants