Re: [linux-lvm] Backup superblock for thin provision?

2016-05-16 Thread Mike Snitzer
On Fri, May 13 2016 at  6:39am -0400,
Gionatan Danti  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.

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] Unexptected filesytem unmount with thin provision and autoextend disabled - lvmetad crashed?

2016-05-16 Thread Zdenek Kabelac

On 16.5.2016 15:01, Xen wrote:

Zdenek Kabelac schreef op 16-05-2016 14:08:


Hi

Well yeah - ATM we rather take 'early' action and try to stop any user
on overfill thin-pool.


May I inquire into whether this is only available in newer versions atm?

These are my versions (lvs --version):

   LVM version: 2.02.133(2) (2015-10-30)
   Library version: 1.02.110 (2015-10-30)
   Driver version:  4.34.0

I have noticed that on my current system the entire system will basically
freeze on overfill.

I wonder if I should take measures to upgrade to something newer if I want to
prevent this.


Behavior should be there for quite a while, but relatively recent fixes
in dmeventd has made it working more reliable in more circumstances.
I'd recommend to play at least with 142 - but since recent releases are
bugfix oriented - if you are compiling yourself - just take latest.


Regards

Zdenek

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] Unexptected filesytem unmount with thin provision and autoextend disabled - lvmetad crashed?

2016-05-16 Thread Xen

Zdenek Kabelac schreef op 16-05-2016 14:08:


Hi

Well yeah - ATM we rather take 'early' action and try to stop any user
on overfill thin-pool.


May I inquire into whether this is only available in newer versions atm?

These are my versions (lvs --version):

  LVM version: 2.02.133(2) (2015-10-30)
  Library version: 1.02.110 (2015-10-30)
  Driver version:  4.34.0

I have noticed that on my current system the entire system will 
basically freeze on overfill.


I wonder if I should take measures to upgrade to something newer if I 
want to prevent this.


Regards,

X.

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] Unexptected filesytem unmount with thin provision and autoextend disabled - lvmetad crashed?

2016-05-16 Thread Zdenek Kabelac

On 15.5.2016 12:33, Gionatan Danti wrote:

Hi list,
I had an unexptected filesystem unmount on a machine were I am using thin
provisioning.



Hi

Well yeah - ATM we rather take 'early' action and try to stop any user
on overfill thin-pool.




It is a CentOS 7.2 box (kernel 3.10.0-327.3.1.el7, lvm2-2.02.130-5.el7_2.1),
with the current volumes situation:
# lvs -a
   LV   VG Attr   LSize  Pool Origin
Data%  Meta%  Move Log Cpy%Sync Convert
   000-ThinPool vg_storage twi-aotz-- 10.85t 74.06  33.36
   [000-ThinPool_tdata] vg_storage Twi-ao 10.85t
   [000-ThinPool_tmeta] vg_storage ewi-ao 88.00m
   Storage  vg_storage Vwi-aotz-- 10.80t 000-ThinPool 74.40
   [lvol0_pmspare]  vg_storage ewi--- 88.00m
   root vg_system  -wi-ao 55.70g
   swap vg_system  -wi-ao  7.81g

As you can see, thin pool/volume is at about 75%.

Today I found the Storage volume unmounted, with the following entries in
/var/log/message:
May 15 09:02:53 storage lvm[43289]: Request to lookup VG vg_storage in lvmetad
gave response Connection reset by peer.
May 15 09:02:53 storage lvm[43289]: Volume group "vg_storage" not found
May 15 09:02:53 storage lvm[43289]: Failed to extend thin
vg_storage-000--ThinPool-tpool.
May 15 09:02:53 storage lvm[43289]: Unmounting thin volume
vg_storage-000--ThinPool-tpool from /opt/storage.


Basically whenever  'lvresize' failed - dmeventd plugin now tries
to unconditionally umount any associated thin-volume with
thin-pool above threshold.



What puzzle me is that both thin_pool_autoextend_threshold and
snap_pool_autoextend_threshold are disabled in the lvm.conf file
(thin_pool_autoextend_threshold = 100 and snap_pool_autoextend_threshold =
100). Moreover, no custom profile/policy is attached to the thin pool/volume.


