Re: [bug] Wrong data from smartctl if disk is 'readonly' / in use
Christian Franke <[email protected]>
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
Martijn wrote: > I've found that smartmontools 6.3 outputs wrong data about a disk, if > the disk is in use by another process. This includes wrong data about > the serial number of the drive, which surprised me (after it scared me > ;-)). I've tested this on a Windows host. > > Attached are two files with the output of smartctl.exe --xall of the > very same disk, once when it is in use by a VirtualBox virtual > machine, and once without. > > There are three important things to notice: > 1. "Serial Number: 20202020202020203431" > I'm not sure what causes smartmontools to think this particular string > is the serial number, but this is not the actual serial number ;-) > It scared me at first, because I thought this serial number was causes > by some sort of problem with the firmware. > > 2. "Warning: Limited functionality due to missing admin rights" and > "Function requires admin rights" > > This is not accurate: I did have admin rights for that particular > shell. Both attached files where created in the same shell, with the > same rights. I would highly recommend a better description of possible > causes, or seperate error messages for seperate cases. The messages about missing admin rights are printed if Windows does not allow full raw R/W access to the disk. Full R/W access is required for the ATA pass-through I/O-controls used to access SMART info. When used by a VirtualBox VM, Windows apparently locks raw R/W access from other programs (which is good). Then the admin rights are not effective for this disk. If the raw device could only be opened in non R/W mode, smartctl uses replacement functions (IOCTL_STORAGE_QUERY_PROPERTY, WMI). These provide only very limited (and sometimes incorrect) info. Thanks, Christian ------------------------------------------------------------------------------