[dm-devel] dmcache RAID1 bug?

Leonardo Santos heiligerstein at gmail.com
Mon Nov 17 18:14:57 UTC 2014


On Mon, Nov 17, 2014 at 12:46 PM, Mike Snitzer <snitzer at redhat.com> wrote:

> On Mon, Nov 17 2014 at  9:24am -0500,
> Leonardo Santos <heiligerstein at gmail.com> wrote:
>
> > I'm working in tests for my msc thesis envolving dm_cache module. I'm
> > having problems with the following scenario:
> >
> > Slowstorage: RAID1 (mdadm) with 4 HDDs;
> > - /dev/md/raid1_4ssds
>
> You mean /dev/md/raid1_4hdds ?
>

A symlink to raid1 created using 4 ssds.

mdadm --create --verbose /dev/md/raid0_4ssds --raid-devices=4 --force
--level=1 /dev/sdd /dev/sdc /dev/sdb /dev/sda


>
> > -- /dev/sda
> > -- /dev/sdb
> > -- /dev/sdc
> > -- /dev/sdd
> >
> > Faststorage: RAID1 (mdadm) with 4 SSDs
> > - /dev/md/raid1_4hdds
>
> And /dev/md/raid1_4ssds here?
>

mdadm --create --verbose /dev/md/raid0_4hdds --raid-devices=4 --force
--level=1  /dev/sdh /dev/sdg /dev/sdf /dev/sde


>
> > -- /dev/sde
> > -- /dev/sdf
> > -- /dev/sdg
> > -- /dev/sdh
> >
> >
> > Cachestorage: dm_cache envolving both devices
> > - /dev/mapper/dmcache
> > -- /dev/md/raid1_4ssds
> > -- /dev/md/raid1_4hdds
> >
>

Commands:
vgcreate cache /dev/md/raid0_4ssds -y
lvcreate cache -n metadata -l 5%FREE
lvcreate cache -n block -l 100%FREE
dd if=/dev/zero of=/dev/cache/metadata bs=1M count=100
# 16773120 = blockdev --getsize /dev/md/raid0_4hdds
dmsetup create dmcache --table '0 16773120 cache /dev/cache/metadata
/dev/cache/block /dev/md/raid0_4hdds 512 1 writeback default 0'


> > Other informations (strange facts):
> > In RAID0 it's working very well.
> > In a virtual machine (vbox) it's working as well (in this case disks have
> > 2GB only for big tests automatization, in production are 160GB SSDs and
> 2TB
> > HDDs);
> >
> > Have you seen about this error? Syslog is bellow.
>
> Never seen this before... have you taken care to zero the dm-cache
> metadata's superblock (first 512B of the cache metadata device) each
> time you've reconfigured the cache device?
>
> Have you tried using the latest lvm2 to create the dm-cache device?
>

I've used LVM2 from distribution (debian) and a latest kernel version.

LVM2 latest today is 2.02.112 (I'll try with latest LVM2 version and post
results).

# lvm version
  LVM version:     2.02.95(2) (2012-03-06)
  Library version: 1.02.74 (2012-03-06)
  Driver version:  4.27.0

# uname -a
Linux steinhager 3.17.2 #2 SMP Fri Nov 7 12:49:16 BRST 2014 x86_64 GNU/Linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20141117/24d5dd87/attachment.htm>


More information about the dm-devel mailing list