Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] disk_partitions(all=True) only returns mountpoints on drives where it first finds one #1598

Closed
ian28223 opened this issue Oct 2, 2019 · 4 comments · Fixed by #1961

Comments

@ian28223
Copy link

ian28223 commented Oct 2, 2019

Platform

  • detected on Windows Server 2019 but may not be isolated to that version
  • psutil 5.6.3

Bug description

Somewhat related to #1192
Above works but once it finds a mountpoint on a drive letter, it will not look for mountpoints on next drive letters.

Example:
Given 3 drive letters, C:, D:, Z:.

  • case 1: mountpoints on C, D and Z

    • mount C:/mnt1/ - detected/returned by psutil
    • mount C:/mnt2/ - detected/returned by psutil
    • mount D:/mnt3/ - not returned
    • mount Z:/mnt4/ - not returned
  • case 2: no mount points on C:

    • mounts in C:/ - none
    • mount D:/mnt3/ - detected/returned by psutil
    • mount Z:/mnt4/ - not returned

Expectation is that all mountpoints from all drives are returned.

traceback message (if any)
import psutil
psutil.disk_partitions(all=True)
@ian28223 ian28223 added the bug label Oct 2, 2019
@rankaiyx
Copy link

#1776
I meet the same trouble

@ajdurr
Copy link

ajdurr commented Jun 25, 2020

Same issue I am seeing

@rankaiyx
Copy link

Same issue I am seeing
You can try this the cmd command:
diskperf -y

@ajdurr
Copy link

ajdurr commented Jul 9, 2020

I reviewed #1776 and it does not appear related to this one.

mx-psi added a commit to mx-psi/psutil that referenced this issue Jun 23, 2021
This fixes giampaolo#1598; before this only the first drive partitions were gathered.

Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
mx-psi added a commit to mx-psi/psutil that referenced this issue Jun 23, 2021
This fixes giampaolo#1598; before this only the first drive partitions were gathered.

Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
mx-psi added a commit to mx-psi/psutil that referenced this issue Jun 23, 2021
This fixes giampaolo#1598; before this only the first drive partitions were gathered.

Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants