Display disk details on the available disk list

Wishlists for new functionality and features.
Post Reply
eyupo92
Posts: 4
Joined: 06 Jan 2017 17:42

Display disk details on the available disk list

Post by eyupo92 »

I wanted to add a screenshot showing the situation clearly, but fourm file upload complained that 460 KB file was too big. I can send you that file if you want per e-mail.

Here is the problem:

- Windows lists disks from 0 to n-1.
- HxD lists disks from 1 to n.

- As long as motherboards own SATA ports are used, there is a correspondence between these in the form of ( Windows disk x == HxD disk x+1 )

- The moment add-on SATA cards are added to the computer, this correspondence does not exist anymore. There is no means to determine which HxD disk corresponds to which Windows disk number.

- Almost all Windows free utilities can display the two basic disk details: disk model and serial number.

How and what I am seeing?
I am trying out a secure disk erase program at the moment. I have 10 disks connected to the desktop PC I am using. 6 SATA ports are coming from motherboards, and I have 2 x 2 port SATA add-in ports.

While a disk is being erased, it disappears from the HxD disk list. No problem with that. Let's say this disk was displayed as Disk 3 in the list. When the disk erase ends, I want to see inside of the disk tro see what pattern was actually written to it. When disk erase ends, the disk becomes available again - however, this time HxD lists that disk as Disk 1 in the list; it was listed as Disk 3 before. I have tried it multiple times, and even a disk that was listed as Disk 9 before, is listed as Disk 1. Looks like there is a "LIFO" going on here, the disk that becomes last available, is listed as the first disk. So, it is impossible for me to determine to which disk to open to verify its content.

Make the following improvements:
1) Retrieve the list of disks with Windows disk numbers
2) Display the model and serial number information right next to the disk number

If the above enhancements are applied, no such confusion would exist.

I can shoot a mp4 screenshot video that shows the situation clearly and share with you if you are interested.

Best Regards,

Eyup
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Display disk details on the available disk list

Post by Maël »

The current 2.0 beta shows the drive's serial number in the disk open dialog.

Regarding the naming of drives, volumes, logical disks/physical disks etc. in Windows, I get where you are coming from, but I also think Windows' naming conventions are really messy.

Almost everything is a drive there, no matter what kind of hardware it really is, a thumb stick, a removeable disk (attachable over USB or one you can slide in an SATA dock), SD card, etc. Except for optical disks, such as CDs, which get their own separate numbers.

The numbering of the drives is really only based on the hardware abstraction, not the hardware's physical properties, so Windows just counts from 0 to n, even if the types of drives are pretty different. The numbers do not help to reliably identify what hardware device you are dealing with. Its use lies in correlating the device with the names it got in programs such as diskmgmt.msc (which unfortunately is also pretty terse in giving unique details about the device). In disk management you can only identify the hardware by size or serial number (if you go the additional step to check it's context menu and there select properties). It's internal Windows name is not displayed, just a human readable one that persumably correlates with \\.\PhysicalDrivex (Windows' internal names for disk like drives with or without inserted media). Regarding built-in tools, get-disk (powershell) seems to give the most informative disk list.

That's why I added this counting, divided by type of drive: to give more clues and not ignore drive type. Granted the counting is a little confusing in the situation with addon cards (as you described above). I started at 1 to make this distinction from Windows counting more obvious. There is definitely room for improvement. It's not trivial though, let me explain.

In the past (BIOS), the drive numbers Windows gave (took over) had a correlation with the physical port/place they were attached to, and drive type (floppy, IDE hard disk, SCSI, etc.). Now it's mostly arbitrary, since all kinds of attachments/ports are put in one big list, by whatever order Windows queries the various controllers/ports/etc. Well except for CDs/optical dics and tape drives, which are counted separately.

I.e., you could deduce the (cable) plug or docking port based on the device type and number, rather easily. This is not the case anymore, the Windows tools' disk number is now just an internal list index. Probably makes little sense, too, since for example USB ports have no numbers written on them, and couldn't have simple ones, since they can be chained into trees using hubs. So at most some sort of hierarchical, IP like numbering would work.

diskmgmt.msc also uses this uninformative counting, but it has a partition view which is quite useful. I plan to add something similar after 2.0.

In the following, all of this is discussed a little more structured, and a possible solution is given at the end.


Bad naming conventions in Windows

Disk and Drive is often confused in Windows, which doesn't make those terms that clear. To use disk alone for a physical disk is an unfortunate choice, since logical disk is a synonym for volume. Logical drive is also a synonym for volume, because a CD (or any other optical medium), is actually not a disk but a disc, and so it's not a logical disk, but a logical drive. Well, technically a logical disc, but nobody says that. Also, there are other types of storage, that are in their own category, like tape drives, network storage, etc.

Volume is also a bad choice for a name, it is void of any meaning, at least it hasn't multiple uses, yet. It really is a huge mess, and ideally, new terms should be used.

I would say storage reader/writer, and storage (medium) or just storage would be good choices. And then physical and logical storage. But again, it's not always clear what is physical or virtual. Some virtual devices show up as physical hardware.

Maybe I should rename this "Open storage" and not "Open disk", then again, many wouldn't find it at first.

Why it matters
To get more specific why this mess matters.

The number of DiskX is the number of PhysicalDriveX, which really designates the drive, not the medium. So for example it identifies the SD card reader, not the SD card, which can also be accessed when no SD card is in the reader (e.g., to query drive properties). What happens when there is no SD card inserted? Does it skip this drive when counting, and keep an internal count? So does it count disks or drives? All of this is really messy and can be tested/reversed engineered, but this is not reliable/may change (as many things in this domain have over time) and I haven't found a definite documentation of all of this.

So, I think that relying on the disk numbers is a bit risky in general. Also, I noted various programs do differ in how they name drives/disks.


Question

I haven't found any documentation (besides inoffical forum posts/websites) that ensures the mapping of "Disk X" (in diskpart and diskmgmt) to "PhysicalDriveX" (Windows' internal name for drives that behave similar to hard disks) is correct.
If you have any information regarding this, I'd appreciate a link to some MS documentation.

Possible design
Probably something like this:
  • tab/window caption:
    • PhysicalDriveX (932 GiB, <ID>) and an icon identifying the type
  • disk open dialog (one row per entry, 4 columns):
    • PhysicalDriveX Drive/Disk-Type 932 GiB <ID>
Then again, the tab/window caption should really identify the disk quickly and without doubt, I don't think PhysicalDriveX is a good way to do that, since it's really uninformative. You often just start out with HxD, and use no other program, and want to know what drive that is without checking in another program, so PhysicalDriveX is really just for cross referencing, but not identifying. So it shouldn't take up too much caption space, abbreviating it with PDx is uncommon, and therefore possibly misleading, but I guess that could be easily explained/documented. Though it would lead to a similar issue as with diskmgmt.msc, which uses DiskX. DiskX probably matches with PhysicalDriveX, but could also be just counting the mediums/disks, not really the drives. So if we really are about clarity, introducing yet another name will not help, yet DiskX is really not a good name either. (Not even considering that the localized versions of Windows differ in the way they translate disk, so that no correlation with PhysicalDriveX can be made based on the name and usage of those names is inconsistent even more.)
At least the command line tool diskpart.exe seems to agree with diskmgmt.msc on naming conventions.

In conclusion, drive properties, not internal Windows names (which have almost no clear hardware correlation), should be the focus of identifying a drive (with a fixed medium). For changeable media, drive properties + specific media properties should be used. Unfortunately, media IDs are not based on media hardware, but their stored data (e.g., filesytem or partitioning), and therefore are not necessarily unique.

PhyscialDriveX/PDx/DiskX should be added, too, somehow. I am not sure if as detail, or as leading identifier. Leading identifier makes it easier to compare with other programs, such as diskpart.exe, diskmgmt.msc, get-disk (powershell), etc. But the correlation between DiskX and PhysicalDisk is not well/officially documented.

The identifying information should be clear from the window tab/caption. Additional information could be displayed in a sidebar/other window, and in the open disk dialog, easily. But the main information to clearly identify a disk should be in its name/caption.

Identifying properties of storage
  • Time
    • change observed in a list, when a device was attached/detached
    • Age - (of manufacture) might be easier to remember than arbitrary serial numbers, and easier to identify by time of purchase or other known dates. (Especially useful if no access to drive label, and only software device lists are available, which are somewhat selfreferential, and have no correlation with the ouside world, if not known already.)
  • Attachment location (physical plug location, its type such as USB/SATA, its name or number, controller type)
    • Diffulties arise because a lot is virtualized or not obvious to determine for the user, especially controllers: there is no physical or visual access to that information outside of software; Also plugs get unified with USB type C.
  • Device type (CD, hard disk, SD card, ...)
  • Drive model and serial number
    • often printed on hard disk labels, but for other devices (thumb drives, SD cards, ...) not readable without software tools, and relying on the time method mentioned above; in the last case, mostly useful to correlate disk ids in various programs
    • Setups such as laptops or disk enclosures/portable disks make this less useful, since there is no easy physical access to the disk labels.
  • Manufaturer
    • Not clear yet if that information is queryable in a fashion that returns friendly names.
    • Limited usefulness on its own, since not many manufacturers are left and therefore the name will often be the same across several drives.
  • Media ids
    • Are there ways to identify serial numbers of media, and not their readers/drives? This is especially useful for medias such as SD cards, or and removeable disks/discs that don't include their reader (like USB thumb drives). If yes, similar use and limitations as drive model and serial number.
Especially internal drives, in laptops, or other cumbersome to inspect setups, can only be really identified with a software device list. Additional information such as partition, contained file systems and logical drives, help a lot here.
eyupo92
Posts: 4
Joined: 06 Jan 2017 17:42

Re: Display disk details on the available disk list

Post by eyupo92 »

Thanks for these useful background information Mael. Is there a link to the current 2.0 beta? It will help me a little bit and I can provide feedback to you.

Best Regards,

Eyup
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Display disk details on the available disk list

Post by Maël »

I sent you a mail.
eyupo92
Posts: 4
Joined: 06 Jan 2017 17:42

Re: Display disk details on the available disk list

Post by eyupo92 »

Hi Mael.

Here are the screenshots from my trial on the PC with 10 disks attached to it. You can download it from below link.

https://drive.google.com/file/d/0B-eN7s ... sp=sharing


To summarize my findings:
1) With the addition of disk model information on the Disk List on Open Disk menu, I was able to pinpoint to the correct disk at all times.

2) With the help of this disk model information, I was able to see that disk numbers / disk order did not change. Maybe it did not change in the old version too, but I had no means of verifying that.

3) The tab headers still list disks with their numbers only and that tab header can get too long quickly. So, on screenshots 17 and 18 I suggest to add a small Disk Identifier Information section to the top of the Special Editors section which is on the top right. This section could appear just if disks are edited.

4) There are some errors that happen when a disk is tried to open while the disk is being erased by the application program I am testing. One happens when the disk is open in the HxD tab and I click on View->Refresh button. At that moment, a runtime error message is thrown and when I click on the OK button, HxD shuts down ; and I need to restart HxD again. When I try to open the disk after restarting HxD, this time I am greeted with another error message, but HxD does not shut down. I guess you might add an exception to the runtime error that happens and display the same message that is displayed after restart. In my case, I know that another application/process has gained exclusive access to the disk, so the error/warning message for this case can be extended to say "Possible reason may be another application or process having exclusive access of the disk."

So, in my case, I have a workable solution for my testing purposes with the beta. However, I still think addind serial number information to the Open Disk list and once the tab is open would be very helpful.

Thank you again for developing this great product.

Eyup
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Display disk details on the available disk list

Post by Maël »

Based on your pictures, I see the Windows performance monitor (and task manager) also use DiskX notation and the model number to identify a disk.
I'll see what other programs, like hard disk sentinel, provide for information (such as the hd serial number) that could be useful in a hex editor.
This will be for after the 2.0 stable, though.
eyupo92 wrote: 3) The tab headers still list disks with their numbers only and that tab header can get too long quickly. So, on screenshots 17 and 18 I suggest to add a small Disk Identifier Information section to the top of the Special Editors section which is on the top right. This section could appear just if disks are edited.
Your solution could be implemented as an additional panel or toolbar. Maybe I'll add an option to configure how tabs are named so you can see the disk model instead of hard disk x (or disk x), or additionally to it.
One issue you have with the additional disk info in a separate window is, that it shows only the information for the currently selected disk. So if you have several disks open as in your case, you will have to click through all of them, if you don't remember what disk number corresponds to what disk model.

Maybe a tool tip for the tabs would help, too, as it works now for files: the full filename is shown when hovering over a file's tab. For disks it would be the identifying information. Ideally the relevant information for identifying should be visible directly, though. Maybe tabs could be optionally multiline, or a shorthand version is made (of the model), or some additional tab selection view, like a window, that shows a list of all open tabs.

Inevitably, if you have a bigger number of tabs, you will have to scroll, but ideally those that can be seen on one screen, should be distinguishable (not just using arbitrary "Disk x" labels) just by looking at them without further action.

Some thoughts for the future implementation. I'll see how things can be done then.
eyupo92 wrote: 4) There are some errors that happen when a disk is tried to open while the disk is being erased by the application program I am testing. One happens when the disk is open in the HxD tab and I click on View->Refresh button. At that moment, a runtime error message is thrown and when I click on the OK button, HxD shuts down
This is a bug, probably caused by too many exceptions. You used the 64 bit version, right? There should be an error message just once, that the disk cannot be accessed and then the cashed part be shown, and the rest treated as unaccessible.
eyupo92 wrote:When I try to open the disk after restarting HxD, this time I am greeted with another error message, but HxD does not shut down. I guess you might add an exception to the runtime error that happens and display the same message that is displayed after restart. In my case, I know that another application/process has gained exclusive access to the disk, so the error/warning message for this case can be extended to say "Possible reason may be another application or process having exclusive access of the disk."
I guess you are talking about pictures 5, 6, and 7. Just to clarify for later: this error/warning message is expected, but it could include information about the cause. I'll see if Windows can provide the cause from the reported error number, otherwise, I'll add the "in use by another process" or "limited rights" (possible) cause.
eyupo92
Posts: 4
Joined: 06 Jan 2017 17:42

Re: Display disk details on the available disk list

Post by eyupo92 »

Another option to get disk information could be using the free CrystalDiskInfo library. Lots of free and commercial programs are using it to display disk information.

http://crystalmark.info/software/Crysta ... dex-e.html

Best Regards,

Eyup
Post Reply