#: types of mounts found in /proc/mounts to be ignored in get_all_mounts
IGNORE_MOUNT_TYPES = 'cgroup', 'pstore'
-
-#: filesystems that usually do not correspond to something on disc
-#: (except maybe swap)
-NOT_REAL_FILESYSTEMS = 'none', 'shmfs', 'procfs', 'tmpfs', 'ramfs', 'proc', \
- 'rootfs', 'sysfs', 'devpts', 'sunrpc', 'nfsd'
+#: proper filesystems that usually correspond to data on the disc
+#: (as opposed to tmpfs, rootfs, sysfs, ...)
+REAL_FILESYSTEMS = 'ext2', 'ext3', 'ext4', 'zfs', 'btrs', 'reiserfs', 'nfs4'
class FilesystemFillState:
warn('multiple non-rootfs mounts in same file {0}!'
.format(new_mount.file))
if new_mount.spec in specs \
- and new_mount.spec not in NOT_REAL_FILESYSTEMS:
+ and new_mount.spec in REAL_FILESYSTEMS:
continue # e.g. bind mounts; ignore this mount
# if we reach this, this is no duplicate; remember it
Creation motivated by fear of filling disc space during long-running stress
tests
-.. todo:: Find out why NOT_REAL_FILESYSTEMS generate warnings so quickly even
- if they are still empty
+.. todo:: Find out why fs not in REAL_FILESYSTEMS generate warnings so quickly
+ even if they are still empty
.. codeauthor:: Intra2net
"""
from buffers import LogarithmicBuffer
from file_helpers import get_filesystem_fill_states, FilesystemFillState, \
get_mount_info, get_fill_from_statvfs, \
- NOT_REAL_FILESYSTEMS, size_str
+ REAL_FILESYSTEMS, size_str
from iter_helpers import pairwise
internal helper called from __init__ and run
"""
- if fs_state.name in NOT_REAL_FILESYSTEMS:
+ if fs_state.name not in REAL_FILESYSTEMS:
return []
if fs_state.size == 0:
return []
def get_states():
if mounts is None:
for state in get_filesystem_fill_states():
- if state.name in NOT_REAL_FILESYSTEMS:
+ if state.name not in REAL_FILESYSTEMS:
continue
yield state
else: