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

Fix incorrect disk capacity nomenclature. #237

Conversation

PartialVolume
Copy link
Collaborator

@PartialVolume PartialVolume commented Mar 26, 2020

I've always wondered, when you first view all the drives, why drives above 999GB appeared in their GB nomenclature instead of TB. For instance a 2TB drive would appear as 2000GB. Unlike in other places within nwipe that do a proper job of describing the capacity. It's just this one location in the program that is wrong.

This information was obtained by a call to a function in libparted. Maybe when libparted was written there was no such thing as a TByte drive ?? Who knows, so anyway it was far easier to use nwipes build in function called 'determine_C_B_nomenclature()' This provides us with the correct nomenclature that is a fixed number of digits (three) and prefixed with spaces so the length is always the same. In the GUI this gives a nice list when viewing multiple drives that appear in neat columns.

Below are some screenshots of the new layouts, note the following:

  • New column (from a recent merge) that shows the bus type ATA/USB etc
  • New calculation for disk capacity that fixes the display of TB capacity, previously was thousands of GigaBytes.
  • Disk capacity has a fixed column width and prefixed with spaces to achieve the fixed width. This makes the display more visually pleasing when multiple drives are displayed, as now all the individual items now appears in fixed width columns.
  • Note the model number / serial number field. To maximise the amount of limited space (i.e 80 character width as required by ShredOS, full screen terminals (ALT-F2 etc) I simply separate the model and serial number by a '/'.
  • Also note, that the last two USB devices have the text (No ATA pass thru) in the serial number field. This means that the chipset used in whatever USB to IDE/ATA adapter is being used does not support ATA pass through, therefore the serial number of the drive attached to the adapter (also known as a USB bridge) can't be accessed. Without ATA pass through you also won't be able to do a disk erase using the drives firmware ( firmware erase is an nwipe future feature). If you see the text 'No ATA pass thru' you can still wipe the drive, it just means you can't see the serial number or have access to more advanced features. Maybe you should get yourself a better USB to IDE/SATA adapter. See Add serial number support for USB devices #230 and Disks plugged into USB don't show serial number, while direct SATA/IDE/SCSI do. #149 which have more details on supported chipsets and devices.

nwipe_new_selection_layout_Screenshot_20200326_173907

nwipe_during wiping_Screenshot_20200326_174104

I've always wondered, when you first view
all the drives, why drives above 999GB appeared
in their GB nomenclature instead of TB. For
instance a 2TB drive would appear as 2000GB.
Unlike other places in nwipe that does a proper
job of describing capacity just this one location
in the program was wrong.

This information was obtained by a call to a function
in libparted. Maybe when libparted was written there
was no such thing as a TByte drive ?? Who knows, so
anyway it was far easier to use nwipes build in function
called 'determine_C_B_nomenclature()' This provides us
with the correct nomenclature that is a fixed number of
digits (three) and prefixed with spaces so the length
is always the same. In the GUI this gives a nice
list when viewing multiple drives that appears in neat
columns.
@PartialVolume PartialVolume merged commit ac0fe87 into martijnvanbrummelen:master Mar 26, 2020
@PartialVolume PartialVolume deleted the Correct_disk_capacity_nomenclature branch March 26, 2020 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant