[HLFS INSTALLATION Q5] HLFS安装Wiki的问题

19 views
Skip to first unread message

Ren Zhen

unread,
May 13, 2013, 10:34:21 PM5/13/13
to Harry Wei, clo...@googlegroups.com, xyli...@groups.163.com
Wiki链接:https://code.google.com/p/cloudxy/wiki/INTEGRATE_HLFS_INTO_OPENSTACK?ts=1368453854&updated=INTEGRATE_HLFS_INTO_OPENSTACK

一键安装暂时行不通,继续手动安装。遇到一些问题如下:
【1】第四步
”---------------------------------
4, 安装Hadoop环境
wget http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb
sudo dpkg -i cdh4-repository_1.0_all.deb
“----------------------------------

cdh4的deb包,只支持Ubuntu 64位机。链接:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Requirements-and-Supported-Versions/cdhrsv_topic_1.html

我的机器是32的,所以改为安装hadoop-1.0.4.

【2】第五步
“------------------------------------
5,编译安装HLFS
sudo apt-get install libhdfs0-dev
svn checkout https://cloudxy.googlecode.com/svn/trunk/hlfs/ hlfs
(目前已经没有3part目录了,也不用再手动修改cmakelist.txt中路径了)
cd hlfs/build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib ../src
(在给定位置——我们给定到/usr/local/lib目录下,生成makefile文件)
sudo make install (头文件和lib,bin等都被安装到/usr/lib/hlfs目录下;如果编译出现
“usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h:
No such file or directory” ,别慌,执行 sudo cp
/usr/lib/i386-linux-gnu/glib-2.0/include/glibconfig.h
/usr/include/glib-2.0/ 或者 执行sudo cp
/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h
/usr/include/glib-2.0/ 即可.)
“------------------------------------
a. sudo apt-get install libhdfs0-dev不起作用之后,我改成将hadoop源码包中的libhdfs.so拷贝到"lib"库中。
a1.$sudo cp c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
a2.$sudo cp c++/Linux-i386-32/lib/libhdfs.so /usr/lib/
a3.将 c++/Linux-i386-32/lib/加入/etc/ld.so.conf, 并 sudo ldconfig使其生效

b.cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib ../src
(在给定位置——我们给定到/usr/local/lib目录下,生成makefile文件)

括号中的话说措了?我检查发现/usr/local/lib目录下没有makefile, 而是在hlfs/build目录下。
我不确定,你再看下。

c.sudo make install
执行这个命令后,输出错误信息如下:
“---------------------------------------
Makefile:144: 警告:覆盖关于目标“all”的命令
Makefile:110: 警告:忽略关于目标“all”的旧命令
Scanning dependencies of target all
Built target all
Scanning dependencies of target hlfs
Building C object CMakeFiles/hlfs.dir/storage/hlfs_stat.c.o
Building C object CMakeFiles/hlfs.dir/storage/seg_clean_task.c.o
Building C object CMakeFiles/hlfs.dir/storage/deinit_hlfs.c.o
Building C object CMakeFiles/hlfs.dir/storage/init_hlfs.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_close.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_ctrl.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_write.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_open.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_read.c.o
Building C object CMakeFiles/hlfs.dir/logger/log_ops.c.o
Building C object CMakeFiles/hlfs.dir/logger/segfile_handler_optmize.c.o
Building C object CMakeFiles/hlfs.dir/logger/block_ops.c.o
Building C object CMakeFiles/hlfs.dir/backend/hdfs_storage.c.o
/home/zhen/trunk/hlfs/src/backend/hdfs_storage.c:16:18: 致命错误: hdfs.h:没有那个文件或目录
编译中断。
make[2]: *** [CMakeFiles/hlfs.dir/backend/hdfs_storage.c.o] 错误 1
make[1]: *** [CMakeFiles/hlfs.dir/all] 错误 2
make: *** [all] 错误 2
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
cp: 无法获取"c++/Linux-i386-32/lib/libhdfs.so" 的文件状态(stat): 没有那个文件或目录
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
../c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
cp: 无法获取"../c++/Linux-i386-32/lib/libhdfs.so" 的文件状态(stat): 没有那个文件或目录
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
~/hadoop-1.0.4/c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo make install
Makefile:144: 警告:覆盖关于目标“all”的命令
Makefile:110: 警告:忽略关于目标“all”的旧命令
Built target all
“---------------------------------------
你遇到过吗?给点建议。

--
Sincerely,
Ren Zhen

harryxiyou

unread,
May 13, 2013, 10:42:47 PM5/13/13
to Ren Zhen, clo...@googlegroups.com, Linux项目组
2013/5/14 Ren Zhen <darwi...@gmail.com>:
头文件没找到,可能是没有安装libhdfs0-dev。
--
Thanks
Harry Wei

Ren Zhen

unread,
May 14, 2013, 7:42:00 AM5/14/13
to Harry Wei, xyli...@groups.163.com, clo...@googlegroups.com
嗨,贾威。
HLFS安装Wiki的链接:https://code.google.com/p/cloudxy/wiki/INTEGRATE_HLFS_INTO_OPENSTACK?ts=1368453854&updated=INTEGRATE_HLFS_INTO_OPENSTACK

安装已经进行到“安装Libvirt,重新启动基于HLFS驱动的Openstack”这一步了。
进行到”4,安装HLFS patches for Openstack“的时候,遇到了下面问题。
”--------------------------------------------------------
zhen@darwin-ThinkPad-Edge:/opt/stack/nova$ git apply
hlfs_driver_for_openstack_nova.patch
error: patch failed: nova/virt/libvirt/driver.py:151
error: nova/virt/libvirt/driver.py: patch does not apply
“--------------------------------------------------------

咨询王森师兄,他说可能需要回滚stack的版本。回滚到那个版本呢?
--
Sincerely,
Ren Zhen

Ren Zhen

unread,
May 14, 2013, 8:17:38 AM5/14/13
to Harry Wei, xyli...@groups.163.com, clo...@googlegroups.com
上面那个问题已解决了。现在,在测试下"支持操作"-->"创建HLFS Volumes"时执行:
“-------------------------------
1, local模式下创建HLFS Volumes
cinder create --display-name local:///tmp/testenv/testfs 5
”------------------------------
输出错误信息:
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/output/bin$ cinder create
--display-name hdfs:///tmp/testenv/testfs 5
ERROR: You must provide a username via either --os-username or env[OS_USERNAME]
我试了下:cinder create --os-username zhen --display-name
hdfs:///tmp/testenv/testfs 5
也不行。
不知道怎么回事?
--
Sincerely,
Ren Zhen

harryxiyou

unread,
May 14, 2013, 9:07:56 AM5/14/13
to Ren Zhen, Linux项目组, clo...@googlegroups.com
2013/5/14 Ren Zhen <darwi...@gmail.com>:
Openstack支持hlfs back-end,可以使用openstack创建hlfs 。你可能没有配置
环境变量,具体如下:

如果下面要通过命令行创建HLFS volumes(或者对HLFS做一些operations)需要在/etc/profile中增加环境变量,具体如下:

#Openstack ENV.
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=xxxxx(这里换成开始安装devstack输入的密码)
export OS_AUTH_URL="http://(这里换成devstack安装结束提示的ip):5000/v2.0/"
export EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / {
print $4 }')
export CREDS=$(keystone ec2-credentials-create)
export EC2_ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }')
export EC2_SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')



--
Thanks
Harry Wei

harryxiyou

unread,
May 16, 2013, 9:06:18 PM5/16/13
to Ren Zhen, clo...@googlegroups.com
2013/5/15 Ren Zhen <darwi...@gmail.com>:
> 创建HLFS Volumes的问题。问题描述:
> 1.执行hlfs下的auto_local.sh创建/tmp/testenv/testfs/superblock
> 2.cinder create --display-name local:///tmp/testenv/testfs 5
> 3.执行cinder list查看volumes状态。
> ID | stauts | display name | size |
> Volume Type | Boottable | attached to |
> ... | error |loacal:///tmp/testenv/testfs | 5 |
> none | false | |
>


查看日志,寻找失败原因。

--
Thanks
Harry Wei
Reply all
Reply to author
Forward
0 new messages