<div dir="ltr"><div><div><div><div>Hello, the device broke after about a day:<br><br></div>dmesg:<br><br>[83086.878182] device-mapper: space map metadata: unable to allocate new metadata block<br>[83088.879861] device-mapper: space map metadata: unable to allocate new metadata block<br>
[83089.414700] device-mapper: space map metadata: unable to allocate new metadata block<br>[83089.414706] device-mapper: cache: could not commit metadata for accurate status<br>[83090.881533] device-mapper: space map metadata: unable to allocate new metadata block<br>
[83092.883142] device-mapper: space map metadata: unable to allocate new metadata block<br>[83094.884719] device-mapper: space map metadata: unable to allocate new metadata block<br>[83096.886355] device-mapper: space map metadata: unable to allocate new metadata block<br>
[83097.712195] device-mapper: space map metadata: unable to allocate new metadata block<br>[83097.712200] device-mapper: cache: could not commit metadata for accurate status<br>[83098.283947] device-mapper: space map metadata: unable to allocate new metadata block<br>
[83098.283952] device-mapper: cache: could not commit metadata for accurate status<br>[83098.729396] device-mapper: space map metadata: unable to allocate new metadata block<br>[83098.729401] device-mapper: cache: could not commit metadata for accurate status<br>
<br>dmsetup status:<br></div>storage: 0 40963653632 cache 249856/249856 26968230 2678513 711227 30042060 0 248746 248729 0 1 writeback 2 migration_threshold 100000000 4 random_threshold 4 sequential_threshold 10000000<br>
<br></div>Obviously the metadata partition is full but accourding to the formula I use it should be more than enough =>  <code>4 MB + ( 16 bytes * nr_blocks ) I get 13341184 ~ 13MB and metadata partiton is 1024MB<br><br>
</code></div><div><code>device sizes:<br> # blockdev --report<br>RO    RA   SSZ   BSZ   StartSec            Size   Device<br>rw   256   512  4096          0     26843414528   /dev/sda<br>rw   256   512  4096       2048      4094689280   /dev/sda1<br>
rw   256   512  4096    7999488     22746759168   /dev/sda2<br>rw  2048   512  4096          0  20973392756736   /dev/sdb<br>rw  2048   512  4096       2048  20973390659584   /dev/sdb1<br>rw  2048   512  4096          0   2397799710720   /dev/sdc<br>
rw  2048   512  4096       2048      1023410176   /dev/sdc1<br>rw  2048   512  4096    2000896   2396774203392   /dev/sdc2<br>rw  2048   512   512          0  20973390659584   /dev/dm-0<br><br></code></div><div><code><br>
</code></div><div><code>What am I doing wrong?<br><br><br></code></div><div><code><br></code></div><code>regards.<br><br></code></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 29, 2013 at 5:06 PM, Vladimir Smolensky <span dir="ltr"><<a href="mailto:arizal@gmail.com" target="_blank">arizal@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Ok, I compiled it and will test if it works.<br><br></div><div>When I try to make my cache with blocksize smaller than 8192  I get<br>
<br># dmsetup  create storage --table '0 40963653632 cache /dev/sdc1 /dev/sdc2 /dev/sdb1 4096 1 writeback default 0'<br>
device-mapper: reload ioctl on storage failed: Cannot allocate memory<br>Command failed<br><br></div><div>dnesg:<br><br>[  664.940597] device-mapper: cache-policy-mq: version 1.1.0 loaded<br>[  665.002924] ------------[ cut here ]------------<br>

[  665.002943] WARNING: CPU: 0 PID: 18271 at mm/page_alloc.c:2484 __alloc_pages_nodemask+0x73d/0x820()<br>[  665.002945] Modules linked in: dm_cache_mq dm_cache dm_bio_prison dm_persistent_data dm_bufio ipv6 bonding coretemp ixgbe i7core_edac edac_core kvm processor pcspkr hed button bnx2 dcdbas dca mdio ehci_pci thermal_sys microcode joydev sha256_generic libiscsi scsi_transport_iscsi tg3 ptp pps_core libphy e1000 fuse nfs lockd sunrpc jfs multipath linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor xor async_tx raid6_pq raid1 raid0 dm_snapshot dm_crypt dm_mirror dm_region_hash dm_log dm_mod hid_sunplus hid_sony hid_samsung hid_pl hid_petalynx hid_gyration sl811_hcd usbhid ohci_hcd uhci_hcd usb_storage ehci_hcd usbcore usb_common mpt2sas raid_class aic94xx libsas lpfc crc_t10dif crct10dif_common qla2xxx megaraid_sas megaraid_mbox megaraid_mm megaraid aacraid sx8 DAC960 cciss 3w_9xxx 3w_xxxx mptsas scsi_transport_sas mptfc scsi_transport_fc scsi_tgt mptspi mptscsih mptbase atp870u dc395x qla1280 imm parport dmx3191d sym53c8xx gdth advansys initio BusLogic arcmsr aic7xxx aic79xx scsi_transport_spi sg pdc_adma sata_inic162x sata_mv ata_piix ahci libahci sata_qstor sata_vsc sata_uli sata_sis sata_sx4 sata_nv sata_via sata_svw sata_sil24 sata_sil sata_promise pata_sl82c105 pata_cs5530 pata_cs5520 pata_via pata_jmicron pata_marvell pata_sis pata_netcell pata_sc1200 pata_pdc202xx_old pata_triflex pata_atiixp pata_opti pata_amd pata_ali pata_it8213 pata_ns87415 pata_ns87410 pata_serverworks pata_artop pata_it821x pata_optidma pata_hpt3x2n pata_hpt3x3 pata_hpt37x pata_hpt366 pata_cmd64x pata_efar pata_rz1000 pata_sil680 pata_radisys pata_pdc2027x pata_mpiix libata<br>

