分类: LINUX
2012-04-25 14:42:56
原文出处: Setting up XFS on Hardware RAID — the simple edition
硬盘分区的边界对齐
RAID有最小的分配单位stripe size,硬盘的最小分配单位Sector size,我们在RAID建立的逻辑硬盘上,分区的时候要对齐stripe
如果刚好整出,就是对好了,否则需要重新分区,对齐边界
建立XFS文件系统
需要指定两个重要参数
RAID 1+0: drives / 2.
RAID 5: drives – 1.
指定 ‘su’ and ‘sw’参数
# mkfs.xfs -d su=64k,sw=4 /dev/sda3
指定mount参数
,比如常见的noatime,nodiratime,nobarrier
/var/lib/mysql xfs nobarrier,noatime,nodiratime
设置IO scheduler
好的IO cheduler有两个选项:
Deadline is an active scheduler
noop simply means IO will be handled without rescheduling.
立刻生效:
echo noop > /sys/block/sda/queue/scheduler # update the scheduler in realtime
永久生效:在grub.conf中指定参数‘elevator=
kernel /boot/vmlinuz-2.6.18-53.el5 ro root=LABEL=/ noapic acpi=off rhgb quiet notsc elevator=noop
This is a complicated topic, and I’ve tried to temper the complexity with what will provide the most benefit. What has made most improvement for you that could be added without much complexity?