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

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

Closed
giampaolo opened this issue May 23, 2014 · 6 comments
Closed

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

giampaolo opened this issue May 23, 2014 · 6 comments

Comments

@giampaolo
Copy link
Owner

From arthur.l...@gmail.com on October 09, 2013 15:48:15

1. use psutil.disk_partitions(all=True) 
2. look for iscsi partitions (for example /dev/sde and /dev/sdai as seen by fdisk) 

partitions don't appear.

Original issue: http://code.google.com/p/psutil/issues/detail?id=441

@giampaolo
Copy link
Owner Author

From g.rodola on October 09, 2013 07:03:23

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.

@giampaolo
Copy link
Owner Author

From arthur.l...@gmail.com on October 09, 2013 07:10:58

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

@giampaolo
Copy link
Owner Author

From g.rodola on October 10, 2013 03:56:47

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())"

Labels: OpSys-Linux

@giampaolo
Copy link
Owner Author

From arthur.l...@gmail.com on October 10, 2013 04:03:49

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.

@giampaolo
Copy link
Owner Author

From g.rodola on October 10, 2013 05:17:03

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.

@giampaolo
Copy link
Owner Author

Outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant