Amazon��24,800�ߤ��ä��Τ�Ⱦ���٤줰�餤����äƤߤ���
������!
����Q����Cobalt Qube���褷��������
�ȤϤ������������ٹ��פ��ʤ���FreeBSD + ZFS�ǤϻȤ��Ť餤��Ⱦ���٤�������äơ����Ǥ���ͤζ�ϫ�θ���ɸ��ڤ��Ƥ��������Ǥ褫�ä��Τ����ɡ�
�ɲ�����
- PC3-10600 DIMM 4GB x 2�祻�å�
- 8GB��6000�ߤ���ä�?����ʲ��ʤ�����פ�?
- USB����(��®������)
- ���줬��ư�֥ǥ������ס����Τ褦�ˤ��ƻȤ���8GB�����礦�ɤ����Τ����ɤ��ޤ��޺߸ˤ��ʤ��ä��Τ�16GB�Τ�Ĥ�
- 3.5'' 2TB HDD x (4+1)
- �����Ȥ��蘆�� WD20EARS ��Amazon�Ǥ�6000�ߤ���äȡ��ǰ��ͤʤ�6000�ߤ��ڤ롣Ʊ��2TB�Ǥ�1ǯȾ����1/3�Ǥ��������ܤ�ͽ����
5������٥���3.5�����HDD�Υ�ࡼ�Х륱������Ĥ���Ȥ����ΤϤޤ���äƤʤ���
�ˤ��ȡ�����CD-ROM��IDE�ߴ��⡼�ɤΤ�����դĤ���SATA2�Ȥ��ƻȤ�����ˤϡ�BIOS�ϥå���ɬ�פʤ褦���������ޤǤ���Ф뤫�ʤ��Ȥ����Τ���Ĥȡ�Ʊ�쥢�쥤�Υǥ��������������̤ξ����֤��Τ�ɤ����ʡ��Ȼפä��Τǡ�������Ȥ��ʤ��Ϥ�SATA��������ä��դ���Ȼפ���BIOS�ϥå����Ƥ�Port Multiplier���б��Τ褦������
BIOS������
�ǥե���Ȥ���쥫���ѹ�����Τϡ�[Advanced] �� [IDE Configuration] Write Cache��On�ˤ��뤳�ȡ�����ò¤·¤È¤ï¿½ï¿½Ê¤ï¿½ï¿½È¤ï¿½ï¿½ï¿½ï¿½ï¿½NCQ��Í���ˤ��Ƥ�®���ʤ�ʤ���
FreeBSD-8.2-RELEASE-amd64�Υ��󥹥ȡ���
FreeBSD-8.2-RELEASE-amd64-memstick.img��Ȥä����̤˥��󥹥ȡ��뤹���OK�����餫����¾�Υޥ���Ǥ�äƤ����гڤ��⡣���VMWare�Ǥ�ä�(��)��������������
- ��ư�ѡ��ƥ�������8GB�ʲ��ˤ��뤳�� - �����Ǥʤ���8GB�����ˤ֤Ĥ��롣i386�Ǥ�ʿ�����ä��Τˡ��פ��֤�ˤ���ǵ�ư�Ǥ��ʤ���ˤ֤������ä���
/boot/loader.conf
��kern.cam.boot_delay=10000
����� - ���̤γ���USB�ݡ��Ȥ��Ȥ�������פ��ä��Τ����ɡ��̿��Τ褦����˻ؤ����Ϥ��줬ɬ�ܡ�
ahci������
�����ͥ��ƹ��ۤ��Ƥ���ͤ�¿����������줿�Τ����ɡ�8.2-RELEASE���ߤǤϡ�GENERIC�ΤޤޤǤ�/boot/loader.conf
��ahci_load="YES"
����ꤹ�������OK��
������
ad4: 1907729MBat ata2-master UDMA100 SATA 3Gb/s ad6: 1907729MB at ata3-master UDMA100 SATA 3Gb/s ad8: 1907729MB at ata4-master UDMA100 SATA 3Gb/s ad10: 1907729MB at ata5-master UDMA100 SATA 3Gb/s
�����
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0:ATA-8 SATA 2.x device ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C) ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 ada1: ATA-8 SATA 2.x device ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C) ada2 at ahcich2 bus 0 scbus2 target 0 lun 0 ada2: ATA-8 SATA 2.x device ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada2: Command Queueing enabled ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C) ada3 at ahcich3 bus 0 scbus3 target 0 lun 0 ada3: ATA-8 SATA 2.x device ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada3: Command Queueing enabled ada3: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
�����NCQ��Í���ˤʤꡢ�ۥåȥ���åפ�����褦�ˤʤ�(HP�����ǤϥΥ�ۥåȥץ饰������)��
/boot/loader.conf
�ޤȤ�
������ʬ����Ŭ�ڤ˻��ꤷ�Ƥ����С����Ȥ�ư�����ʤ���Ǥ�Ĵ���Ǥ���ΤǤޤȤᡣ
kern.cam.boot_delay=10000 ahci_load="YES" zfs_load="YES" vfs.zfs.txg.timeout="5"
�����ޤǤ����¾�ɬ�ܤ�����ǡ��Ĥ�Ϥ���ʴ�����NAS�Ȥ��ƤΤ߻Ȥ��ΤǤ���Хǥե���ȤΤޤޤǤ⤤�����ɡ����ä���ZFS�ʳ��ˤ���꡼��Ĥ��Ƥ����Ȥ������Ȥǡ�
# Reserve Some memory for non-zfs tasks # http://d.akinori.org/2010/04/15/ # + Some Tweak kern.maxusers=512 vm.kmem_size="4G" vm.kmem_size_max="6G" vfs.zfs.arc_min="512M" vfs.zfs.arc_max="4G"
AFT�к�
Write CacheÍ���θ��̤ۤɤǤϤʤ��ä����ɡ�����ϡ�
/etc/rc.d/gnop_aft
��ʲ��ΤȤ��������#!/bin/sh # # Original: http://d.akinori.org/2010/04/15/ # renamed zfs_prepare to gnop_aft # PROVIDE: gnop_aft # BEFORE: zfs zvol . /etc/rc.subr name="gnop_aft" rcvar="gnop_aft_enable" start_cmd="gnop_aft_start" stop_cmd="gnop_aft_stop" #required_modules="geom_nop" aft_sector_size=4096 gnop_aft_start() { [ `$SYSCTL_N security.jail.jailed` -ne 1 ] || return 0 local dev for dev in $gnop_aft_devs; do gnop create -S $aft_sector_size $dev done } gnop_aft_stop() { [ `$SYSCTL_N security.jail.jailed` -ne 1 ] || return 0 local dev for dev in $gnop_aft_devs; do gnop destroy $dev.nop done } load_rc_config $name run_rc_command "$1"
musha����Υ��ꥸ�ʥ��Ǥ�(portupgrade�����äˤʤäƤޤ�)��zfs_prepare�Ȥ���̾���Ǥ�����gnop���Τ�zfs�Ȥ�̵�ط��ʤΤ�refactor��chmod +x /etc/rc.d/gnop_aft
��˺�줺��/etc/rc.conf
�˰ʲ����ɲ�# ATF workaround via GEOM NOP -- see /etc/rc.d/gnop_aft gnop_aft_enable="YES" gnop_aft_devs="ada0 ada1 ada2 ada3"
- ǰ�Τ���˺Ƶ�ư����
/dev/adaN.nop
�������Ƥ��뤳�Ȥ��ǧ zpool create
��ada*.nop�����
�ǡ�ada*
�Ǥ������ѡ��ƥ������ϰ����ڤ餺�˻ȤäƤ��롣��������֡��Ȥ���ΤǤ���ФȤˤ�������ư��USB���꡼�Ǥ�äƤ뤷������ʤ�и򴹥ǥ������Ͽ��ʤǤ���лɤ������ǻȤ��롣
���ʤߤ˺��ޤ��̤Τɤ����ǻȤä��ꤷ�ƥѡ��ƥ������ѤߤΥǥ������ϡ�
gpart destroy -F adan
�����OK��
zpool���������
���Ȥ�zpool��������Ƥ���������äƤߤ�Ф����Τ����ɡ��ºݤɤ�ˤ��뤫�¤��Ȥ�����
������������ȡ�HP ProLiant MicroServer �ǥǥ�����4�ܤξ���RAID10��RAID-Z���������ᡣ�Ȥ������RAID-Z2�Ϥ���äȲ٤��Ť���������Ϥ�2GHz�ʾ��CPU��6�ܰʾ��HDD���ߤ�����
�ȤϤ�������Ϥ������Ϥ� Athlon II Neo N36L �Ȥ���CPU���������ä���AMD�������ä�64bit�ˤ�������б����Ƥ��뤷(atom�ä��б����Ƥ���ΤȤ����Ǥʤ��Τ����äƤ櫓���狼��ʤ���)��̤���ѻ��ˤϤ����Ǥ��������ϤʤȤ����ˤ�äƤ��ơ�powerd
�Ȥ���
# sysctl dev.cpu.0.freq dev.cpu.0.freq: 100
��100MHz�ޤǥ����å�������롣�����ǻȤ�NAS�Ȥ����Τ����ʼ¤ϲ��⤷�Ƥʤ��Τ����顢����ϼ¤˹��Թ硣����������FreeBSD�Ǥޤ�powerd�ȤäƤʤ��ͤϡ�
powerd_enable="YES" powerd_flags="-a adp -n adp"
�Ȥ������sh /etc/rc.d/powerd start
���Ƥ������ȡ�����Ρ��ȥѥ���������ǤϤʤ������С��Ǥâ¤ï¿½ï¿½ï¿½ï¿½ï¿½Æ°ï¿½ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½ï¿½Ý¥ï¿½ï¿½È¿ÌºÒ¤Î¿ï¿½ï¿½ï¼±ï¿½ï¿½
- Simple Stripe (RAID0)
- 1073741824 bytes transferred in 3.175971 secs (338083003 bytes/sec)
- Stripe of Mirrors (RAID10)
- 1073741824 bytes transferred in 4.497144 secs (238760829 bytes/sec)
- raidz1 (better RAID5)
- 1073741824 bytes transferred in 5.718750 secs (187758133 bytes/sec)
- raidz2 (better RAID6)
- 1073741824 bytes transferred in 7.782485 secs (137969019 bytes/sec)
���Ƥ��̤ꡢraidz2��ޤᤤ�����1Gbps = 125MBps��Ķ���Ƥ���Τ����ɡ�RAID-Z2���Ƚñ¤¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½load average ��4���餤�ˤʤꡢresilver���פ�����֤�RAID-Z���ܤ��餤�ˡ�Í�����̤⡢RAID-Z�Ǥ�75%�ʤΤ��Ф�RAID-Z2�Ǥ�50%��RAID-Z2�Ǥ���Ф�äȥѥ�ե��CPU�ȥǥ����������ߤ����Ȥ�����
�ǡ��ºݤ�raidz���Ȥ��zpool��4GB�ۤɤΥǥ��������᡼����iMac����AFP���ɤ߽ñ¤¤ï¿½ï¿½ï¿½ï¿½Ý¤Î¥ï¿½ï¿½ï¿½Õ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¡£
GbE�����ù����ä��ɤ߽Ф���
�ʤ���/etc/sysctl.conf
��vfs.zfs.txg.write_limit_override=1073741824
����ꤷ�Ƥ����ȡ��ñ¤¹ï¿½ï¿½ß¤ï¿½ï¿½Ê¤ï¿½é¤«ï¿½Ë¡ï¿½ï¿½ï¿½ï¿½ê¤·ï¿½Ê¤ï¿½ï¿½ï¿½ï¿½Ï¤ï¿½ï¿½ï¿½Ê´ï¿½ï¿½ï¿½ï¿½ï¿½
���ƤΤȤ���ºݤˤ����ä����֤ϤۤȤ���Ѥ��ʤ��ΤǤ���ϥ��ץ���ʥ�Ǥ�����
ZFS���襤����ZFS
1ǯȾ���Ϥ������ʤ�Linux(Ubuntu)��md��RAID���Ȥ�����ɡ�������ZFS�ˤ������ä���raidz�ʤ�RAID Hole�ο��ۤ�ʤ�������ӥ�ɻ������ǥ������ǤϤʤ��Ȥ�줿ʬ�������ʤ��ΤǤ���ʬ®������
�ʲ��ϼºݤ�1T�ۤɻ��Ѥ��줿���֤�scrub���Ƥߤ���̡�
pool: tank state: ONLINE scrub: scrub completed after 1h29m with 0 errors on Sun Jun 19 21:04:04 2011 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ada0.nop ONLINE 0 0 0 ada1.nop ONLINE 0 0 0 ada2.nop ONLINE 0 0 0 ada3.nop ONLINE 0 0 0
��������10GB/ʬ�Ȥ����Τ��ܰ¤���SATA-1�ʥ����ȥ륵���С��Ǥ�8���ְʾ������ä��ΤǤ����֤�®���ʤä���ΤǤ���
���δ֤ⶲ���������餤�Ť��ʤ�����scrub���®�٤��ۤȤ����������ɤ߽ñ¤¤Ç¤ï¿½ï¿½ï¿½Î¤Ë¤Ï¤Ó¤Ã¤ï¿½ï¿½ê¡£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ó¤½¤ï¿½Ê¬scrub��λ���֤ϱ�ӤƤ��ޤ��Ϥ��뤱�ɡ�
�⤦�����ߤ����ʤäƤ��ޤ������������Ѥ��٤��ǡ��������礷�Ƥʤ������ˡ��ܤ򼫿椷�Ƥ����˲������ߤ����ʤ�Ͷ�Ǥ���100MB/���Ȥ���6������
Dan the Man with Too Much Storage to Fill
���Υ֥����˥����Ȥ���ˤ�����������ɬ�פǤ���
��������������
���ε����ˤϵ��ĥ桼�����������Ȥ��Ǥ��ޤ���