1

Topic: Correspondence physical and logical disks

The people, the help is necessary.
It is necessary in . to deduce logical disks and physical disks corresponding to them. The decision on Windows and on  is interesting. That that at me anything sensible does not quit.

2

Re: Correspondence physical and logical disks

SergeyOlegovich;
In Windows there is a console utility diskpart

3

Re: Correspondence physical and logical disks

[spoiler wmic diskdrive get Partitions, DeviceID, Model, Size]

 DeviceID Model Partitions Size
\\.\PHYSICALDRIVE0 ST350041 8AS SATA Disk Device 2 500105249280
\\.\PHYSICALDRIVE1 WDC WD10 EZRZ-00Z5HB0 SATA Disk Device 2 1000202273280
\\.\PHYSICALDRIVE2 Espada EDM-eUSB.1-08GMI USB Device 1 8093675520 

[/spoiler] [spoiler wmic volume get deviceid, driveletter, label]

 DeviceID DriveLetter Label
\\? \Volume {6933e941-cd51-11e7-8002-806e6f6e6963} \A C: ST50_171120
\\? \Volume {6933e943-cd51-11e7-8002-806e6f6e6963} \WD1T-BOOT
\\? \Volume {6933e955-cd51-11e7-8002-806e6f6e6963} \ESP8-DOM
\\? \Volume {6933e942-cd51-11e7-8002-806e6f6e6963} \ST50-TEST
\\? \Volume {6933e944-cd51-11e7-8002-806e6f6e6963} \D: WD1T-Data
\\? \Volume {6933e947-cd51-11e7-8002-806e6f6e6963} \Z: 

[/spoiler] [spoiler detailing of disks]

 @echo off
setlocal
set _count=0
type nul> "%TMP %\.lst"
for/f %% A in (' wmic diskdrive get deviceid ^ | find "\. \" ') do call:write-script
diskpart-s "%TMP %\.lst"
set _count =
del "%TMP %\.lst"
goto:EOF
:write-script
(echo select disk % _count %
echo detail disk)>> "%TMP %\.lst"
set/a _count = _ count + 1
goto:EOF
setlocal 

[/spoiler]

4

Re: Correspondence physical and logical disks

Hogwash wrote: [spoiler wmic partition get name, diskindex, size]

 DiskIndex Name Size
0 Disk #0, Partition #0 430626045952
0 Disk #0, Partition #1 69479718912
1 Disk #1, Partition #0 524288000
1 Disk #1, Partition #1 999678500864
2 Disk #2, Partition #0 8098152448 

[/spoiler]

5

Re: Correspondence physical and logical disks

Basil A. Sidorov;
Yes, thanks, on Windows just reached such command. It was necessary  WMI this. It approximately that is necessary))