Skip to content
Snippets Groups Projects
Commit 6714256c authored by Iustin Pop's avatar Iustin Pop
Browse files

lvmstrap: add more excluded FS types


Also moves the list of excluded types to the top level and make it a
frozenset.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 1ca54b6e
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,18 @@ SUPPORTED_TYPES = [
"ubd",
]
#: Excluded filesystem types
EXCLUDED_FS = frozenset([
"nfs",
"nfs4",
"autofs",
"tmpfs",
"proc",
"sysfs",
"usbfs",
"devpts",
])
class Error(Exception):
"""Generic exception"""
......@@ -460,7 +472,7 @@ def GetMountInfo():
for line in mountlines:
_, mountpoint, fstype, _ = line.split(None, 3)
# fs type blacklist
if fstype in ["nfs", "nfs4", "autofs", "tmpfs", "proc", "sysfs"]:
if fstype in EXCLUDED_FS:
continue
try:
dev = os.stat(mountpoint).st_dev
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment