kiranvizru / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

psutil.disk_partitions(all=True) does not list iscsi partitions #441

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use psutil.disk_partitions(all=True) 
2. look for iscsi partitions (for example /dev/sde and /dev/sdai as seen by 
fdisk)

What is the expected output?

include these partitions

What do you see instead?

partitions don't appear

What version of psutil are you using? What Python version?

0.5.0 python 2.7.3 (debian)

On what operating system? Is it 32bit or 64bit version?

debian 64

Please provide any additional information below.

Original issue reported on code.google.com by arthur.l...@gmail.com on 9 Oct 2013 at 1:48

GoogleCodeExporter commented 9 years ago
Will look into this later but in the meantime... We're at version 1.1.1. 
0.5.0 was released more than a year ago, so you should try with the latest 
version.

Original comment by g.rodola on 9 Oct 2013 at 2:03

GoogleCodeExporter commented 9 years ago
Why not, if someone made a package for wheezy-backports 
http://packages.debian.org/search?keywords=python-psutil

Original comment by arthur.l...@gmail.com on 9 Oct 2013 at 2:10

GoogleCodeExporter commented 9 years ago
I'm not the one in charge of any Linux packaging but you can easily install 
latest psutil version with pip or easy_install (...and 1.1.1 is *far* better 
than 0.5).
Could you paste the output of "df -a"?
Also, I need to see the output of this command:

python -c "import _psutil_linux; from pprint import pprint as pp; 
pp(_psutil_linux.get_disk_partitions())"

Original comment by g.rodola on 10 Oct 2013 at 10:56

GoogleCodeExporter commented 9 years ago
I sorry, these are production servers, we don't install through pip or 
easy_install, we only install stuff that is packaged for debian (and if it's 
not packaged and we need it, we package it...) 

df -a doesn't display the devices I'm looking for, neither does mount, the 
devices are used by kvm virtual machines. 

python -c "import _psutil_linux; from pprint import pprint as pp; 
pp(_psutil_linux.get_disk_partitions())" 
displays the same kind of info than "df -a"

A quick look at the code made me think that it was based on mtab so there's no 
chance of finding the iscsi devices there. 

Original comment by arthur.l...@gmail.com on 10 Oct 2013 at 11:03

GoogleCodeExporter commented 9 years ago
I implemented psutil.disk_partitions(all=True) with the idea it should reflect 
"df -a"  therefore I'd be keen on not considering this a bug.

iSCSI units look like something quite exotic, which is different than a real 
partition (I don't know much about them, I'm just reading the wikipedia entry) 
therefore I think it's fine for psutil.disk_partitions() to ignore them.
We might add support for them but who knows if that's gonna be portable across 
platforms other than Linux?

In summary to me this looks like something which is not worth implementing.
Might change my mind in case you provide a patch which demonstrates this is not 
too hard to implement and which works well on other POSIX platforms as well.

Original comment by g.rodola on 10 Oct 2013 at 12:17