All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Repair thin pool
@ 2016-02-05  1:21 Mars
  2016-02-05 11:44 ` M.H. Tsai
  2016-02-06 14:10 ` M.H. Tsai
  0 siblings, 2 replies; 16+ messages in thread
From: Mars @ 2016-02-05  1:21 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]

Hi there,

We're using Centos 7.0 with lvm 2.02.105 and met a problem as underlying:
After a electricity powerdown in the datacenter room, thin provision
volumes came up with wrong states:

*[root@storage ~]# lvs -a*
*  dm_report_object: report function failed for field data_percent*
*  LV                              VG               Attr       LSize
Pool        Origin           Data%  Move Log Cpy%Sync Convert*
*  DailyBuild                      vgg145155121036c Vwi-d-tz--   5.00t
pool_nas                                     *
*  dat                             vgg145155121036c Vwi-d-tz--  10.00t
pool_nas                                         *
*  lvol0                           vgg145155121036c -wi-a-----
15.36g                                                              *
*  [lvol3_pmspare]                 vgg145155121036c ewi-------  15.27g*
*  market                          vgg145155121036c Vwi-d-tz--   3.00t
pool_nas                    *
*  pool_nas                        vgg145155121036c twi-a-tz--
14.90t                                0.00                          *
*  [pool_nas_tdata]                vgg145155121036c Twi-ao----
14.90t                                                              *
*  [pool_nas_tmeta]                vgg145155121036c ewi-ao----  15.27g

                                       *
*  share                           vgg145155121036c Vwi-d-tz--  10.00t
pool_nas*


 the thin pool "pool_nas" and general lv "lvol0" are active, but thin
provision volumes cannot be actived even with cmd "lvchange -ay
thin_volume_name".

To recover it, we tried following ways refer to these mail conversations:
http://www.spinics.net/lists/lvm/msg22629.html and
http://comments.gmane.org/gmane.linux.lvm.general/14828.

1, USE: "lvconvert --repair vgg145155121036c/pool_nas"
output as below and thin volumes still cannot be active.
WARNING: If everything works, remove "vgg145155121036c/pool_nas_tmeta0".
WARNING: Use pvmove command to move "vgg145155121036c/pool_nas_tmeta" on
the best fitting PV.

2, USE manual repair steps:
2a: inactive thin pool.
2b: create a temp lv "metabak".
2c: swap the thin pool's metadata lv: "lvconvert --thinpool vgg145155121036
c/pool_nas --poolmetadata metabak -y", only with "-y" option can submit the
command.
2d: active temp lv "metabak" and create another bigger lv "metabak1".
2e: repair metadata: "thin_restore -i /dev/vgg145155121036c/metabak-o /dev/
vgg145155121036c/metabak1", and got segment fault.

So, is there any other way to recover this or some steps we do wrong?

Thank you very much.
Mars

[-- Attachment #2: Type: text/html, Size: 12176 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [linux-lvm] Repair thin pool
@ 2016-02-17  2:48 Mars
  2016-02-17  9:29 ` M.H. Tsai
  0 siblings, 1 reply; 16+ messages in thread
From: Mars @ 2016-02-17  2:48 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

2016-02-10 18:32 GMT+08:00 Joe Thornber <thornber redhat com>:

> Yep, I definitely want these for upstream.  Send me what you've got,

> whatever state it's in; I'll happily spend a couple of weeks tidying

> this.

>

> - Joe

The feature was completed & workable, but the code is based on v0.4.1.

I need some days to clean up & rebase. Please wait.

syntax:

thin_ll_dump /dev/mapper/corrupted_tmeta [-o thin_ll_dump.xml]

thin_ll_restore -i edited_thin_ll_dump.xml -E

/dev/mapper/corrupted_tmeta -o /dev/mapper/fixed_tmeta

Ming-Hung Tsai

-------------

Hi,

Thank you very much for giving us so many advices.


Here are some progresses based on you guys mail conversations:

1,check metadata device:

[root@stor14 home]# thin_check /dev/mapper/vgg145155121036c-pool_nas_tmeta0
examining superblock
examining devices tree
examining mapping tree

2,dump metadata info:

[root@stor14 home]# thin_dump
/dev/mapper/vgg145155121036c-pool_nas_tmeta0 -o nas_thin_dump.xml -r
[root@stor14 home]# cat nas_thin_dump.xml
<superblock uuid="" time="1787" transaction="3545"
data_block_size="128" nr_data_blocks="249980672">
</superblock>

Compared with other normal pools, it seems like all device nodes and
mapping info in the metadata lv have lost.

Is there happened to be 'orphan nodes'? and could you give us your
semi-auto repair tools so we can repair it?


Thank you very much!

Mars

[-- Attachment #2: Type: text/html, Size: 2752 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <CAGU4k=0B-uXUvc0gNyYH3eF62tNWoGBWVpqg826YH6Xo1Gp4Aw@mail.gmail.com>]

end of thread, other threads:[~2016-02-23 12:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-05  1:21 [linux-lvm] Repair thin pool Mars
2016-02-05 11:44 ` M.H. Tsai
2016-02-05 15:17   ` Zdenek Kabelac
2016-02-05 16:12     ` M.H. Tsai
2016-02-05 17:28       ` Zdenek Kabelac
2016-02-06 13:14         ` M.H. Tsai
2016-02-08  8:56   ` Joe Thornber
2016-02-08 18:03     ` M.H. Tsai
2016-02-10 10:32       ` Joe Thornber
2016-02-14  8:54         ` M.H. Tsai
2016-02-06 14:10 ` M.H. Tsai
  -- strict thread matches above, loose matches on Subject: below --
2016-02-17  2:48 Mars
2016-02-17  9:29 ` M.H. Tsai
     [not found] <CAGU4k=0B-uXUvc0gNyYH3eF62tNWoGBWVpqg826YH6Xo1Gp4Aw@mail.gmail.com>
2016-02-18 14:22 ` M.H. Tsai
2016-02-21 15:41 ` M.H. Tsai
2016-02-23 12:12   ` M.H. Tsai

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.