For now  -  plugin   'calls'  the tool - lvresize --use-policies.
If this tool FAILs for ANY  reason ->  umount will happen.

I'll probably put in 'extra' test that 'umount' happens
with  >=95% values only.

dmeventd  itself has no idea if there is configure 100 or less - it's the 
lvresize to see it - so even if you set 100% - and you have enabled

monitoring  - you will get umount (but no resize)




To me, it seems that the lvmetad crashed/had some problems and the system,
being "blind" about the thin volume utilization, put it offline. But I can not
understand the "Failed to extend thin vg_storage-000--ThinPool-tpool", and I
had *no* autoextend in place.


If you strictly don't care about any tracing of thin-pool fullness,
disable  monitoring in lvm.conf.




I rebooted the system and the Storage volume is now mounted without problems.
I also tried to write about 16 GB of raw data to it, and I have no problem.
However, I can not understand why it was put offline in the first place. As a
last piece of information, I noted that kernel & lvm was auto-updated two days
ago. Maybe it is related?

Can you give me some hint of what happened, and how to avoid it in the future?


Well 'lvmetad' shall not crash, ATM this may kill commands - and further stop 
processing - as we rather 'stop' further usage rather than allowing

to cause bigger damage.

So if you have unusual system/device setup causing  'lvmetad' crash - open BZ,
and meawhile  set   'use_lvmetad=0' in your lvm.conf till the bug is fixed.

Regards

Zdenek




___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] LVM Merge

2016-05-16 Thread Zdenek Kabelac

On 16.5.2016 13:14, Alasdair G Kergon wrote:

On Sun, May 15, 2016 at 04:35:44AM +, Tom Jay wrote:

I've posted a question to the debian-user mailing list, but am yet to receive a 
response.
I am running Debian 7.9 64-bit with kernel version 3.2.0 and would like to use 
the 'lvconvert --merge' feature, but do not have 'snapshot-merge' support in 
the kernel. Does anyone have any idea how to enable this?
The original post is here: 
https://lists.debian.org/debian-user/2016/05/msg00496.html.


So you don't have any snapshot support in your running kernel.
But your kernel is modular, and if you attempt a snapshot operation,
lvm2 will try to load the snapshot module if it is available.

To try this manually, do 'modprobe dm-snapshot' (see 'man modprobe')
then retry 'dmsetup targets'.



Please always attach version of lvm2  and kernel in use.

Debian version has some local patches for 'modprobe' usage - so maybe check
it 'auto' modprobe works properly in your case ?
(rmmod dm-snapshot  -  and check if lvcreate -s  still works)

Are you build your own kernel - or do you use  'distro' debian kernel ?


Regards

Zdenek

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] LVM Merge

2016-05-16 Thread Alasdair G Kergon
On Sun, May 15, 2016 at 04:35:44AM +, Tom Jay wrote:
> I've posted a question to the debian-user mailing list, but am yet to receive 
> a response.
> I am running Debian 7.9 64-bit with kernel version 3.2.0 and would like to 
> use the 'lvconvert --merge' feature, but do not have 'snapshot-merge' support 
> in the kernel. Does anyone have any idea how to enable this?
> The original post is here: 
> https://lists.debian.org/debian-user/2016/05/msg00496.html.
 
So you don't have any snapshot support in your running kernel.
But your kernel is modular, and if you attempt a snapshot operation,
lvm2 will try to load the snapshot module if it is available.

To try this manually, do 'modprobe dm-snapshot' (see 'man modprobe')
then retry 'dmsetup targets'.

Alasdair

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


[linux-lvm] LVM Merge

2016-05-16 Thread Tom Jay
Hello,

I've posted a question to the debian-user mailing list, but am yet to receive a 
response.

I am running Debian 7.9 64-bit with kernel version 3.2.0 and would like to use 
the 'lvconvert --merge' feature, but do not have 'snapshot-merge' support in 
the kernel. Does anyone have any idea how to enable this?

The original post is here: 
https://lists.debian.org/debian-user/2016/05/msg00496.html.

Thanks!

Tom

  ___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/