def unmount(self):

        for volume in self.volumes:
            volume.unmount()

        if self.loopback and self.volume_group:
            try:
                _util.check_call_(["lvm", 'vgchange', '-a', 'n', self.volume_group], stdout=subprocess.PIPE)
            except Exception:
                return False

            self.volume_group = ""

        if self.loopback and self.luks_path:
            try:
                _util.check_call_(['cryptsetup', 'luksClose', self.luks_path], stdout=subprocess.PIPE)
            except Exception:
                return False

            self.luks_path = ""

        if self.bde_path:
            if not _util.clean_unmount(['fusermount', '-u'], self.bde_path):
                return False

            self.bde_path = ""

        if self.loopback:
            try:
                _util.check_call_(['losetup', '-d', self.loopback])
            except Exception:
                return False

            self.loopback = ""

        if self.bindmountpoint:
            if not _util.clean_unmount(['umount'], self.bindmountpoint, rmdir=False):
                return False

            self.bindmountpoint = ""

        if self.mountpoint:
            if not _util.clean_unmount(['umount'], self.mountpoint):
                return False

            self.mountpoint = ""

        if self.carvepoint:
            try:
                shutil.rmtree(self.carvepoint)
            except OSError:
                return False
            else:
                self.carvepoint = ""

        return True
Unounts the volume from the filesystem.
dataset/ETHPy150Open ralphje/imagemounter/imagemounter/volume.py/Volume.unmount