Re: how to refresh LV to apply fstrim online

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 25.10.2016 v 16:04 Gianluca Cecchi napsal(a):


On Fri, Oct 21, 2016 at 1:32 AM, Gianluca Cecchi <gianluca.cecchi@xxxxxxxxx
<mailto:gianluca.cecchi@xxxxxxxxx>> wrote:


    On Thu, Oct 20, 2016 at 1:40 PM, Zdenek Kabelac <zkabelac@xxxxxxxxxx
    <mailto:zkabelac@xxxxxxxxxx>> wrote:


        Hi

        Please provide listing of all your 'multipath'  leg devices - are
        they support TRIM ?
        Then 'check' dm device.

        See  (and attach)

         grep "" /sys/block/*/queue/discard_granularity


        Also make sure you are NOT using 'ext2' filesystem which does not
        support discard on RHEL6 and you are on latest available RHEL6 kernel.


        Regards

        Zdenek



    Hello,
    thanks for answer.
    I'm using ext3 filesystem that supports discard.
    Currently I'm on this kernel

    [root@dbatest1 ~]# uname -r
    2.6.32-431.29.2.el6.x86_64
    [root@dbatest1 ~]#


    It seems that I was myself able to find a way to online refresh the
    logical volume and so to successfully run fstrim command against the
    related file system, without deactivating the lv and most important
    without generating downtime for my users.
    Please note that what I'm doing is working on a test system where I have
    the same situation as in production.
    Can you certify my approach and comment about it, so that I can eventually
    apply in production?


[snip]



    [root@dbatest1 ~]# dmsetup suspend /dev/dm-4 ; dmsetup reload /dev/dm-4
    my_dm_table ; dmsetup resume /dev/dm-4
    [root@dbatest1 ~]# echo $?
    0
    [root@dbatest1 ~]#

    And now the magic:

    [root@dbatest1 ~]# fstrim /ALM/rdoffline
t giving downtime, in a safe way.


Normally it's not advised  to use 'dmsetup' command for  LV.
The above sequence should be equivalent to:

lvchange --refresh  vg/lv
(or  vgchange --refresh vg  -  doing it for every active LV in VG)

It's unclear how this could help  - unless you we doing some 'pvmove'
operations (which might be worth a BZ).

You should collect all states  while it 'DOES NOT' work.
And then  run  the --refresh (which you thing it's fixing it for your)
ATM I'm clueless how you get mapping without TRIM where --refresh can fix it.


Regards

Zdenek


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux