linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Do we have a way to clone the customer lvm2 environment?
@ 2020-03-12  4:54 Gang He
  2020-03-12  9:36 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: Gang He @ 2020-03-12  4:54 UTC (permalink / raw)
  To: LVM general discussion and development

Hi Guys,

Sometimes we encountered some lvm2 meta-data damage (by lvm2 commands) problems.
Do we have a way to clone (or dump) the customer lvm2 environment? such like file system e2image tool.
for example, we can dump each pv(meta data + data(with file hole)) to a file, 
next we can rebuild the cloned lvm2 environment in local machine.
then, we can verify the fix in local machine with the tentative rpms before give them to the customers.  

Any suggestions for this kind of case?

Thanks
Gang

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] Do we have a way to clone the customer lvm2 environment?
  2020-03-12  4:54 [linux-lvm] Do we have a way to clone the customer lvm2 environment? Gang He
@ 2020-03-12  9:36 ` Zdenek Kabelac
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2020-03-12  9:36 UTC (permalink / raw)
  To: LVM general discussion and development, Gang He

Dne 12. 03. 20 v 5:54 Gang He napsal(a):
> Hi Guys,
> 
> Sometimes we encountered some lvm2 meta-data damage (by lvm2 commands) problems.
> Do we have a way to clone (or dump) the customer lvm2 environment? such like file system e2image tool.
> for example, we can dump each pv(meta data + data(with file hole)) to a file,
> next we can rebuild the cloned lvm2 environment in local machine.
> then, we can verify the fix in local machine with the tentative rpms before give them to the customers.
> 
> Any suggestions for this kind of case?

Hi

Such 'clone' of layout (without actual data) would only work with some basic 
lvm2 segtypes  (linear/stripe).
There is no easy way to 'clone' i.e. thin-pools, raids, caches, snapshots...)

All these complex type have it's own kernel metadata stored with metadata 
device which are 'invisible' to lvm2.

Also what would be a 'clone' a thin-pool with thin LVs without meaningful data 
right ?

ThinLV has an DeviceId which needs to match with kernel thinpool metadata.

Raid legs have their own metadata keeping internal state of raid device....

So my advice how to handle such case is to analyze existing 'lvs' output - see 
which devices likely do matter for actual 'cloning' and just recreate them
with proper lvcreate commmand.

The other way is to use plain 'DD' mechanism for the whole disk.


Regards

Zdenek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-12  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  4:54 [linux-lvm] Do we have a way to clone the customer lvm2 environment? Gang He
2020-03-12  9:36 ` Zdenek Kabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).