手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网站运营>建站经验>列表

Software Raid-[0,1,5]学习笔记-

来源:互联网 作者:west263.com 时间:2008-04-16
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

[root@LFS ~]#mount -t reiserfs /dev/raid_lvm/lv_data /mnt/data

About chunk-size :

The chunk-size deserves an explanation. You can never write completely parallel to a set of disks. If you had two disks and wanted to write a byte, you would have to write four bits on each disk, actually, every second bit would go to disk 0 and the others to disk 1. Hardware just doesn't support that. Instead, we choose some chunk-size, which we define as the smallest "atomic" mass of data that can be written to the devices. A write of 16 kB with a chunk size of 4 kB, will cause the first and the third 4 kB chunks to be written to the first disk, and the second and fourth chunks to be written to the second disk, in the RAID-0 case with two disks. Thus, for large writes, you may see lower overhead by having fairly large chunks, whereas arrays that are primarily holding small files may benefit more from a smaller chunk size.

Chunk sizes must be specified for all RAID levels, including linear mode. However, the chunk-size does not make any difference for linear mode.

For optimal performance, you should experiment with the value, as well as with the block-size of the filesystem you put on the array.

The argument to the chunk-size option in /etc/raidtab specifies the chunk-size in kilobytes. So "4" means "4 kB".

补充几个问题:
Q:如何得知当前内核是否支持RAID?
A:cat /proc/mdstat 有输出信息则表示内核已支持
或dmesg |grep -i raid dmesg |grep -i md 都能够看到。

Q:如何得知当前内核支持哪几种RAID?
A:安装当前内核源码包,将当前内核配置文档cp到内核源码目录下
cp /boot/config-xxx /usr/src/linux && make menuconfig
看看Device Drivers --->Multi-device support (RAID and LVM)这里的选项就知道了。
cat /lib/modules/`uname -r`/modules.alias |grep raid0
raid0为查看的级别:raid1,raid5...
假如有输出则表示内核已支持,并且/必须是做为模块加载的。

Q:raidtool和mdadm应该使用哪个?哪里有下载?
A:mdadm可能更方便一些。mdadm和raidtool的区别:
The key differences between mdadm and raidtools are:

mdadm is a single program and not a collection of programs.

mdadm can perform (almost) all of its functions without having
a configuration file and does not use one by default. Also
mdadm helps with management of the configuration file.

mdadm can provide information about your arrays (through
Query, Detail, and Examine) that raidtools cannot.

mdadm does not use /etc/raidtab, the raidtools configuration file,
at all. It has a different configuration file with a different
format and an different purpose.
另外我看的这本书里,讲解的是raidtool,这是在RHEL3中所使用的,但是我在RHEL4中做这个lab
发现四张盘里没有raidtool,只有mdadm,看来RH也是偏向于使用mdadm的 :)
下载地址:
mdadm:
http://www.cse.unsw.edu.au/~neilb/source/mdadm/RPM/
http://www.cse.unsw.edu.au/~neilb/source/mdadm/
raidtool:
ftp://194.199.20.114/linux/fedora/core/2/i386/os/Fedora/RPMS/raidtools-1.00.3-8.i386.rpm

OK,这个lab完成啦。
有机会一定要在真实硬盘上试试raid-0 lvm reiserfs,看看是什么感觉 ^_^

mengxin.blogchina.com-933210.html

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

热点关注
IDC资讯 虚拟主机 域名注册 托管租用 vps主机 智能建站
网站运营 建站经验 策划盈利 搜索优化 网站推广 免费资源
网站联盟 联盟新闻 联盟介绍 联盟点评 网赚技巧
行业资讯 业界动态 搜索引擎 网络游戏 门户动态 电子商务 广告传媒
网络编程 Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术 Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷 Internet Explorer
网页制作 FrontPages Dreamweaver Javascript css photoshop fireworks Flash
程序设计 Java技术 C/C++ VB delphi
网络知识 网络协议 网络安全 网络管理 组网方案 Cisco技术
操作系统 Win2000 WinXP Win2003 Mac OS Linux FreeBSD
返回首页 |关于我们 | 联系我们 | 付款方式 | 创业联盟 | 价格总览 | 资讯中心 | 友情链接 | 网站地图 | 招贤纳士 | RSS