diff --git a/tools/lvmstrap b/tools/lvmstrap index 7e8f85c527e9c1ce5bd7dd03a97798097dd24919..1cc746d60a4a9daf49ab070f4a52d549e387bd1c 100755 --- a/tools/lvmstrap +++ b/tools/lvmstrap @@ -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