This was caused by inconsistent labeling of the
serial number by smartctl. In a majority of cases
smartctl would output serial number data using
the label "Serial Number:" however on a SAS
drive we found that smartctl output the label
as "Serial number:" i.e. differs with a lower
case 'n'. Unfortunately we were doing a case
sensitive search for "Serial Number" so the result
being the serial number was not found.
This patch converts both strings in the search
to lower case before searching.
In addition a new field was added to the
anonymize list, "logical unit id:" so when the
-q option is used "serial number", "lu wwn device id:"
and "logical unit id:" are all now anonymized in the
smartctl debug data.
Anonymize the serial numbers in the gui, the
log and the summary table.
If a serial number was obtained from the device,
it is replaced with "XXXXXXXXXXXXXXX".
If the serial number could not be obtained from the
device, it's replaced with "???????????????".
This fixes column alignment issues in the gui
with nvme drives i.e. nvme0n1 etc. If the drive
name including path exceeds 8 characters the
/dev/ is removed and prefixed with spaces to
a total max length of 8 characters.
Also removed 1. 2. etc from drive selection
to reduce the line length. Also removed the
space between > and [, ie "> [wipe]" becomes
">[wipe]" These changes remove 3 characters
and help to reduce the affect of the additional
temperature field [30C] which add 5 characters.
Therefore the line length overall, increased by
5-3 = 2 characters.
This helps to reduce line wrapping on 80
character terminals, when the drive model length
exceeds 24 characters.
For some controllers/drivers the readlink method of
obtaining the bus type for GUI display does not work.
If we haven't already resolved the bus type, we then
also check smartctl for the transport protocol
for SATA.
For some controllers/drivers the readlink method of
obtaining the bus type for GUI display does not work.
If we haven't already resolved the bus type, we then
also check smartctl for the transport protocol
for SAS.
We already determine the bus type,
ATA, USB, NVME, VIRT (loop) etc
and display the bus type on the GUI.
libparted prefixes the model number
with ATA which we don't need, especially
as we try to keep the drive display length
to a maximum of 80 characters.
If a USB device generated a particular error
code from smartmontools, the --nousb option
incorrectly did not exclude it from the
enumerated drives.
This has now been corrected.
Added NVME and VIRT to device type table.
VIRT are virtual devices such as loop devices
created with losetup.
NVME for solid state storage devices.
Due to the longer device names used for NVME, I will
need to do some work on the device name in the selection
window so column alignment is maintained.
If you use the option --nousb, all USB devices will be ignored.
They won't show up in the GUI and they won't be wiped if you use
the --nogui --autonuke command. They will even be ignored if you
specifically name them on the command line.
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.
Add serial number support for USB devices for USB
to IDE/SATA adapters. Note this will only work
with USB IDE/SATA adapters that support ATA pass
through. See #149 for further details of
supported devices.
This patch requires readlink and smartmontools (smartctl)
to be installed. If not installed the serial number for
supported USB hardware will be missing.
The device type, i.e USB or ATA is now shown on the selection
and wipe windows.
1. Keep nwipe_log notices succinct and below 80 chars in length including
timestamp. This is especially relevant for 80x30 terminal use such
as ALT-F2 etc or Shredos without losing any information.
2. Add [SUCCESS] to blanked & verified messages to make them stand out for quicker checking.
Also added a `device_label` field to centralize
the creation of the device label. This fixes the
labels for devices without a serial number, and
makes sure we have the same label format everywhere.