balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
238 stars 90 forks source link

Windows Storage Spaces are enumerated #263

Open jhermsmeier opened 6 years ago

jhermsmeier commented 6 years ago

See https://github.com/resin-io/etcher/issues/2116

robinwassen commented 6 years ago

I do have two physical disks setup as a Storage Space on my PC, so this issue is easy to reproduce for me.

But what is the expected results regarding a Storage Spaces disk/array?

The following is output from my PC on master HEAD , the last entry is the Storage Space. The only thing that I would think of changing is the isVirtual flag to true which a storage space kind of is.

PS D:\dev\drivelist> node .\example\
[ { enumerator: 'IDE',
    busType: 'ATA',
    busVersion: '1.0',
    device: '\\\\.\\PhysicalDrive0',
    devicePath: null,
    raw: '\\\\.\\PhysicalDrive0',
    description: 'Samsung SSD 850 EVO 500GB ATA Device',
    error: null,
    size: 500107862016,
    blockSize: 512,
    logicalBlockSize: 512,
    mountpoints: [ { path: 'C:\\' } ],
    isReadOnly: false,
    isSystem: true,
    isVirtual: false,
    isRemovable: false,
    isCard: false,
    isSCSI: false,
    isUSB: false,
    isUAS: false },
  { enumerator: 'IDE',
    busType: 'ATA',
    busVersion: '1.0',
    device: '\\\\.\\PhysicalDrive3',
    devicePath: null,
    raw: '\\\\.\\PhysicalDrive3',
    description: 'ST1500DL003-9VT16L ATA Device',
    error: null,
    size: 1500301910016,
    blockSize: 512,
    logicalBlockSize: 512,
    mountpoints: [ { path: 'F:\\' } ],
    isReadOnly: false,
    isSystem: true,
    isVirtual: false,
    isRemovable: false,
    isCard: false,
    isSCSI: false,
    isUSB: false,
    isUAS: false },
  { enumerator: 'STORAGE',
    busType: 'INVALID',
    busVersion: '0.1',
    device: '\\\\.\\PhysicalDrive4',
    devicePath: null,
    raw: '\\\\.\\PhysicalDrive4',
    description: 'Microsoft Storage Space Device',
    error: null,
    size: 196494753792,
    blockSize: 4096,
    logicalBlockSize: 4096,
    mountpoints: [ { path: 'D:\\' } ],
    isReadOnly: false,
    isSystem: false,
    isVirtual: false,
    isRemovable: false,
    isCard: false,
    isSCSI: false,
    isUSB: false,
    isUAS: false } ]