* [linux-lvm] Backup superblock for thin provision?
@ 2016-05-13 10:39 Gionatan Danti
2016-05-16 18:55 ` Mike Snitzer
0 siblings, 1 reply; 5+ messages in thread
From: Gionatan Danti @ 2016-05-13 10:39 UTC (permalink / raw)
To: LVM general discussion and development
Hi all,
using thin provisioning in production machines (using it mostly for its
fast snapshot support, rather than for thin provision / storage
overcommit by itself), I wonder what to do if a critical metadata
corruption, as the loss of the superblock, should happen.
Filesystems generally have some backup copy of the superblock; should
the primary one fail, another copy can be used.
So I have the following questions:
- how about thin LVM? Has it a backup superblock somewhere?
- how can the metadata be reliable backupped without shutting down the
volume?
- more generally, how to deal with metadata backup? Does vgcfgrestore
works for thin volumes?
Thank you all.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Backup superblock for thin provision?
2016-05-13 10:39 [linux-lvm] Backup superblock for thin provision? Gionatan Danti
@ 2016-05-16 18:55 ` Mike Snitzer
2016-05-17 9:10 ` Zdenek Kabelac
2016-05-17 13:18 ` Gionatan Danti
0 siblings, 2 replies; 5+ messages in thread
From: Mike Snitzer @ 2016-05-16 18:55 UTC (permalink / raw)
To: Gionatan Danti; +Cc: LVM general discussion and development
On Fri, May 13 2016 at 6:39am -0400,
Gionatan Danti <g.danti@assyoma.it> wrote:
> Hi all,
> using thin provisioning in production machines (using it mostly for
> its fast snapshot support, rather than for thin provision / storage
> overcommit by itself), I wonder what to do if a critical metadata
> corruption, as the loss of the superblock, should happen.
>
> Filesystems generally have some backup copy of the superblock;
> should the primary one fail, another copy can be used.
>
> So I have the following questions:
> - how about thin LVM? Has it a backup superblock somewhere?
> - how can the metadata be reliable backupped without shutting down
> the volume?
> - more generally, how to deal with metadata backup? Does
> vgcfgrestore works for thin volumes?
>
> Thank you all.
There is more to the thinp metadata than just the metadata superblock.
The DM thin-pool's metadata device was purposely split out from the data
device to allow for additional metadata fault protection using RAID.
I'll defer to the LVM developers for if/how LVM can be used to have
thinp metadata redundancy even if you don't have multiple devices to be
able to use a conventional RAID device.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Backup superblock for thin provision?
2016-05-16 18:55 ` Mike Snitzer
@ 2016-05-17 9:10 ` Zdenek Kabelac
2016-05-17 13:22 ` Gionatan Danti
2016-05-17 13:18 ` Gionatan Danti
1 sibling, 1 reply; 5+ messages in thread
From: Zdenek Kabelac @ 2016-05-17 9:10 UTC (permalink / raw)
To: LVM general discussion and development, Gionatan Danti
On 16.5.2016 20:55, Mike Snitzer wrote:
> On Fri, May 13 2016 at 6:39am -0400,
> Gionatan Danti <g.danti@assyoma.it> wrote:
>
>> Hi all,
>> using thin provisioning in production machines (using it mostly for
>> its fast snapshot support, rather than for thin provision / storage
>> overcommit by itself), I wonder what to do if a critical metadata
>> corruption, as the loss of the superblock, should happen.
>>
>> Filesystems generally have some backup copy of the superblock;
>> should the primary one fail, another copy can be used.
>>
>> So I have the following questions:
>> - how about thin LVM? Has it a backup superblock somewhere?
>> - how can the metadata be reliable backupped without shutting down
>> the volume?
>> - more generally, how to deal with metadata backup? Does
>> vgcfgrestore works for thin volumes?
>>
>> Thank you all.
>
> There is more to the thinp metadata than just the metadata superblock.
>
> The DM thin-pool's metadata device was purposely split out from the data
> device to allow for additional metadata fault protection using RAID.
>
> I'll defer to the LVM developers for if/how LVM can be used to have
> thinp metadata redundancy even if you don't have multiple devices to be
> able to use a conventional RAID device.
There is always the option to take 'metadata' snapshot and just
thin_dump content of metadata to a file (located in some 'safe' place)
However validation of 'restore' if there are some 'snapshots' is questionable
as the b-tree describing mapped blocks may change significantly
so 'rescued' content may than reference lots of bad blocks.
If you want to just protect 'superblock' against disk fault - usage
of 'raid' could be an option - but ATM there are some 'related' costs with
management of 'stacked' device tree.
Regards
Zdenek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Backup superblock for thin provision?
2016-05-17 9:10 ` Zdenek Kabelac
@ 2016-05-17 13:22 ` Gionatan Danti
0 siblings, 0 replies; 5+ messages in thread
From: Gionatan Danti @ 2016-05-17 13:22 UTC (permalink / raw)
To: Zdenek Kabelac, LVM general discussion and development
>
> There is always the option to take 'metadata' snapshot and just
> thin_dump content of metadata to a file (located in some 'safe' place)
>
Something as "dmsetup reserve_metadata_snap", thin_dump, "dmsetup
release_metadata_snap" ? If so, I'm already using for testing purpose ;)
> However validation of 'restore' if there are some 'snapshots' is
> questionable as the b-tree describing mapped blocks may change
> significantly
> so 'rescued' content may than reference lots of bad blocks.
Sure, with snapshots the situation is surely more complex, as due to the
CoW the old metadata can point to stale data, right?
>
> If you want to just protect 'superblock' against disk fault - usage
> of 'raid' could be an option - but ATM there are some 'related' costs
> with management of 'stacked' device tree.
>
Both my tmeta and tdata reside on a RAID6 array provided by a
BBU-protected RAID card, so I should be safe here.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Backup superblock for thin provision?
2016-05-16 18:55 ` Mike Snitzer
2016-05-17 9:10 ` Zdenek Kabelac
@ 2016-05-17 13:18 ` Gionatan Danti
1 sibling, 0 replies; 5+ messages in thread
From: Gionatan Danti @ 2016-05-17 13:18 UTC (permalink / raw)
To: Mike Snitzer; +Cc: LVM general discussion and development
On 16/05/2016 20:55, Mike Snitzer wrote:
>
> There is more to the thinp metadata than just the metadata superblock.
>
> The DM thin-pool's metadata device was purposely split out from the data
> device to allow for additional metadata fault protection using RAID.
>
> I'll defer to the LVM developers for if/how LVM can be used to have
> thinp metadata redundancy even if you don't have multiple devices to be
> able to use a conventional RAID device.
>
Sure - I'm using thinp on a RAID6 volume, with two disks redundancy.
But what about an user error, or a lvm-related bug, which invalidate the
superblock? In this case, RAID is of no help. On the other side, a
superblock backup copy can be used to restore the system without major
data loss.
More in general, how do you deal with metadata backups?
Thanks.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-17 13:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 10:39 [linux-lvm] Backup superblock for thin provision? Gionatan Danti
2016-05-16 18:55 ` Mike Snitzer
2016-05-17 9:10 ` Zdenek Kabelac
2016-05-17 13:22 ` Gionatan Danti
2016-05-17 13:18 ` Gionatan Danti
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).