<div dir="ltr"><div>Hi, folks,</div><div><br></div><div>I noticed that the dm-thin metadata can be resized since LVM tools v2.02.99, and the related code in kernel had been added since 3.10, say,</div><div>maybe_resize_metadata_dev() in pool_resume in dm-thin.c.</div>
<div><br></div><div>I'm currently doing some experiments with dm-thin targets, with linux-3.11¡BLVM2.2.02.103</div><div>Here is my script to create thin-pool and thin-volumn on my device, a 200GB pool with 32M metadata</div>
<div>    $ sudo vgcreate vg /dev/sda1</div><div>    $ sudo lvcreate --type thin-pool --thinpool tpool vg --size 200G --poolmetadatasize 32M -c 1M</div><div>    $ sudo lvcreate --name lv vg --virtualsize 100G --type thin --thinpool tpool</div>
<div><br></div><div>Then, I try to increase the metadata size with the following command,</div><div>    $ sudo lvresize --poolmetadata +4M vg/tpool</div><div>      Extending logical volume tp_tmeta to 36.00 MiB.</div><div>
      Logical volume tpool successfully resized</div><div><br></div><div>by executing "dmsetup status"/ "dmsetup table" command, the length of the *_tmeta volumn is successfully expended with 4MB size.</div>
<div><br></div><div>But when trying to resize the metadata lv to 64MB</div><div>    $ sudo lvresize --poolmetadata +28M vg/tpool</div><div>      Extending logical volume tpool_tmeta to 64.00 MiB.</div><div>      device-mapper: resume ioctl on  failed: No space left on device</div>
<div>      Unable to resume vg-tpool-tpool (253:3)</div><div>      Problem reactivating tpool</div><div>      libdevmapper exiting with 2 device(s) still suspended.</div><div><br></div><div>I get error message in this step.</div>
<div>By executing vgs/lvs command, I still have free space in my volumn group and pool.</div><div>The dm table of *_tmeta device seems had been modified, but resumed fail.</div><div><br></div><div>The same kind of error also happens when I try to expend the metadata device with a big size, like 1GB.</div>
<div>After tracing the code, the -ENOSPC seems being returned from sm_bootstrap_new_block() in dm-space-map-metadata.c. </div><div><br></div><div>Here is my questions.</div><div>Did I miss some steps before resizing the metadata device?</div>
<div>Or, did the resizing of dm-thin metadata is limitted? If yes, what is the limitation?</div><div><br></div><div>Any help would be grateful. Thanks</div><div><br></div><div>Burton</div>
</div>