lvcreate --thin gives "unknown segment type" error
Hi,
While trying to create thin provisioned volume, I'm getting "unknown segment type" error. Please see the logs below:
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago)
# uname -r 2.6.32-358.el6.x86_64
# dmsetup targets thin-pool v1.5.1 thin v1.5.1 multipath v1.5.0 mirror v1.12.0 striped v1.5.6 linear v1.1.0 error v1.0.1
# lvm version LVM version: 2.02.99(2)-git (2012-10-22) Library version: 1.02.78-git (2012-10-22) Driver version: 4.23.6
# vgs|grep -i testvg
testvg 2 0 0 wz--n- 3.99g 3.99g
# pvs -o +devices|grep -i testvg /dev/vdc testvg lvm2 a-- 2.00g 2.00g /dev/vde testvg lvm2 a-- 2.00g 2.00g
# lvcreate -L 1G -T testvg/thinlv1 -vvvv #libdm-config.c:908 Setting activation/monitoring to 1 #lvmcmdline.c:1102 Processing: lvcreate -L 1G -T testvg/thinlv1 -vvvv #lvmcmdline.c:1105 O_DIRECT will be used #libdm-config.c:844 Setting global/locking_type to 1 #libdm-config.c:908 Setting global/wait_for_locks to 1 #locking/locking.c:241 File-based locking selected. #libdm-config.c:813 Setting global/locking_dir to /var/lock/lvm #libdm-config.c:908 Setting global/prioritise_write_locks to 1 #unknown/unknown.c:102 Initialised segtype: thin WARNING: Unrecognised segment type thin #lvcreate.c:746 Unable to create LV with unknown segment type thin. <- Run `lvcreate --help' for more informationat am I missing?
What am I missing?
!!amit
Dne 22.7.2013 07:15, Kumar amit mehta napsal(a):
Quoted 46 lines
Hi,
While trying to create thin provisioned volume, I'm getting "unknown segment type" error. Please see the logs below:
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago)# uname -r 2.6.32-358.el6.x86_64# dmsetup targets thin-pool v1.5.1 thin v1.5.1 multipath v1.5.0 mirror v1.12.0 striped v1.5.6 linear v1.1.0 error v1.0.1# lvm version LVM version: 2.02.99(2)-git (2012-10-22) Library version: 1.02.78-git (2012-10-22) Driver version: 4.23.6# vgs|grep -i testvg
testvg 2 0 0 wz--n- 3.99g 3.99g# pvs -o +devices|grep -i testvg /dev/vdc testvg lvm2 a-- 2.00g 2.00g /dev/vde testvg lvm2 a-- 2.00g 2.00g# lvcreate -L 1G -T testvg/thinlv1 -vvvv #libdm-config.c:908 Setting activation/monitoring to 1 #lvmcmdline.c:1102 Processing: lvcreate -L 1G -T testvg/thinlv1 -vvvv #lvmcmdline.c:1105 O_DIRECT will be used #libdm-config.c:844 Setting global/locking_type to 1 #libdm-config.c:908 Setting global/wait_for_locks to 1 #locking/locking.c:241 File-based locking selected. #libdm-config.c:813 Setting global/locking_dir to /var/lock/lvm #libdm-config.c:908 Setting global/prioritise_write_locks to 1 #unknown/unknown.c:102 Initialised segtype: thin WARNING: Unrecognised segment type thin #lvcreate.c:746 Unable to create LV with unknown segment type thin. <- Run `lvcreate --help' for more informationat am I missing?
Quoted 2 lines
What am I missing?
configure --with-thin=internal
(and you will likely miss '--enable-udev_sync'
Zdenek
Quoted 3 lines · Zdenek Kabelac
configure --with-thin=internal
(and you will likely miss '--enable-udev_sync'
Thank you, it worked!
However, It seems that "discards" behavior for thin pool is not supported on RHEL 6.4. Please confirm.
# ./configure --with-thin=internal --enable-debug
# make; make install
# lvcreate --discards passdown -L 1G -T thinvg1/thinlv1 Logical volume "thinlv1" created
# lvs -o +devices|grep -i thinlv1 thinlv1 thinvg1 twi-a-tz- 1.00g 0.00 thinlv1_tdata(0)
# dmesg device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
<snip>
if (reason) {
DMWARN("Data device (%s) %s: Disabling discard
passdown.", bdevname(data_bdev, buf), reason);
pt->adjusted_pf.discard_passdown = false;
} <snip>
Seems that we'll reach here if QUEUE_FLAG_DISCARD flag in the request queue is not set.
!!amit
Quoted 26 lines · Kumar amit mehta
Quoted 3 lines · Zdenek Kabelac
configure --with-thin=internal
(and you will likely miss '--enable-udev_sync'
Thank you, it worked!
However, It seems that "discards" behavior for thin pool is not supported on RHEL 6.4. Please confirm.
# ./configure --with-thin=internal --enable-debug# make; make install
# lvcreate --discards passdown -L 1G -T thinvg1/thinlv1 Logical volume "thinlv1" created# lvs -o +devices|grep -i thinlv1 thinlv1 thinvg1 twi-a-tz- 1.00g 0.00 thinlv1_tdata(0)# dmesg device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.<snip>
if (reason) {
DMWARN("Data device (%s) %s: Disabling discard
Quoted 7 lines
passdown.", bdevname(data_bdev, buf), reason); pt->adjusted_pf.discard_passdown = false; }<snip>
Seems that we'll reach here if
QUEUE_FLAG_DISCARDflag in the request queue is not set.
More information of my setup:
<snip from /etc/lvm/lvm.conf>issue_discards = 1
<snip from /etc/lvm/lvm.conf>
I'm invoking these commands on a VM. I do not know, from where these storage were mapped to my VM(were done my some storage admin). However when i invoke sg_inq (from sg3_utils) to get some information, that fails too :(
<snip>
# sg_inq /dev/vde Both SCSI INQUIRY and fetching ATA information failed on /dev/vde <snip>
!!amit
Dne 22.7.2013 13:23, Kumar amit mehta napsal(a):
Quoted 16 lines · Kumar amit mehta
Quoted 15 lines · Zdenek Kabelac
Quoted 3 lines
configure --with-thin=internal
(and you will likely miss '--enable-udev_sync'
Thank you, it worked!
However, It seems that "discards" behavior for thin pool is not supported on RHEL 6.4. Please confirm.
# ./configure --with-thin=internal --enable-debug# make; make install
# lvcreate --discards passdown -L 1G -T thinvg1/thinlv1 Logical volume "thinlv1" created
Quoted 8 lines
Quoted 8 lines
# lvs -o +devices|grep -i thinlv1 thinlv1 thinvg1 twi-a-tz- 1.00g 0.00 thinlv1_tdata(0)# dmesg device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
It's your backend device used for thinpool data which doesn't support discard. So it fallbacks to nopassdown behaviour (discard is processed only at pool level).
Quoted 2 lines
I'm invoking these commands on a VM. I do not know, from where these storage were mapped to my VM(were done my some storage admin). However
Important piece of puzzle - if you want to see TRIM command hits your storage, your storage needs to support it ;)
BTW it's perfectly ok to use thin pool only with nopassdown.
Zdenek
NOTE: issue_discard in lvm.conf is not related in any way with --discards option for thin pool creation.
Quoted 3 lines · Zdenek Kabelac
It's your backend device used for thinpool data which doesn't support discard. So it fallbacks to nopassdown behaviour (discard is processed only at pool level).
So, it seems that my backend device(of which I've no idea!!) does not support discard.
Quoted 7 lines
Quoted 3 lines
I'm invoking these commands on a VM. I do not know, from where these storage were mapped to my VM(were done my some storage admin). However
Important piece of puzzle - if you want to see TRIM command hits your storage, your storage needs to support it ;)
Quoted 7 lines
BTW it's perfectly ok to use thin pool only with nopassdown.
Zdenek
NOTE:
issue_discardin lvm.conf is not related in any way with --discards option for thin pool creation.
Hmm.
Thank you for your time and answering my queries.
!!amit