[  665.003077] CPU: 0 PID: 18271 Comm: dmsetup Not tainted 3.12.0-rc5+ #1<br>[  665.003079] Hardware name: Dell Inc. PowerEdge R510/0DPRKF, BIOS 1.5.3 10/25/2010<br>[  665.003082]  00000000000009b4 ffff881fada458f8 ffffffff81595198 00000000000009b4<br>

[  665.003085]  0000000000000000 ffff881fada45938 ffffffff81043a62 ffff881fada45918<br>[  665.003088]  0000000000000000 ffff881fae8a0000 0000000000000000 0000000000000002<br>[  665.003092] Call Trace:<br>[  665.003101]  [<ffffffff81595198>] dump_stack+0x49/0x61<br>

[  665.003107]  [<ffffffff81043a62>] warn_slowpath_common+0x82/0xb0<br>[  665.003111]  [<ffffffff81043aa5>] warn_slowpath_null+0x15/0x20<br>[  665.003114]  [<ffffffff810c595d>] __alloc_pages_nodemask+0x73d/0x820<br>

[  665.003120]  [<ffffffffa14405b7>] ? mq_create+0x187/0x3a0 [dm_cache_mq]<br>[  665.003124]  [<ffffffff810c5ac2>] __get_free_pages+0x12/0x50<br>[  665.003130]  [<ffffffff810f69cb>] __kmalloc+0xeb/0xf0<br>

[  665.003134]  [<ffffffffa1440767>] mq_create+0x337/0x3a0 [dm_cache_mq]<br>[  665.003139]  [<ffffffffa1436faa>] dm_cache_policy_create+0x4a/0xcc [dm_cache]<br>[  665.003143]  [<ffffffffa14339d1>] cache_ctr+0x4a1/0xd40 [dm_cache]<br>

[  665.003152]  [<ffffffffa065dbb8>] ? dm_split_args+0x78/0x140 [dm_mod]<br>[  665.003159]  [<ffffffffa065ddba>] dm_table_add_target+0x13a/0x390 [dm_mod]<br>[  665.003166]  [<ffffffffa0660eb0>] table_load+0xd0/0x330 [dm_mod]<br>

[  665.003173]  [<ffffffffa0660de0>] ? table_clear+0xd0/0xd0 [dm_mod]<br>[  665.003179]  [<ffffffffa0662032>] ctl_ioctl+0x1d2/0x410 [dm_mod]<br>[  665.003187]  [<ffffffff8103a718>] ? __do_page_fault+0x208/0x4e0<br>

[  665.003193]  [<ffffffffa066227e>] dm_ctl_ioctl+0xe/0x20 [dm_mod]<br>[  665.003198]  [<ffffffff8110bd2e>] do_vfs_ioctl+0x8e/0x4e0<br>[  665.003202]  [<ffffffff810fbc09>] ? ____fput+0x9/0x10<br>[  665.003205]  [<ffffffff8110c1d2>] SyS_ioctl+0x52/0x80<br>

[  665.003211]  [<ffffffff815996f9>] system_call_fastpath+0x16/0x1b<br>[  665.003213] ---[ end trace 2afe5f836777e03f ]---<br>[  665.008704] device-mapper: table: 253:0: cache: Error creating cache's policy<br>
[  665.008712] device-mapper: ioctl: error adding target to table<br>
</div><div><br><br># blockdev --report<br>RO    RA   SSZ   BSZ   StartSec            Size   Device<br>rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>          0     26843414528   /dev/sda<br>
rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>       2048      <a href="tel:4094689280" value="+14094689280" target="_blank">4094689280</a>   /dev/sda1<br>
rw   256   512  4096    7999488     22746759168   /dev/sda2<br>rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>          0  20973392756736   /dev/sdb<br>rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>       2048  20973390659584   /dev/sdb1<br>
rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>          0   2397799710720   /dev/sdc<br>
rw   <a href="tel:256%C2%A0%C2%A0%20512%C2%A0%204096" value="+12565124096" target="_blank">256   512  4096</a>       2048      1023410176   /dev/sdc1<br>rw   256   512  4096    2000896   2396774203392   /dev/sdc2<br><br>
</div><div>regards.<br><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Nov 29, 2013 at 3:34 PM, Vladimir Smolensky <span dir="ltr"><<a href="mailto:arizal@gmail.com" target="_blank">arizal@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">This is complete kernel, right?<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 28, 2013 at 7:28 PM, Joe Thornber <span dir="ltr"><<a href="mailto:thornber@redhat.com" target="_blank">thornber@redhat.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Nov 28, 2013 at 06:50:39PM +0200, Vladimir Smolensky wrote:<br>
> Hello, I would like to test the latest dm-cache available to see if the<br>
> problem I was having still exists. Where can I get this code?<br>
<br>
</div>My latest stable code lives in the 'thin-dev' branch of my github tree:<br>
<br>
<a href="https://github.com/jthornber/linux-2.6/tree/thin-dev" target="_blank">https://github.com/jthornber/linux-2.6/tree/thin-dev</a><br>
<br>
This has the latest versions of both the thin-provisioning and cache<br>
targets, and will shortly have the era target too.<br>
<div><div><br>
<br>
- Joe<br>
<br>
--<br>
dm-devel mailing list<br>
<a href="mailto:dm-devel@redhat.com" target="_blank">dm-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/dm-devel" target="_blank">https://www.redhat.com/mailman/listinfo/dm-devel</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>