[rhinstaller/blivet/pulls/156 master] LVM cache detection, manipulation and reporting

vpodzime installerbot-noreply at redhat.com
Thu Jun 25 08:26:18 UTC 2015


> @@ -847,6 +859,28 @@ def removeInternalLV(self, int_lv):
>                                                                                         self.name)
>              raise ValueError(msg)
>  
> +    @property
> +    def cached(self):
> +        return bool(self.cache)
> +
> +    @property
> +    def cache(self):
> +        if self.exists and not self._cache:
> +            # check if we have a cache pool internal LV
> +            pool = None
> +            for lv in self._internal_lvs:
> +                if isinstance(lv, LVMCachePoolLogicalVolumeDevice):
> +                    pool = lv
> +
> +            self._cache = LVMCache(self, size=pool.size, exists=True)
> +
> +        return self._cache

Wow, good catch, thanks!

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/156#discussion_r33232116


More information about the anaconda-patches mailing list