lvm thin provisioning fails with PV larger than 2T on 14.04 and thin snapshots cannot be activated on 16.04

Asked by Peik

I'm trying to make use of lvm thin volumes on Trusty 14.04 with an external drive of 3TB as the PV for the volumegroup, but for some reason this fails and the thin pool gets somehow corrupted.

On a 2TB drive as the PV this all works fine and I can even create thin snapshots of the thin volumes etc.

Here's what I've done:

1) Setup the PV:

# pvcreate /dev/sdb

2) Create the volume group:

# vgcreate vg_backups /dev/sdb

3) Create the thinpool:

# lvcreate --thin -L2,5T --chunksize 1M --poolmetadatasize 16G /dev/vg_backups/backup_thinpool

4) Create a new thin volume:

# lvcreate --thinpool /dev/vg_backups/backup_thinpool -n test_lv -V400G

5) So far everything seems to go fine and the thin LV seems to be active but when I want to make the VG inactive with:

# vgchange -an /dev/vg_backups

...I first get this warning:

WARNING: Integrity check of metadata for thin pool vg_backups/backup_thinpool failed.

Then if I try to re-activate the VG by:

# vgchange -ay /dev/vg_backups

...I get:

Check of thin pool vg_backups/backup_thinpool failed (status:1). Manual repair required (thin_dump --repair /dev/mapper/vg_backups-backup_thinpool_tmeta)!

... and the thin volume cannot be activated. Running the thin_dump --repair command just gives:

# thin_dump --repair /dev/mapper/vg_backups-backup_thinpool_tmeta
read failed

And as I said, it all works if I use a 2TB drive as the PV. Also tested on a Centos 7 box and there it also works with the 3TB drive. So, something must be wrong with the lvm thinpool handling in Ubuntu.

Is there some limit for the PV size if I want to use thin provisioning or is this possibly a bug?

Some further testing and findings:

I have another machine with 16.04 now installed (same results as on 15.10 btw) where I'm actually able to create the thin LV on the 3T disk and it gets activated and is usable.

However, if I make a thin snapshot of the thin volume like this:

# lvcreate -s --thinpool /dev/vg_backups/backup_thinpool -n test_lv_snapshot test_lv

...then that thin snapshot won't become active and I cannot activate it even if I try:

# lvchange -ay /dev/vg_backups/test_lv_snapshot

I don't get any errors, the LV just doesn't become active.

On 16.04 I can deactivate and reactivate (vgchange) the volume group without errors -just the thin snapshots won't become active no matter what I try.

Also on 16.04 (and 15.10) even the 2T disk has the same behaviour -the thin snapshots won't become active.

However, if I first create the thinpool, some thin volumes and some thin snapshots of those thin volumes on the 2T disk on the 14.04 machine and then attach the disk to the 16.04 machine then those thin volumes and their snapshots are activated.

But if I then make some more thin snapshots on that disk on the 16.04 machine those thin snapshots cannot be activated on the 16.04 machine but if I attach the disk back to the 14.04 machine even the thin snapshots created on the 16.04 machine are seen as active...???

So, I see possibly two separate problems here:

1) Somehow 14.04 cannot handle the 3T disk as it does the 2T disk (maybe it's the thin pool size > 2T ?)

2) Thin snapshots on any disk created on 16.04 cannot be activated

This means that any thin snapshots created on 16.04 (and 15.10) cannot be accessed (cannot activate and mount the volumes) which is very bad!

So, if anyone has solutions to these issues that would be great!

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.