* [linux-lvm] Two questions about lvm-cache
@ 2016-12-29 13:52 Raman Gupta
2017-01-02 15:15 ` Zdenek Kabelac
0 siblings, 1 reply; 5+ messages in thread
From: Raman Gupta @ 2016-12-29 13:52 UTC (permalink / raw)
To: linux-lvm
I am trying out the lvmcache functionality. So far, everything looks
great. I have two questions:
1) The man page of lvmcache states "With the --cachemode option, the
cache mode can be set when creating a cache LV, or changed on an
existing cache LV." However, I can't figure out the right command to
change the cache mode on an existing LV.
# lvs -a -o +devices
(see https://paste.fedoraproject.org/514698/83019352/raw/)
# lvs -o cache_mode vg_raid10/lv_var
CacheMode
writethrough
# lvconvert --verbose --cachemode writeback vg_raid10/lv_var
(no output)
# lvs -o cache_mode vg_raid10/lv_var
CacheMode
writethrough
# lvconvert --verbose --type cache \
--cachepool vg_raid10/lv_cache_pool_var \
--cachemode writeback vg_raid10/lv_var
Executing: /usr/sbin/modprobe dm-cache-mq
Executing: /usr/sbin/modprobe dm-cache-smq
Cache is not supported with cache segment type of the original
logical volume vg_raid10/lv_var.
2) Does lvm manage TRIM on the cache device? Normally I set up SSD
volumes with a weekly fstrim, but that only works for mounted filesystems.
Thanks!
Raman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Two questions about lvm-cache
2016-12-29 13:52 [linux-lvm] Two questions about lvm-cache Raman Gupta
@ 2017-01-02 15:15 ` Zdenek Kabelac
2017-01-02 15:29 ` Raman Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Zdenek Kabelac @ 2017-01-02 15:15 UTC (permalink / raw)
To: LVM general discussion and development
Dne 29.12.2016 v 14:52 Raman Gupta napsal(a):
> I am trying out the lvmcache functionality. So far, everything looks
> great. I have two questions:
>
> 1) The man page of lvmcache states "With the --cachemode option, the
> cache mode can be set when creating a cache LV, or changed on an
> existing cache LV." However, I can't figure out the right command to
> change the cache mode on an existing LV.
Hi
'change' of cachemode is 'lvchange' operation
>
> # lvs -a -o +devices
> (see https://paste.fedoraproject.org/514698/83019352/raw/)
>
> # lvs -o cache_mode vg_raid10/lv_var
> CacheMode
> writethrough
>
> # lvconvert --verbose --cachemode writeback vg_raid10/lv_var
> (no output)
>
> # lvs -o cache_mode vg_raid10/lv_var
> CacheMode
> writethrough
>
> # lvconvert --verbose --type cache \
> --cachepool vg_raid10/lv_cache_pool_var \
> --cachemode writeback vg_raid10/lv_var
> Executing: /usr/sbin/modprobe dm-cache-mq
> Executing: /usr/sbin/modprobe dm-cache-smq
> Cache is not supported with cache segment type of the original
> logical volume vg_raid10/lv_var.
Lvconvert is typically for conversion of one LV type to another LV type.
I.e. uncached LV into cache LV linear LV into cache data LV and so on...
However we may eventually one day add support for driving some
'change' operations via 'lvconvert' in case the syntax is clear and
can't cause internal tool confusion...
> 2) Does lvm manage TRIM on the cache device? Normally I set up SSD
> volumes with a weekly fstrim, but that only works for mounted filesystems.
I think there is currently no support for TRIM passthrough on cached LVs -
these limitation might be relaxed in future versions of dm drivers.
(i.e. SSD typically needs 512K blocks for 'meaningful' TRIM while cache
blocks is usually smaller)
Regards
Zdenek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Two questions about lvm-cache
2017-01-02 15:15 ` Zdenek Kabelac
@ 2017-01-02 15:29 ` Raman Gupta
2017-01-02 16:20 ` Zdenek Kabelac
0 siblings, 1 reply; 5+ messages in thread
From: Raman Gupta @ 2017-01-02 15:29 UTC (permalink / raw)
To: linux-lvm
On 02/01/17 10:15 AM, Zdenek Kabelac wrote:
> Dne 29.12.2016 v 14:52 Raman Gupta napsal(a):
>> I am trying out the lvmcache functionality. So far, everything looks
>> great. I have two questions:
>>
>> 1) The man page of lvmcache states "With the --cachemode option, the
>> cache mode can be set when creating a cache LV, or changed on an
>> existing cache LV." However, I can't figure out the right command to
>> change the cache mode on an existing LV.
>
>
> Hi
>
>
> 'change' of cachemode is 'lvchange' operation
Hmm, there is no mention of cachemode change in `lvchange` man page
(nor a reference from `lvmcache` man page). Guessing at the syntax,
still no luck:
# lvchange --verbose --cachemode writeback vg_raid10/lv_var
lvchange: unrecognized option '--cachemode'
Error during parsing of command line.
Regards,
Raman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Two questions about lvm-cache
2017-01-02 15:29 ` Raman Gupta
@ 2017-01-02 16:20 ` Zdenek Kabelac
2017-01-02 16:57 ` Raman Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Zdenek Kabelac @ 2017-01-02 16:20 UTC (permalink / raw)
To: LVM general discussion and development
Dne 2.1.2017 v 16:29 Raman Gupta napsal(a):
> On 02/01/17 10:15 AM, Zdenek Kabelac wrote:
>> Dne 29.12.2016 v 14:52 Raman Gupta napsal(a):
>>> I am trying out the lvmcache functionality. So far, everything looks
>>> great. I have two questions:
>>>
>>> 1) The man page of lvmcache states "With the --cachemode option, the
>>> cache mode can be set when creating a cache LV, or changed on an
>>> existing cache LV." However, I can't figure out the right command to
>>> change the cache mode on an existing LV.
>>
>>
>> Hi
>>
>>
>> 'change' of cachemode is 'lvchange' operation
>
> Hmm, there is no mention of cachemode change in `lvchange` man page
> (nor a reference from `lvmcache` man page). Guessing at the syntax,
> still no luck:
>
> # lvchange --verbose --cachemode writeback vg_raid10/lv_var
> lvchange: unrecognized option '--cachemode'
> Error during parsing of command line.
>
Please use some more recent version of lvm2 ( > 2.02.155)
The newer the better...
Regards
Zdenek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Two questions about lvm-cache
2017-01-02 16:20 ` Zdenek Kabelac
@ 2017-01-02 16:57 ` Raman Gupta
0 siblings, 0 replies; 5+ messages in thread
From: Raman Gupta @ 2017-01-02 16:57 UTC (permalink / raw)
To: linux-lvm
On 02/01/17 11:20 AM, Zdenek Kabelac wrote:
>>
>> # lvchange --verbose --cachemode writeback vg_raid10/lv_var
>> lvchange: unrecognized option '--cachemode'
>> Error during parsing of command line.
>>
>
>
> Please use some more recent version of lvm2 ( > 2.02.155)
> The newer the better...
Ah, thank you. F23 has only .150 available. That explains it.
Regards,
Raman
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-02 16:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-29 13:52 [linux-lvm] Two questions about lvm-cache Raman Gupta
2017-01-02 15:15 ` Zdenek Kabelac
2017-01-02 15:29 ` Raman Gupta
2017-01-02 16:20 ` Zdenek Kabelac
2017-01-02 16:57 ` Raman Gupta
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.