general:linux:lvmcache
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| general:linux:lvmcache [2020/11/17 22:19] – created sunkan | general:linux:lvmcache [2021/02/11 08:25] (current) – [And now reattach the cache] sunkan | ||
|---|---|---|---|
| Line 184: | Line 184: | ||
| WARNING: Cached thin pool's data cannot be currently resized and require manual uncache before resize! | WARNING: Cached thin pool's data cannot be currently resized and require manual uncache before resize! | ||
| Logical volume F3_2TB/ | Logical volume F3_2TB/ | ||
| + | </ | ||
| + | |||
| + | ===== Extending size of ThinPool0 ===== | ||
| + | ==== Remove caching from the thinpool ==== | ||
| + | As it does not seem to be possible to extend a cached thinpool, we first need to remove the cache. | ||
| + | Follow first two steps above from section " | ||
| + | |||
| + | Some - before information | ||
| + | < | ||
| + | bigbang:~# lvdisplay -a F3_2TB/ | ||
| + | --- Logical volume --- | ||
| + | Internal LV Name | ||
| + | VG Name F3_2TB | ||
| + | LV UUID Fyc9Md-c1XD-xpib-dJDw-Obr4-SYL5-G88yqS | ||
| + | LV Write Access | ||
| + | LV Creation host, time bigbang, 2019-10-12 14:17:30 +0200 | ||
| + | LV Cache pool name | ||
| + | LV Cache origin name | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size 500.00 GiB | ||
| + | Cache used blocks | ||
| + | Cache metadata blocks | ||
| + | Cache dirty blocks | ||
| + | Cache read hits/misses 644218163 / 453243621 | ||
| + | Cache wrt hits/ | ||
| + | Cache demotions | ||
| + | Cache promotions | ||
| + | Current LE | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | bigbang:~# lvchange --cachemode writethrough F3_2TB/ | ||
| + | Flushing 55 blocks for cache F3_2TB/ | ||
| + | Logical volume F3_2TB/ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | bigbang:~# lvconvert --splitcache F3_2TB/ | ||
| + | Logical volume F3_2TB/ | ||
| + | </ | ||
| + | ==== Now extend the ThinPool0 LV ==== | ||
| + | < | ||
| + | bigbang:~# lvextend -L 1t F3_2TB/ | ||
| + | Size of logical volume F3_2TB/ | ||
| + | Logical volume F3_2TB/ | ||
| + | </ | ||
| + | |||
| + | ==== And now reattach the cache ==== | ||
| + | Do the last step from section " | ||
| + | |||
| + | < | ||
| + | bigbang:~# lvconvert --type cache --cachemode writeback --cachepool F3_2TB/ | ||
| + | Do you want wipe existing metadata of cache pool F3_2TB/ | ||
| + | WARNING: Cached thin pool's data cannot be currently resized and require manual uncache before resize! | ||
| + | Logical volume F3_2TB/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | And some " | ||
| + | < | ||
| + | bigbang:~# lvdisplay -a F3_2TB/ | ||
| + | --- Logical volume --- | ||
| + | Internal LV Name | ||
| + | VG Name F3_2TB | ||
| + | LV UUID Fyc9Md-c1XD-xpib-dJDw-Obr4-SYL5-G88yqS | ||
| + | LV Write Access | ||
| + | LV Creation host, time bigbang, 2019-10-12 14:17:30 +0200 | ||
| + | LV Cache pool name | ||
| + | LV Cache origin name | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size 1.00 TiB | ||
| + | Cache used blocks | ||
| + | Cache metadata blocks | ||
| + | Cache dirty blocks | ||
| + | Cache read hits/misses 0 / 36 | ||
| + | Cache wrt hits/ | ||
| + | Cache demotions | ||
| + | Cache promotions | ||
| + | Current LE | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| </ | </ | ||
general/linux/lvmcache.1605651555.txt.gz · Last modified: 2020/11/17 22:19 by sunkan