* thin_repair doesn't do size checking on the output device
@ 2014-05-19 7:13 M.H. Tsai
2014-05-19 7:37 ` Zdenek Kabelac
0 siblings, 1 reply; 2+ messages in thread
From: M.H. Tsai @ 2014-05-19 7:13 UTC (permalink / raw)
To: dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 989 bytes --]
Hi All,
I'm using LVM2.2.02.106 and thin-provisioning-tools 0.3.2 on Ubuntu 13.10.
I found that thin_repair doesn't do size checking on the output device,
thus it will crash if the output device is larger than the space map's
limitation (i.e., 255*16320*4096 bytes). The bitmap_count calculated by
sm_disk::extend() might exceeded 255.
The direct influence is that it cannot collaborate with the LVM2 "lvconvert
--repair" command while the thinpool's metadata is exactly 16GiB. The
reason is that the size of the pool metadata spare's DM target activated by
_lvconvert_thinpool_repair() is 16384MiB, not 16192MiB. LVM2 only adjust
the DM target's size to DM_THIN_MAX_METADATA_SIZE(16192MiB) while the
metadata or the spare volume are activated within a thinpool.
If this is a bug, I thought that it might be better to add size checking to
thin_repair, since that users might use devices larger than 16GiB as the
output device. Is that a feasible approach?
Many Thanks,
Ming-Hung Tsai
[-- Attachment #1.2: Type: text/html, Size: 1214 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: thin_repair doesn't do size checking on the output device
2014-05-19 7:13 thin_repair doesn't do size checking on the output device M.H. Tsai
@ 2014-05-19 7:37 ` Zdenek Kabelac
0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2014-05-19 7:37 UTC (permalink / raw)
To: device-mapper development
Dne 19.5.2014 09:13, M.H. Tsai napsal(a):
> Hi All,
>
> I'm using LVM2.2.02.106 and thin-provisioning-tools 0.3.2 on Ubuntu 13.10. I
> found that thin_repair doesn't do size checking on the output device, thus it
> will crash if the output device is larger than the space map's limitation
> (i.e., 255*16320*4096 bytes). The bitmap_count calculated by sm_disk::extend()
> might exceeded 255.
>
> The direct influence is that it cannot collaborate with the LVM2 "lvconvert
> --repair" command while the thinpool's metadata is exactly 16GiB. The reason
> is that the size of the pool metadata spare's DM target activated by
> _lvconvert_thinpool_repair() is 16384MiB, not 16192MiB. LVM2 only adjust the
> DM target's size to DM_THIN_MAX_METADATA_SIZE(16192MiB) while the metadata or
> the spare volume are activated within a thinpool.
>
> If this is a bug, I thought that it might be better to add size checking to
> thin_repair, since that users might use devices larger than 16GiB as the
> output device. Is that a feasible approach?
Yep - it's a bug and will need some fix.
Thanks for noticing this case.
Zdenek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-19 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 7:13 thin_repair doesn't do size checking on the output device M.H. Tsai
2014-05-19 7:37 ` Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.