New LVM2 release 2.02.89: Thinly-provisioned logical volumes
Alasdair G Kergon
maintainerAfter a long break, we've issued a new LVM2 release, 2.02.89.
394 files changed, 22662 insertions(+), 11614 deletions(-)
This release includes experimental support for thinly-provisioned logical volumes using the new device-mapper thin provisioning target in kernel 3.2.
This is still a *development* release and the new feature is not supported by all the LVM commands yet.
The various interface extensions for thin provisioning are not frozen. So we might still decide to tweak the command line extensions, library functions, on-disk metadata extensions, tool output, configuration options etc. in ways that make later releases incompatible with this particular release.
Please try it out, test it, and give us feedback preferably on the mailing list [email protected].
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW_DM
ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz.asc
Getting started
---------------
Ensure your kernel is at least version 3.2 and compiled with DM_THIN_PROVISIONING.
Add '--with-thin=internal' to your configure line.
You should have --enable-dmeventd too and install dmeventd for automatic extension of nearly-full thin volumes.
Fedora users may use this package:
lvm2-2.02.89-2.fc17
http://koji.fedoraproject.org/koji/buildinfo?buildID=295965
(or a newer one, if we rebuild it)
The basic idea
--------------
You create a logical volume known as the "thin pool" to hold the disk space you want to use inside your volume group.
Then you create "thin" logical volumes which share the space in that pool.
lvs and lvdisplay will tell you "how full" your pool is.
dmeventd will monitor how full your pool is, and automatically use unallocated physical extents to extend it according to the policy in lvm.conf. Do not allow your pool to fill up!
You can also take snapshots of thin volumes.
There are basic examples in the man pages, and sophisticated examples in the test scripts (e.g. test/shell/lvcreate-thin.sh).
With lvcreate, think of -L as controlling actual disk space and -V as controlling virtual size. -T is a short-cut indicating the use of something thin. If not specified, volume names (like lvol0) are generated whenever needed.
Creating a pool needs actual disk space, so use -L. Creating a thin volume use virtual space, so use -V.
You can have more than one pool in a VG, so to use an existing one you must mention which it is on the command line.
(Of course, we will be producing additional documentation eventually.)
Commands that should mostly work with thin volumes at this stage:
lvcreate, lvremove, lvresize, lvextend, lvreduce, lvchange, lvdisplay, lvs vgscan, vgdisplay, vgs, vgcreate, vgremove, vgextend, vgreduce
Please limit yourself to those commands for now.
Other commands have not been updated and may fail in surprising way. (If one of them causes you problems, we're unlikely to be interested.)
In particular, be aware that vgcfgrestore only restores the LVM metadata and NOT the in-kernel thin metadata and so can easily cause crashes or corruption at the moment.
Alasdair
--
lvm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/lvm-devel
Long ago, Nostradamus foresaw that on 01/26/2012 09:57 PM, Alasdair G Kergon would write:
Quoted 9 lines
The basic idea
--------------
You create a logical volume known as the "thin pool" to hold the disk space you want to use inside your volume group.Then you create "thin" logical volumes which share the space in that pool.
lvs and lvdisplay will tell you "how full" your pool is.
What is the purpose? Does it allow snapshots that share space like in Zumastor? Do all the thin LVs start with a preconfigured image which can then be modified? (Can be done with snapshots - updating the snapshots, but not the master, is efficient. Presumably this way all the snapshots can share space.)
Alasdair G Kergon
maintainerQuoted 1 line · Stuart D Gathman
Does it allow snapshots that share space
Yes
Quoted 2 lines
Do all the thin LVs start with a preconfigured image which can then be modified?
It can be used that way, yes.
Alasdair
Can the thinly-provisioned logical volume automatically return its owned space to the pool?
I mean, if I create a huge file on the logical volume, then delete it, will the logical volume actual space size be reduced automatically? If not, how can it be shrinked?
Regards
Kirby Zhou
+86 (10) 6272 8261
-----邮件原件-----
发件人: [email protected] [mailto:[email protected]] 代表 Alasdair G Kergon 发送时间: 2012年1月27日 10:57
收件人: [email protected]; [email protected]; [email protected]
主题: [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumes
After a long break, we've issued a new LVM2 release, 2.02.89.
394 files changed, 22662 insertions(+), 11614 deletions(-)
This release includes experimental support for thinly-provisioned logical volumes using the new device-mapper thin provisioning target in kernel 3.2.
This is still a *development* release and the new feature is not supported by all the LVM commands yet.
The various interface extensions for thin provisioning are not frozen.
So we might still decide to tweak the command line extensions, library functions, on-disk metadata extensions, tool output, configuration options etc. in ways that make later releases incompatible with this particular release.
Please try it out, test it, and give us feedback preferably on the mailing list [email protected].
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW_DM
ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz.asc
Getting started
---------------
Ensure your kernel is at least version 3.2 and compiled with DM_THIN_PROVISIONING.
Add '--with-thin=internal' to your configure line.
You should have --enable-dmeventd too and install dmeventd for automatic extension of nearly-full thin volumes.
Fedora users may use this package:
lvm2-2.02.89-2.fc17
http://koji.fedoraproject.org/koji/buildinfo?buildID=295965
(or a newer one, if we rebuild it)
The basic idea
--------------
You create a logical volume known as the "thin pool" to hold the disk space you want to use inside your volume group.
Then you create "thin" logical volumes which share the space in that pool.
lvs and lvdisplay will tell you "how full" your pool is.
dmeventd will monitor how full your pool is, and automatically use unallocated physical extents to extend it according to the policy in lvm.conf. Do not allow your pool to fill up!
You can also take snapshots of thin volumes.
There are basic examples in the man pages, and sophisticated examples in the test scripts (e.g. test/shell/lvcreate-thin.sh).
With lvcreate, think of -L as controlling actual disk space and -V as controlling virtual size. -T is a short-cut indicating the use of something thin. If not specified, volume names (like lvol0) are generated whenever needed.
Creating a pool needs actual disk space, so use -L. Creating a thin volume use virtual space, so use -V.
You can have more than one pool in a VG, so to use an existing one you must mention which it is on the command line.
(Of course, we will be producing additional documentation eventually.)
Commands that should mostly work with thin volumes at this stage:
lvcreate, lvremove, lvresize, lvextend, lvreduce, lvchange, lvdisplay, lvs vgscan, vgdisplay, vgs, vgcreate, vgremove, vgextend, vgreduce
Please limit yourself to those commands for now.
Other commands have not been updated and may fail in surprising way. (If one of them causes you problems, we're unlikely to be interested.)
In particular, be aware that vgcfgrestore only restores the LVM metadata and NOT the in-kernel thin metadata and so can easily cause crashes or corruption at the moment.
Alasdair
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] 答复: New LVM2 release 2.02.89: Thinly-provisioned logical?volumes
Quoted 3 lines · Kirby Zhou
Can the thinly-provisioned logical volume automatically return its owned space to the pool?
I mean, if I create a huge file on the logical volume, then delete it, will the logical volume actual space size be reduced automatically? If not, how can it be shrinked?
Discard support is currently in testing. Should go upstream soon.
- Joe
--
lvm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/lvm-devel
Re: [linux-lvm] ??????: New LVM2 release 2.02.89: Thinly-provisioned logical?volumes
Quoted 7 lines · Joe Thornber
Quoted 3 lines · Kirby Zhou
Can the thinly-provisioned logical volume automatically return its owned space to the pool?
I mean, if I create a huge file on the logical volume, then delete it, will the logical volume actual space size be reduced automatically? If not, how can it be shrinked?Discard support is currently in testing. Should go upstream soon.
Note that you'll also need filesystem support for that, too. Currently no filesystem enables online discard by default, and at least directly on SSDs the impact is rather bad on all Linux filesystems.
Hi All,
I tryed to use this LVM2 to create thin pool and thin lv, but it said PE was required. The VG I used is free, can anyone help me? Should any more args be needed? Is there any more detailed HowTo file than man file?
The mesgs:
----------------------------
[root@host2 ~]# pvs
Ignoring too small pv_min_size 512KB, using default 2048KB.
PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a-- 931.41G 0 /dev/sdb vg01 lvm2 a-- 931.51G 193.51G /dev/sdc vg01 lvm2 a-- 931.51G 931.51G /dev/sdd vg02 lvm2 a-- 931.51G 927.51G /dev/sdg lvm2 a-- 931.51G 931.51G /dev/sdl vg_pool lvm2 a-- 931.51G 931.51G [root@host2 ~]# vgs Ignoring too small pv_min_size 512KB, using default 2048KB. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.41G 0 vg01 2 7 0 wz--n- 1.82T 1.10T vg02 1 1 0 wz--n- 931.51G 927.51G vg_pool 1 0 0 wz--n- 931.51G 931.51G
[root@host2 ~]# lvcreate -L100M -T vg_pool/pool -V 1T --name thin_lv
Ignoring too small pv_min_size 512KB, using default 2048KB.
Rounding up size to full physical extent 4.00 MB
Insufficient suitable allocatable extents for logical volume pool: 25 more required
Quoted 102 lines
-----原始邮件-----
发件人: "Alasdair G Kergon" <[email protected]>
发送时间: 2012年1月27日 星期五
收件人: [email protected], [email protected], [email protected] 抄送:
主题: [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumesAfter a long break, we've issued a new LVM2 release, 2.02.89.
394 files changed, 22662 insertions(+), 11614 deletions(-)This release includes experimental support for thinly-provisioned logical volumes using the new device-mapper thin provisioning target in kernel 3.2.
This is still a *development* release and the new feature is not supported by all the LVM commands yet.
The various interface extensions for thin provisioning are not frozen. So we might still decide to tweak the command line extensions, library functions, on-disk metadata extensions, tool output, configuration options etc. in ways that make later releases incompatible with this particular release.
Please try it out, test it, and give us feedback preferably on the mailing list [email protected].
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW
ftp://sources.redhat.com/pub/lvm2/WHATS_NEW_DMftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.89.tgz.asc
Getting started
---------------Ensure your kernel is at least version 3.2 and compiled with
DM_THIN_PROVISIONING.Add '--with-thin=internal' to your configure line.
You should have --enable-dmeventd too and install dmeventd for automatic extension of nearly-full thin volumes.Fedora users may use this package:
lvm2-2.02.89-2.fc17
http://koji.fedoraproject.org/koji/buildinfo?buildID=295965
(or a newer one, if we rebuild it)The basic idea
--------------
You create a logical volume known as the "thin pool" to hold the disk space you want to use inside your volume group.Then you create "thin" logical volumes which share the space in that pool.
lvs and lvdisplay will tell you "how full" your pool is.
dmeventd will monitor how full your pool is, and automatically use unallocated physical extents to extend it according to the policy in lvm.conf. Do not allow your pool to fill up!
You can also take snapshots of thin volumes.
There are basic examples in the man pages, and sophisticated examples in the test scripts (e.g.
test/shell/lvcreate-thin.sh).With lvcreate, think of -L as controlling actual disk space and -V as controlling virtual size. -T is a short-cut indicating the use of something thin. If not specified, volume names (like lvol0) are generated whenever needed.
Creating a pool needs actual disk space, so use -L. Creating a thin volume use virtual space, so use -V.
You can have more than one pool in a VG, so to use an existing one you must mention which it is on the command line.
(Of course, we will be producing additional documentation eventually.)
Commands that should mostly work with thin volumes at this stage:
lvcreate, lvremove, lvresize, lvextend, lvreduce, lvchange, lvdisplay, lvs vgscan, vgdisplay, vgs, vgcreate, vgremove, vgextend, vgreduce
Please limit yourself to those commands for now.
Other commands have not been updated and may fail in surprising way. (If one of them causes you problems, we're unlikely to be interested.)
In particular, be aware that vgcfgrestore only restores the LVM metadata and NOT the in-kernel thin metadata and so can easily cause crashes or corruption at the moment.
Alasdair
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Alasdair G Kergon
maintainerQuoted 1 line · Busby.Cheung
I tryed to use this LVM2 to create thin pool and thin lv, but it said PE was required. The VG I used is free, can anyone help me? Should any more args be needed? Is there any more detailed HowTo file than man file?
For now, you need either 2 PVs in the VG, or use --alloc anywhere with 1 PV, or split the allocation manually like:
Quoted 1 line
[root@host2 ~]# lvcreate -L100M -T vg_pool/pool -V 1T --name
thin_lv/dev/sdl:0/dev/sdl:1-
I have a patch that fixes this problem, but I'm still testing it.
Alasdair
--
lvm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/lvm-devel
Hi Alasdair,
It works well as what you said in the email. Thanks!
Best regards,
Busby
Quoted 26 lines
-----原始邮件-----
发件人: "Alasdair G Kergon" <[email protected]>
发送时间: 2012年1月31日 星期二
收件人: "LVM general discussion and development" <[email protected]> 抄送: [email protected], [email protected]
主题: Re: [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumesQuoted 1 line · Busby.Cheung
I tryed to use this LVM2 to create thin pool and thin lv, but it said PE was required. The VG I used is free, can anyone help me? Should any more args be needed? Is there any more detailed HowTo file than man file?
For now, you need either 2 PVs in the VG, or use --alloc anywhere with 1 PV, or split the allocation manually like:
Quoted 1 line
[root@host2 ~]# lvcreate -L100M -T vg_pool/pool -V 1T --name
thin_lv/dev/sdl:0/dev/sdl:1-I have a patch that fixes this problem, but I'm still testing it.
Alasdair
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
When I used a VG of 1.82TB to create a 100GB pool, it faild. The err mesg "cannot allocte memory",however, my host's meminfo:
[root@host2 persistent-data]# cat /proc/meminfo
MemTotal: 10234416 kB MemFree: 9685956 kB
whether I should configure somewhere to make it work well(create bigger pool)?
This is the mesgs:
---------------------
[root@host2 ~]# pvs
Ignoring too small pv_min_size 512KB, using default 2048KB.
PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a-- 931.41G 0 /dev/sdb vg01 lvm2 a-- 931.51G 193.51G /dev/sdc vg01 lvm2 a-- 931.51G 931.51G /dev/sdd vg02 lvm2 a-- 931.51G 927.51G /dev/sdg vg_pool lvm2 a-- 931.51G 931.51G /dev/sdl vg_pool lvm2 a-- 931.51G 931.51G [root@host2 ~]# vgs Ignoring too small pv_min_size 512KB, using default 2048KB. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.41G 0 vg01 2 7 0 wz--n- 1.82T 1.10T vg02 1 1 0 wz--n- 931.51G 927.51G vg_pool 2 0 0 wz--n- 1.82T 1.82T
[root@host2 ~]# lvcreate -L 100G -T vg_pool/thin_lv
Ignoring too small pv_min_size 512KB, using default 2048KB. Rounding up size to full physical extent 4.00 MB
device-mapper: resume ioctl on failed: Cannot allocate memory Unable to resume vg_pool-thin_lv-tpool (253:15) Aborting. Failed to activate thin thin_lv.
Busby
Quoted 26 lines
-----原始邮件-----
发件人: "Alasdair G Kergon" <[email protected]>
发送时间: 2012年1月31日 星期二
收件人: "LVM general discussion and development" <[email protected]> 抄送: [email protected], [email protected]
主题: Re: [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumesQuoted 1 line · Busby.Cheung
I tryed to use this LVM2 to create thin pool and thin lv, but it said PE was required. The VG I used is free, can anyone help me? Should any more args be needed? Is there any more detailed HowTo file than man file?
For now, you need either 2 PVs in the VG, or use --alloc anywhere with 1 PV, or split the allocation manually like:
Quoted 1 line
[root@host2 ~]# lvcreate -L100M -T vg_pool/pool -V 1T --name
thin_lv/dev/sdl:0/dev/sdl:1-I have a patch that fixes this problem, but I'm still testing it.
Alasdair
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Alasdair G Kergon
maintainerQuoted 1 line · Busby.Cheung
This is the mesgs:
Can you also lookin the kernel message log and see where or not it gives any additional reason there?
Alasdair
Alasdair G Kergon
maintainerQuoted 1 line · Busby.Cheung
It works well as what you said in the email. Thanks!
I committed the patch, and anticipate making an updated release later today.
Alasdair
Hi Alasdair,
The kernel mesg log "failed to resize data device" while use dmsetup CMDs to create pool will be ok.
use LVM2 cmd mesgs:
---------------------------
[root@host2 ~]# pvs
Ignoring too small pv_min_size 512KB, using default 2048KB.
PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a-- 931.41G 0 /dev/sdg vg_pool lvm2 a-- 931.51G 931.51G /dev/sdl vg_pool lvm2 a-- 931.51G 931.51G [root@host2 ~]# vgs Ignoring too small pv_min_size 512KB, using default 2048KB. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.41G 0 vg_pool 2 0 0 wz--n- 1.82T 1.82T
[root@host2 ~]# lvcreate -L65G -T vg_pool/pool
Ignoring too small pv_min_size 512KB, using default 2048KB.
Rounding up size to full physical extent 4.00 MB
device-mapper: resume ioctl on failed: Cannot allocate memory
Unable to resume vg_pool-pool-tpool (253:12)
Aborting. Failed to activate thin pool.
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
[root@host2 ~]# cat /var/log/messages
Feb 2 09:14:45 host2 kernel: device-mapper: space map checker: Loading debug space map from disk. This may take some time Feb 2 09:14:45 host2 kernel: device-mapper: space map checker: Load complete Feb 2 09:14:45 host2 kernel: device-mapper: thin: failed to resize data device
--------------------------
use dmsetup cmd:
[root@host2 ~]# lvcreate -n metadata_lv -L40M vg_pool
Ignoring too small pv_min_size 512KB, using default 2048KB.
Logical volume "metadata_lv" created
[root@host2 ~]# lvcreate -n data_lv -L300G vg_pool
Ignoring too small pv_min_size 512KB, using default 2048KB.
Logical volume "data_lv" created
[root@host2 ~]# dmsetup create pool --table "0 209715200 thin-pool /dev/vg_pool/metadata_lv /dev/vg_pool/data_lv 1024 20000" [root@host2 ~]# dmsetup status
vg_pool-metadata_lv: 0 81920 linear
VolGroup00-LogVol01: 0 24510464 linear
vg_pool-pool-tpool: 0 136314880 thin-pool 0 76/1024 0/0 -
vg_pool-pool_tdata: 0 136314880 linear
VolGroup00-LogVol00: 0 1928790016 linear
vg_pool-pool_tmeta: 0 8192 linear
pool: 0 209715200 thin-pool 0 21/10240 0/204800 -
vg_pool-data_lv: 0 629145600 linear
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: space map checker: free block counts differ, checker 1020, sm-disk:948
device-mapper: space map checker: free block counts differ, checker 10236, sm-disk:10219
Best regards,
Busby
Quoted 14 lines
-----原始邮件-----
发件人: "Alasdair G Kergon" <[email protected]>
发送时间: 2012年2月1日 星期三
收件人: "Busby.Cheung" <[email protected]>
抄送: "LVM general discussion and development" <[email protected]>, "[email protected]" <[email protected]>, [email protected] 主题: Re: Re: [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumesQuoted 1 line · Busby.Cheung
This is the mesgs:
Can you also lookin the kernel message log and see where or not it gives any additional reason there?
Alasdair
Dne 2.2.2012 02:36, Busby.Cheung napsal(a):
Quoted 53 lines
Hi Alasdair,
The kernel mesg log "failed to resize data device" while use dmsetup CMDs to create pool will be ok.
use LVM2 cmd mesgs:
---------------------------[root@host2 ~]# pvs
Ignoring too smallpv_min_size512KB, using default 2048KB.PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a-- 931.41G 0 /dev/sdg vg_pool lvm2 a-- 931.51G 931.51G /dev/sdl vg_pool lvm2 a-- 931.51G 931.51G [root@host2 ~]# vgs Ignoring too small pv_min_size 512KB, using default 2048KB. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.41G 0 vg_pool 2 0 0 wz--n- 1.82T 1.82T[root@host2 ~]# lvcreate -L65G -T vg_pool/pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Rounding up size to full physical extent 4.00 MB
device-mapper: resume ioctl on failed: Cannot allocate memory
Unable to resume vg_pool-pool-tpool (253:12)
Aborting. Failed to activate thin pool.
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
[root@host2 ~]# cat/var/log/messagesFeb 2 09:14:45 host2 kernel: device-mapper: space map checker: Loading debug space map from disk. This may take some time Feb 2 09:14:45 host2 kernel: device-mapper: space map checker: Load complete Feb 2 09:14:45 host2 kernel: device-mapper: thin: failed to resize data device--------------------------
use dmsetup cmd:[root@host2 ~]# lvcreate -n
metadata_lv-L40Mvg_pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Logical volume "metadata_lv" created
[root@host2 ~]# lvcreate -ndata_lv-L300Gvg_pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Logical volume "data_lv" created
[root@host2 ~]# dmsetup create pool --table "0 209715200 thin-pool/dev/vg_pool/metadata_lv/dev/vg_pool/data_lv1024 20000" [root@host2 ~]# dmsetup status
vg_pool-metadata_lv: 0 81920 linear
VolGroup00-LogVol01: 0 24510464 linear
vg_pool-pool-tpool: 0 136314880 thin-pool 0 76/1024 0/0 -
vg_pool-pool_tdata: 0 136314880 linear
VolGroup00-LogVol00: 0 1928790016 linear
vg_pool-pool_tmeta: 0 8192 linear
pool: 0 209715200 thin-pool 0 21/10240 0/204800 -
vg_pool-data_lv: 0 629145600 linear
Quoted 9 lines
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: space map checker: free block counts differ, checker 1020, sm-disk:948
device-mapper: space map checker: free block counts differ, checker 10236, sm-disk:10219
Have you tried to build kernel without CONFIG_DM_DEBUG_SPACE_MAPS and CONFIG_DM_DEBUG_BLOCK_STACK_TRACING ?
These two options are there only for debugging - and have major impact on performance (and possibly on memory resource as well).
To check consistency of metadata there are now user-space tools available.
Zdenek
Hi Zdenek,
I checked my kernel config, both of the options I set 'y', and then built kernel without CONFIG_DM_DEBUG_SPACE_MAPS and CONFIG_DM_DEBUG_BLOCK_STACK_TRACING as you said, can solve the problem I met. Thanks!
Best regards,
Busby
Quoted 80 lines
-----原始邮件-----
发件人: "Zdenek Kabelac" <[email protected]>
发送时间: 2012年2月2日 星期四
收件人: "device-mapper development" <[email protected]>
抄送: "Busby.Cheung" <[email protected]>, "Alasdair G Kergon" <[email protected]>, "LVM general discussion and development" <[email protected]> 主题: Re: [dm-devel] [linux-lvm] New LVM2 release 2.02.89: Thinly-provisioned logical volumesDne 2.2.2012 02:36, Busby.Cheung napsal(a):
Quoted 53 lines
Hi Alasdair,
The kernel mesg log "failed to resize data device" while use dmsetup CMDs to create pool will be ok.
use LVM2 cmd mesgs:
---------------------------[root@host2 ~]# pvs
Ignoring too smallpv_min_size512KB, using default 2048KB.PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a-- 931.41G 0 /dev/sdg vg_pool lvm2 a-- 931.51G 931.51G /dev/sdl vg_pool lvm2 a-- 931.51G 931.51G [root@host2 ~]# vgs Ignoring too small pv_min_size 512KB, using default 2048KB. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.41G 0 vg_pool 2 0 0 wz--n- 1.82T 1.82T[root@host2 ~]# lvcreate -L65G -T vg_pool/pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Rounding up size to full physical extent 4.00 MB
device-mapper: resume ioctl on failed: Cannot allocate memory
Unable to resume vg_pool-pool-tpool (253:12)
Aborting. Failed to activate thin pool.
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
[root@host2 ~]# cat/var/log/messagesFeb 2 09:14:45 host2 kernel: device-mapper: space map checker: Loading debug space map from disk. This may take some time Feb 2 09:14:45 host2 kernel: device-mapper: space map checker: Load complete Feb 2 09:14:45 host2 kernel: device-mapper: thin: failed to resize data device--------------------------
use dmsetup cmd:[root@host2 ~]# lvcreate -n
metadata_lv-L40Mvg_pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Logical volume "metadata_lv" created
[root@host2 ~]# lvcreate -ndata_lv-L300Gvg_pool
Ignoring too smallpv_min_size512KB, using default 2048KB.
Logical volume "data_lv" created
[root@host2 ~]# dmsetup create pool --table "0 209715200 thin-pool/dev/vg_pool/metadata_lv/dev/vg_pool/data_lv1024 20000" [root@host2 ~]# dmsetup status
vg_pool-metadata_lv: 0 81920 linear
VolGroup00-LogVol01: 0 24510464 linear
vg_pool-pool-tpool: 0 136314880 thin-pool 0 76/1024 0/0 -
vg_pool-pool_tdata: 0 136314880 linear
VolGroup00-LogVol00: 0 1928790016 linear
vg_pool-pool_tmeta: 0 8192 linear
pool: 0 209715200 thin-pool 0 21/10240 0/204800 -
vg_pool-data_lv: 0 629145600 linearQuoted 9 lines
[root@host2 ~]# dmesg
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: thin: failed to resize data device
device-mapper: space map checker: Loading debug space map from disk. This may take some time
device-mapper: space map checker: Load complete
device-mapper: space map checker: free block counts differ, checker 1020, sm-disk:948
device-mapper: space map checker: free block counts differ, checker 10236, sm-disk:10219Have you tried to build kernel without
CONFIG_DM_DEBUG_SPACE_MAPSandCONFIG_DM_DEBUG_BLOCK_STACK_TRACING?These two options are there only for debugging - and have major impact on performance (and possibly on memory resource as well).
To check consistency of metadata there are now user-space tools available.
Zdenek