在CentOS 5上编译内核版本> = 2.6.34:RAID集“ddf1_foo”未激活?

前端之家收集整理的这篇文章主要介绍了在CentOS 5上编译内核版本> = 2.6.34:RAID集“ddf1_foo”未激活?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想在一些CentOS 5服务器上使用 mount a Ceph FS.由于ceph-fuse因以下错误而失败:
# ceph-fuse --no-fuse-big-writes -m 192.168.2.15:6789 /mnt/ceph/
ceph-fuse[7528]: starting ceph client
ceph-fuse[7528]: starting fuse
fuse: unknown option `atomic_o_trunc'
2013-04-04 13:51:21.128506 2b82d6e9e8f0 -1 fuse_lowlevel_new Failed
ceph-fuse[7528]: fuse finished with error 33
ceph-fuse[7526]: mount Failed: (33) Numerical argument out of domain

谷歌指出this但CentOS 5.x附带内核2.6.18,我将编译一个支持Ceph的新内核.

>我的第一次尝试是ELRepokernel-lt 3.0.71
>第二个是来自kernel.org的2.6.34.14

.config从正在运行的内核中复制了2个额外的设置:

CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_CEPH_FS=m

但他们都给我以下错误

提取内核映像并删除2行后,可以通过编辑init脚本来消除第一个警告:

echo "Loading dm-region-hash.ko module"
insmod /lib/dm-region-hash.ko

http://funky-dennis.livejournal.com/3290.html

第二个错误怎么样:

device-mapper: table: 253:0: mirror: Error creating mirror dirty log
RAID set "ddf1_bar" was not activated

> 2.6.18的init脚本:http://fpaste.org/byZ3/
> 2.6.34.14:http://fpaste.org/8COr/

它们大致相同,只是以下模块未加载到较新的内核中:

echo "Loading dm-mem-cache.ko module"
insmod /lib/dm-mem-cache.ko 
echo "Loading dm-message.ko module"
insmod /lib/dm-message.ko 
echo "Loading dm-raid45.ko module"
insmod /lib/dm-raid45.ko

这是RAID设置“ddf1_foo”未激活的原因吗?

更新截至4月4日星期四21:40:32 ICT 2013

http://alistairphipps.com/wiki/index.php?title=Notes#LVM

A strange error message similar to “mirror log: unrecognised sync
argument to mirror log: 2”,“table: mirror: Error creating mirror
dirty log” means you have mismatched kernel device mapper and
userspace tools versions: probably your kernel is too recent for your
version of the lvm tools. Install the latest device mapper and lvm2
from sources,and it should work.

我试图编译最新版本的LVM2

# /usr/sbin/lvm version
  LVM version:     2.02.98(2) (2012-10-15)
  Library version: 1.02.67-RHEL5 (2011-10-14)
  Driver version:  4.11.6

但没有变化.

更新于4月6日星期六18:51:31 ICT 2013

/lib/modules/2.6.18-274.el5/kernel/drivers/md/

|-- dm-crypt.ko
|-- dm-emc.ko
|-- dm-hp-sw.ko
|-- dm-log.ko
|-- dm-mem-cache.ko
|-- dm-message.ko
|-- dm-mirror.ko
|-- dm-mod.ko
|-- dm-multipath.ko
|-- dm-raid45.ko
|-- dm-rdac.ko
|-- dm-region_hash.ko
|-- dm-round-robin.ko
|-- dm-snapshot.ko
|-- dm-zero.ko
|-- faulty.ko
|-- linear.ko
|-- multipath.ko
|-- raid0.ko
|-- raid1.ko
|-- raid10.ko
|-- raid456.ko
`-- xor.ko

/lib/modules/2.6.34.14/kernel/drivers/md/

|-- dm-crypt.ko
|-- dm-log.ko
|-- dm-mirror.ko
|-- dm-mod.ko
|-- dm-multipath.ko
|-- dm-region-hash.ko
|-- dm-round-robin.ko
|-- dm-snapshot.ko
|-- dm-zero.ko
|-- faulty.ko
|-- linear.ko
|-- multipath.ko
|-- raid0.ko
|-- raid1.ko
|-- raid10.ko
|-- raid456.ko
`-- raid6_pq.ko

更新信息4月10日星期三11:22:54 ICT 2013

在源文件夹中搜索,我发现了这个:

# grep -lr 'Error creating mirror dirty log' /usr/src/linux-2.6.34.14
/usr/src/linux-2.6.34.14/drivers/md/dm-raid1.c

DM-raid1.c:

static struct dm_dirty_log *create_dirty_log(struct dm_target *ti,unsigned argc,char **argv,unsigned *args_used)
{
    unsigned param_count;
    struct dm_dirty_log *dl;

    if (argc < 2) {
        ti->error = "Insufficient mirror log arguments";
        return NULL;
    }

    if (sscanf(argv[1],"%u",&param_count) != 1) {
        ti->error = "Invalid mirror log argument count";
        return NULL;
    }

    *args_used = 2 + param_count;

    if (argc < *args_used) {
        ti->error = "Insufficient mirror log arguments";
        return NULL;
    }

    dl = dm_dirty_log_create(argv[0],ti,mirror_flush,param_count,argv + 2);
    if (!dl) {
        ti->error = "Error creating mirror dirty log";
        return NULL;
    }

    return dl;
}

DM-log.c:

struct dm_dirty_log *dm_dirty_log_create(const char *type_name,struct dm_target *ti,int (*flush_callback_fn)(struct dm_target *ti),unsigned int argc,char **argv)
{
    struct dm_dirty_log_type *type;
    struct dm_dirty_log *log;

    log = kmalloc(sizeof(*log),GFP_KERNEL);
    if (!log)
        return NULL;

    type = get_type(type_name);
    if (!type) {
        kfree(log);
        return NULL;
    }

    log->flush_callback_fn = flush_callback_fn;
    log->type = type;
    if (type->ctr(log,argc,argv)) {
        kfree(log);
        put_type(type);
        return NULL;
    }

    return log;
}
为什么你首先使用ddf格式的raid数组?你似乎试图用dmraid来激活它,dmraid几年来没有任何发展,而且或多或少都有折旧. mdadm得到了更好的支持,最近的版本确实支持ddf格式,尽管它的原生格式是首选.

确保已加载dm-log模块.

猜你在找的CentOS相关文章