Created
November 17, 2015 16:16
-
-
Save t0mmyt/005dad990cde059234fb to your computer and use it in GitHub Desktop.
LVM cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@localhost ~]# lvcreate -L 10G -n root_cache fedora /dev/sdb2 | |
| Logical volume "root_cache" created. | |
| [root@localhost ~]# lvcreate -L 20M -n root_cache_meta fedora /dev/sdb2 | |
| Logical volume "root_cache_meta" created. | |
| [root@localhost ~]# man lvconvert | |
| [root@localhost ~]# lvconvert --type cache-pool --cachemode writeback --poolmetadata fedora/root_cache_meta fedora/root_cache | |
| WARNING: Converting logical volume fedora/root_cache and fedora/root_cache_meta to pool's data and metadata volumes. | |
| THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) | |
| Do you really want to convert fedora/root_cache and fedora/root_cache_meta? [y/n]: y | |
| Converted fedora/root_cache to cache pool. | |
| [root@localhost ~]# lvconvert --type cache-pool --cachemode writeback --poolmetadata fedora/root_cache_meta fedora/^Cache | |
| [root@localhost ~]# lvcreate -L 100M -n home_cache_meta fedora /dev/sdb2 | |
| Logical volume "home_cache_meta" created. | |
| [root@localhost ~]# lvcreate -L 100G -n home_cache fedora /dev/sdb2 | |
| Logical volume "home_cache" created. | |
| [root@localhost ~]# lvconvert --type cache-pool --cachemode writeback --poolmetadata fedora/home_cache_meta fedora/home_cache | |
| WARNING: Converting logical volume fedora/home_cache and fedora/home_cache_meta to pool's data and metadata volumes. | |
| THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) | |
| Do you really want to convert fedora/home_cache and fedora/home_cache_meta? [y/n]: y | |
| Converted fedora/home_cache to cache pool. | |
| [root@localhost ~]# lvconvert --type cache --cachepool fedora/home_cache fedora/home | |
| Logical volume fedora/home is now cached. | |
| [root@localhost ~]# lvconvert --type cache --cachepool fedora/root_cache fedora/root | |
| Logical volume fedora/root is now cached. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment