Today I get the disk information through a salt, and return to MySQL, but found a little bit of minion in the table, and then viewed, are some of the new IBM X3650 M4 machines
Then in the Saltstack source found the implementation of Status.diskusage, first see how to implement the disk usage, the following is the source
ret = {}for path in selected: fsstats = OS.STATVFS (path) Blksz = fsstats.f_bsize available = Fsstats.f_bavail * Blksz Total = fsstats.f_blocks * Blksz Ret[path] = {"Available": Available, "All": Total}return ret
Just print out the path and see what it is.
Add on line No. 454 of the salt/modules/status.py file
Print Pathsalt-call-l Debug Status.diskusage
You can see that path has traversed several directories, and the following is the directory
/export/proc/sys/fs/binfmt_misc/proc/home/dev/swap/boot/efi//selinux/proc/bus/usb/net/dev/pts/misc/root/.gvfs
Found/ROOT/.GVFS, because the salt is normal user-initiated, can not read the/root/directory, so first look at this is what to do
[email protected] admin]# mount |grep gvfsgvfs-fuse-daemon on/root/.gvfs type Fuse.gvfs-fuse-daemon (Rw,nosuid,nodev) [ [Email protected] admin]# PS aux|grep/root/.gvfs|grep-v greproot 8810 0.0 0.0 274812 2796? SSL Apr24
[[email protected] admin]# ls-al/root/.gvfs/total usage 4dr-x------. 2 root root 0 April 18:33. dr-xr-x---. root root 4096 May 26 15:51.
The directory is empty, but it is also mounted
After viewing the information, we found that Chinaunix has an explanation, the following is the connection
Http://bbs.chinaunix.net/thread-2004280-1-1.html
Execute command again after uninstallation, ok!
Salt-call error OSError: [Errno] Permission denied: '/root/.gvfs '