Closed
Description
Summary
- OS: Ubuntu 20.04
- Architecture: 64bit
- Psutil version: 5.8.0
- Python version: 3.8.10
- Type: core
Description
On a default AWS instance running Ubuntu 20.04, psutil.disk_partitions()
returns /dev/root
instead of /dev/xvda1
.
This is because /proc/mounts
contain this entry:
/dev/root / ext4 rw,relatime,discard 0 0
However, the actual root disk device is /dev/xvda1
. Both mount
and findmnt
do return the right device:
$ mount
/dev/xvda1 on / type ext4 (rw,relatime,discard)
[...]
$ findmnt -n -o SOURCE /
/dev/xvda1
I found some people doing a workaround to call findmnt
manually in this case, but I think this should be handled by psutil.