1. NAS h/w
HP新品:HPE ProLiant MicroServer Gen10,AMD x3216双核1.6-3G DDR4 1.6G/x3421四核2.1-3.4G DDR4-2.4G自调频,没有ECC/热拆拔的PC(其实有raid热插拔就不能用了)。除非你必须DIY,用它就好。
1.1 WD DX4000 (x86)
该机在11年11月推出目前仍在卖,1.8G Atom D525主板,DDR3 800M SODIMM 2GB(可扩4GB,PC3-10666),Raid 1或5 RE4-GP黑盘,Giga Ethernet/电源均为双口支持容错,双USB3支持USB UPS,普通电源19V6.3A,准备用DELL 19.5V代用。主板比Minit-ITX窄,SATA背板通过PCie槽垂直连去主板。
软件是Windows server 2008R2 essential支持remote desktop,DLNA,速度是Synology 712/411的3倍。但是rebuild要花数天,且Raid5不保证完整性。待机功耗41W,启动时4盘同转65W,关机6W。
http://www.storagereview.com/western_digital_sentinel_dx4000_review http://www.wdc.com/wdproducts/library/UM/ENG/4779-705064.pdf http://www.wdc.com/en/products/products.aspx?id=610#Tab6 http://support.wdc.com/downloads.aspx?DL
Server recovery ISO: 下载9.54GB的ISO,用DVD仿真软件打开运行,或写入双层DVD光盘启动。
DX4000 Sentinel Storage Server更新:
1.主机LCD会显示“SOFTWARE UPDATE AVAILABLE will display on the LCD screen. ”2.由PC通过登录到NAS main dashboard,选Monitor|Software Update tab 3. 选Check for Update|Download & Install button或Update from file再打开预先下载在USB中的。zip文件(USB要插在NAS上),Cont,等6-10分钟LCD显示NAS名和IP即可。Cloudme Server backup: 这是Win 2008R2的plugin,下载解压为.wssx直接在NAS上运行。
仅下述硬盘可用:http://support.wdc.com/KnowledgeBase/answer.aspx?ID=9443 3倍普通黑盘价!http://techoddsandends.com/2012/09/02/hacking-the-western-digital-sentinel-dx4000/
1.2. MYAPM (Arm64) X-C1 Mini-ITX
64bit ARM 8-core, Mini-ITX,4SATA,2 DDR3 1600 ECC,3x1G + 1x10G lan, PCIe3x8, 2xUSB3, . 可装Ubuntu:https://wiki.ubuntu.com/ARM/Server/Install/Mustang
上图是revA普通版,pro版4xSata靠边;新板4xSata居中,15.10最新板tag是3PCB-×即revC的第二改版。http://f2.svbtle.com/arm-64-bit-walkthrough-of-the-mustang https://www.apm.com/docs/APM883208-X1_X-C1_GSG_2014_0001.pdf
安装Ubuntu 14.04和按厂家编译Linux没问题,ZFS没有,除非自己按源码编译给Arm。
其它链接:https://www.google.com/search?q=mustang+arm64
1.3. 主板(Mini-ITX为主)
1.3.1 DDR3
chipset difference: https://www.pugetsystems.com/labs/articles/Z170-H170-H110-B170-Q150-Q170---What-is-the-Difference-635/
ASRock C2550D4I 带4核C2550 $270最低$250,8xsATA3+2xsATA2,4xECC DDR3,超过HP Microserver Gen8,保修3年。 E3C224D4I-14S带4xsATA3+8xsas2, 170x214mm。E3C224D2I类似,2x8GB ECC,无12V直供, $170。MT-C224, LGA1150(i3-4160T/i5-4590T),4x8GB ECC,4sATA3+2sATA2,12V直供,尺寸是198x170 $199, 缺货。这类主板监控都是AST2300带显示。4K回放需要带GPU的CPU有HDMI输出的主板。
ASRock J3455-ITX,Intel J3455 quad core (upto2.3GHz)支持H264/VP8codec。空冷 ,SODIMM DDR3/3L 1866,4sATA3,板后/中均有USB3。网口可用USB3加或2230尺寸M.2如Intel 7260NGW 802.11ac。CPU比Microserver gen10 x3216慢,后者位于i3-4170与i3-4350之间。https://www.cpu-monkey.com/en/compare_cpu-intel_celeron_j3455-662-vs-intel_core_i3_4150-361 Gigabyte ga-j3455n-d3h: 与上板差别是双1G网口PCIx1少M.2和PCIe,US没卖,ebay有欧货。
Biotech A68N-5600, CPU A10 4655 20W, 比5745稍慢,比旧货WA68N-5545/磐正A5545NX7快,都是四核AMD,5545CPU不如J3455,但GPU快,AES快太多了。DDR3@1333最大32GB,4sATA3,USB3,1G,PCIe2x16。板载CPU/常规DDR3/4sATA性价比最高。一家两名分打国外内市场,评价好。
AD2550R/U3S32带双核D2550,2xDDR1066 SODIMM最大4GB,2xsATA3+5xsATA2,性能只有J3455的25%:http://blog.brianmoses.net/categories/nas-build/
Asrock E350M1 Mini-ITX, AMD 1.6G dual CPU, DDR3-1066 upto 16G, PCIex16, 10x USB 2.0, 4x SATA600, eSATA, Gigabit LAN and a Realtek ALC892 audio chip, DVI/HDMI 1080P support BD play, VGA 2K, AMD Radeon HD 6310/DX11 GPU, 22W idle/31W) .http://asrock.pc.cdn.bitgravity.com/Manual/E350M1.pdf?
1.3.2 DDR4
16G DIMM https://www.newegg.com/Product/Product.aspx?Item=N82E16820232258&ignorebbr=1 15-15-15-35 1.2V比别的稍好。
1151 CPU: https://www.asrock.com/mb/Intel/H270M-ITXac/index.asp#CPU
Family | Number | Core↑ | Frequency | Cache | Power |
Celeron | G3930T(S0) | Kaby Lake | 2.7GHz | 2MB | 35W |
Pentium | G4560T(S0) | Kaby Lake | 2.9GHz | 3MB | 35W |
Pentium | G4600T(S0) | Kaby Lake | 3.0GHz | 3MB | 35W |
Core i3 | i3-7100T(S0) | Kaby Lake | 3.4GHz | 3MB | 35W |
Core i3 | i3-7300T(S0) | Kaby Lake | 3.5GHz | 4MB | 35W |
Core i5 | i5-7400T(B0) | Kaby Lake | 2.4GHz | 6MB | 35W |
Core i5 | i5-7500T(B0) | Kaby Lake | 2.7GHz | 6MB | 35W |
Core i5 | i5-7600T(B0) | Kaby Lake | 2.8GHz | 6MB | 35W |
Core i7 | i7-7700T(B0) | Kaby Lake | 2.9GHz | 8MB | 35W |
7代KabyLake前是6代Skylake, 35W的有G39/44/4500T,61/63/64/65/66/6700T.
最新NAS:https://www.chiphell.com/thread-1711829-1-1.html ZFS有两种Cache:读L2ARC和写SLOG,但扩容不便。家用用960 EVO做L2ARC即可。CPU风扇GELID的Silent 5,机箱2xNoctua的NF F-12 IndustrialPPC-2000 PWM。
旧的E3C232D2I,6SATA(0与M.2 2230共用),236芯片支持8SATA和宽PCIe,但Mini-ITX没用到。无ECC的板有ASRock H270M-ITX/ac或GA-H270N-WIFI都支持ECC DIMM(nonECC mode),Gen6/7 CPU支持RAM速度是2133/2400。M.2+6sATA(),2x1G网,802.11ac+BlueTooth,板内2xUSB3。缺点无DP(用电视盒子播放就没关系;Ga-H270M-DS3H mATX有DP),单DIMM需放B槽靠外。为支持6盘可用Samsung NVMe M.2 PCIe G3x4盘或板内USB3盘。CPU可选i3-7100T(2/4带显,$117)或G4560T($64,稍慢少AVX2指令集)。
08/18: http://cpu.userbenchmark.com/Compare/Intel-Pentium-G4560-vs-Intel-Core-i3-8100/3892vs3942 含可用主板,但未包括新的如Z370M-ITXac,配新i7100 gen8,快但65W。旧版配45W G4560T为好,前几个月还缺货价高。M.2可用Intel 760P,这样总共可用6xSATA。配置类似的BM-HDV是7.2x9.6,ASUS P10S-M是9.6x9.6带8xSATA,2x1G,支持ECC但限于5代CPU。
1.4 简单的硬盘方案:a)Dell Laptop加CD bay硬盘成双盘。b)E系列加Dock即有2x1G网口和2xeSATA2,再加GP-EXP-2ESATA expresscard to SATA2(Sil3132,HDD速度与E6410 eSATA2相近)共四口。顺便说一下E4200/6410的eSATA不带电源,Dock的eSATA(实际是eSATAp)带。有的laptop eSATA可经port multiplier(PMP)转多盘但速度下降,E6410不支持PMP。
FL1100是2016年底出的PCIe转4xUSB3.0的片子,也用于3xUSB3的expresscard。该芯片单口速率是380Mbps显然是USB2速率兼容USB3规程而已,故不建议expresscard转接的USB3。USB3接口盘Unitek Y-3036用ASM1153E芯片还不错,用S3710 800G SSD顺序读写可达420及400MB/s。
还有人用router的USB或刷DD-Wrt/Asus用其USB接硬盘,不过我的6300V2原厂固件的USB3极不可靠。
2. NAS s/w
必读:http://www.freenas.org/freenas-vs-ubuntu-with-zfs-on-linux/
http://storageroot.com/articles/nas4free-freenas-amahi-openmediavault
非专业可用AMAHI,这个也不错:http://napp-it.org/features_en.html
Windows 2012 R2有存储池类Raid,加NFS/SMB支持Linux分区,注意NFS比SMB快。
2.1 FreeNAS
FreeNAS用ZFS不推荐硬Raid。FreeNAS和基于Linux的NAS,都推荐用8-16G U盘装系统,硬盘与系统独立,这是比Windows好的地方。但是,Windows的软件尤其是媒体应用更方便,对PC硬件的支持更好。
FreeNAS基于FreeBSD,软Raid用ZFS。据说V7(NAS4Free)用于BT比V8好。基于Ubuntu的可以用ZFS或MDADM:http://storageroot.com/articles/nas4free-freenas-amahi-openmediavault
2.2 Ubuntu NAS
http://wiki.dreamrunner.org/public_html/Misc/Software/Ubuntu-NAS.html
https://www.sysgeek.cn/ubuntu-zfs-filesystem/
old: https://docs.google.com/document/d/1hFw1YnH9s-1Y9M4VPLgPOOjm1iH6PJOHefg5NhGC4oA/edit?pli=1
Ubuntu server不装xserver就不需要图形界面。以下服务:NFS=Windows 文件共享, Apache=http服务器, Mysql=数据库服务器, SSH=远程管理, uShare=多媒体upnp服务器/DLNA, transmission=bt下载, webmin=web端管理, acpid=直接按电源钮关机。
2.3 其它
OpenMediaVault:https://post.smzdm.com/p/524816/
Solaris+Napp-It: http://www.experts-exchange.com/Networking/Network_Management/Network_Operations/Q_27710888.html
http://lifehacker.com/turn-an-old-computer-into-a-do-anything-home-server-wit-510023147
http://lifehacker.com/turn-an-old-pc-into-a-nas-vpn-media-streamer-and-mor-1516484110
小结:新版FreeNAS和NAS4Free都支持ZFS。Ubuntu的ZFS发表的是ZFS做Root,当然也可能做成类似NAS。我试过了下遇到些问题,觉得还不够可靠。
国内windows服务器软件:http://www.phoenixp2p.com/cn/xapp.htm
3. Disk and Raid
3.0 SnapRaid http://www.songming.me/snapraid-compare.html https://www.snapraid.it/faq
优点:
缺点:
Parity+Data disks can be 1+4, 2+14, 3+21, etc. OS shall be Raid1. 在运行第一个“同步”之前,用memtest86这样的程序检查你的RAM内存。SnapRAID时数据丢失的最常见原因是RAM坏!经常运行“同步”命令。从一天一次到一周一次。每周运行一次“scrub”命令。使用smartmontools或类似的工具来监控SMART属性。在第一个Reallocated_Sector_Ct,Current_Pending_Sector或Offline_Uncorrectable,即使它仍然有效,请更换磁盘。一种始终安全的方法是不删除文件,而将它们移动到同一磁盘中的另一个目录中,但在由SnapRAID检查的目录树之外。然后可以运行“同步”命令,并且只有在它完成后才真正删除这些文件。如果在“同步”过程中出现磁盘故障,则必须运行“修复”命令,指定删除的文件的存储位置.
https://wdullaer.com/blog/2016/03/19/create-a-nas-with-redundancy-using-snapraid/ https://zackreed.me/setting-up-snapraid-on-ubuntu/
配置就是编辑下列模板存到执行文件的安装目录下:
# Example configuration for snapraid for Windows
# Defines the file to use as parity storage
# It must NOT be in a data disk
# Format: "parity FILE [,FILE] ..."
parity E:snapraid.parity
# Defines the files to use as additional parity storage.
# If specified, they enable the multiple failures protection
# from two to six level of parity.
# To enable, uncomment one parity file for each level of extra
# protection required. Start from 2-parity, and follow in order.
# It must NOT be in a data disk
# Format: "X-parity FILE [,FILE] ..." #2-parity F:snapraid.2-parity
#3-parity G:snapraid.3-parity
#4-parity H:snapraid.4-parity
#5-parity I:snapraid.5-parity #6-parity J:snapraid.6-parity
# Defines the files to use as content list
# You can use multiple specification to store more copies
# You must have least one copy for each parity file plus one. Some more don't hurt
# They can be in the disks used for data, parity or boot,
# but each file must be in a different disk
# Format: "content FILE"
content C:snapraidsnapraid.content
content K:arraysnapraid.content
content L:arraysnapraid.content
# Defines the data disks to use
# The name and mount point association is relevant for parity, do not change it
# WARNING: Adding here your boot C: disk is NOT a good idea!
# SnapRAID is better suited for files that rarely changes!
# Format: "data DISK_NAME DISK_MOUNT_POINT"
data d1 K:array
data d2 L:array
data d3 M:array
# Excludes hidden files and directories (uncomment to enable).
#nohidden
# Defines files and directories to exclude
# Remember that all the paths are relative at the mount points
# Format: "exclude FILE"
# Format: "exclude DIR"
# Format: "exclude PATHFILE"
# Format: "exclude PATHDIR"
exclude *.unrecoverable
exclude Thumbs.db
exclude $RECYCLE.BIN
exclude System Volume Information
exclude Program Files
exclude Program Files (x86)
exclude Windows
# Defines the block size in kibi bytes (1024 bytes) (uncomment to enable).
# WARNING: Changing this value is for experts only!
# Default value is 256 -> 256 kibi bytes -> 262144 bytes
# Format: "blocksize SIZE_IN_KiB"
#blocksize 256
# Defines the hash size in bytes (uncomment to enable).
# WARNING: Changing this value is for experts only!
# Default value is 16 -> 128 bits
# Format: "hashsize SIZE_IN_BYTES"
#hashsize 16
# Automatically save the state when syncing after the specified amount
# of GB processed (uncomment to enable).
# This option is useful to avoid to restart from scratch long 'sync'
# commands interrupted by a machine crash.
# It also improves the recovering if a disk break during a 'sync'.
# Default value is 0, meaning disabled.
# Format: "autosave SIZE_IN_GB"
#autosave 500
# Defines the pooling directory where the virtual view of the disk
# array is created using the "pool" command (uncomment to enable).
# The files are not really copied here, but just linked using
# symbolic links.
# This directory must be outside the array.
# Format: "pool DIR"
#pool C:pool
# Defines the Windows UNC path required to access disks from the pooling
# directory when shared in the network.
# If present (uncomment to enable), the symbolic links created in the
# pool virtual view, instead of using local paths, are created using the
# specified UNC path, adding the disk names and file path.
# This allows to share the pool directory in the network.
# See the manual page for more details.
# Format: "share UNC_DIR"
#share server
# Defines a custom smartctl command to obtain the SMART attributes
# for each disk. This may be required for RAID controllers and for
# some USB disk that cannot be autodetected.
# In the specified options, the "%s" string is replaced by the device name.
# Refers at the smartmontools documentation about the possible options:
# RAID -> https://www.smartmontools.org/wiki/Supported_RAID-Controllers
# USB -> https://www.smartmontools.org/wiki/Supported_USB-Devices
#smartctl d1 -d sat %s
#smartctl d2 -d usbjmicron %s
#smartctl parity -d areca,1/1 /dev/arcmsr0
#smartctl 2-parity -d areca,2/1 /dev/arcmsr0
3.1 Raid
上图是Riad0/1/5/10。Raid5若有一盘坏,重构几乎肯定遇到10^14的读错概率,导致重构失败。Raid1+0的上下层分别是1和0,即具有raid 1的安全和raid 0的加速。只建议用Raid 0/1/1+0=10。
软件Raid有Linux下的MDADM或ZFS。前者实现传统Raid,传统Raid有些问题;后者扩充容量不便,常用mirror(双盘适合硬盘)Raid-Z1(3盘,校验盘1),Raid-Z2(4/6/10盘,校验盘2),Raid-Z3(5/7/11盘,校验盘3),允许坏盘数等于校验盘数。
Ubuntu ZFS: http://www.coctec.com/docs/net/show-post-68218.html https://wiki.ubuntu.com/ZFS
http://www.jamescoyle.net/how-to/478-create-a-zfs-volume-on-ubuntu
https://help.ubuntu.com/community/Installation/SoftwareRAID
3.3 Windows的Raid
In Windows they don't call their RAID options by the traditional 0, 1, 5, 10 etc. Instead they use spanned, striped, and mirrored as the options for creating software RAIDs. Windows 2K8 has all but Windows 7/8 has no raid 5.
http://www.howtogeek.com/howto/36504/how-to-create-a-software-raid-array-in-windows-7/ http://www.maximumpc.com/how-set-software-raid-0-windows-and-linux-2015/ http://www.buildegg.com/bewp/?
Windows7 的raid1,只需在格式化时选new mirror volume,维护时右击选相应盘看功能。比如换盘需AddMirror和Resynching,有时需offline再online。OS也可以 mirror称为primary和flex,primary坏了需转接flex盘再选flex启动,再换加薪盘,用msconfig改提示信息。
3.4 Storage Pool (Windows 8.x/10 Server 12)
下载:https://msdn.microsoft.com/en-us/windowsserver2012r2.aspx
http://543925535.blog.51cto.com/639838/1105672 https://community.emc.com/docs/DOC-20768
可选1-N块盘建存储池,然后在其上建逻辑盘:simple、mirror(至少两块盘)、parity(至少三块盘,三重备份)。避免raid容量不同的浪费,可增减盘(右击):
创建时:物理磁盘——添加到存储空间——创建虚拟磁盘——建立卷组
删除时:删除卷——删除虚拟磁盘——删除存储空间——离线物理磁盘
数据删除重复组件:在“添加角色和功能向导”—“选择服务器角色”界面,将文件和ISCSI服务下面的“数据删除重复”勾选.
4. 硬盘、机箱与电源
佑泽2600(200x260x210D)支持200x240(7.87x9.45")主板,底板可直接装2.5+3.5,支持ATX电源(150x86x140)。扩展盘的方法:
a)ATX电源下加挂2.5+3.5;或底板放2x3.5单层,4x3.5双层(立人L04盘架)
b)电源部位竖立5x3.5"盘架(112x146x170):电源(ITX-PA250W 82x40x150)放旁边或底部;或外置DELL 12V18A直入MT-C224或经立人LR1106-250W转ATX。
c) 电源部位扩孔吊装Intel SC5300的6盘架ECRI4220687,顶部接口板掉180度安装以节省空间,底部装ITX-PA250W电源。插卡不能用,需考虑散热。LGA1151散热孔距75mm孔径4mm。
DIY机箱:https://www.youtube.com/watch?v=K8hLXJUQFoc&feature=youtu.be ebay/amazon有3D Carbon Fiber Film和El wire。6mm MDF板加角码,上粘螺帽。
4.1 SSD
http://dealnews.com/c473/Computers/Storage/Hard-Drives/Internal-Hard-Drives/f1284/SSD/
WD RED NAS用硬盘MTBF是1E6, 耗电12V1.75A,6个盘加i3-6100T(max51W),12V18A电源有约3A裕量。SSD 1TB价格$200-240(May16),Samsung/PNY最好, Mushkin次之,再Crucial/Sandisk, Kingston较差,OCZ最差。SanDisk 240G SSD是1.75E6。
PNY测试: http://diy.pconline.com.cn/788/7886864_2.html http://www.notebookreview.com/review/pny-cs1311-vs-pny-cs2211-consumer-vs-gamer-ssds/ ATTO软件用压缩型数据,AS SSD用非压缩型数据,加上SSD控制器也有压缩处理,测试结果会有不同,非压缩控制器因写入量大通常较慢,但是遇到已压缩过的数据时可能较快?AS SSD Benchmark则有两种数据显示:http://ssd.zol.com.cn/582/5822455.html 也可用crystal diskmark。
6. VNC
http://blog.aizhet.com/Windows/6739.html
6. Dlink 32x NAS http://dns323.kood.org/start
f/w support 4TB: http://sourceforge.net/projects/alt-f/
320support 3TB: http://www.ebay.com/itm/D-Link-DNS-320-ShareCenter-2-Bay-Network-Storage-Enclosure-DNS320-/171828200901
7. 4K video editing
http://www.intel.com/content/dam/www/public/us/en/documents/guides/workstation-adobe-4k-guide.pdf
Exon E5 v3 2Cpux12core,64G RAM,4G video RAM,12T SSD
8. 实例
考虑:https://www.zhihu.com/question/21359049 https://post.smzdm.com/p/64200/ http://wiki.dreamrunner.org/public_html/Misc/Software/nas-summarize.html
Banana Pro(Arm A7 2x1.2G):https://www.hackster.io/Leo/using-banana-pro-to-build-nas-home-server-9530a5
J3160: http://wiki.dreamrunner.org/public_html/Misc/Software/nas-summarize.html Linux ZFS,硬盘休眠通过hdparm的-B参数设定硬盘的advanced power managemant值。原值254一直转,改为127(0-127是休眠),再改/etc/hdparm.conf使重启后有效。结果硬盘大部分时间是休眠,温度40左右,电源处也不烫了。磁头重启数Load_Cycle_Count的增加每年约1万5,与寿命60W次比可忽略。
J3455-ITX,CPU 10W,SSD系统盘分一块虚拟做数据盘缓冲:https://post.smzdm.com/p/632679 https://www.intel.com/content/dam/support/us/en/documents/network-and-i-o/wireless-networking/August_2016_Intel_WiFi_Adapter_Information_Guide.pdf
Z270M-ITX/ac+i3-7100T: https://partofthething.com/thoughts/building-a-nas-serverhome-server-in-2017/ Ubuntu 17.04(ZFS,NAS,SAM),setup SSH,install nVidia 1070(machine learning) driver. Z270比H270强的地方是可超频。
8盘(C2750D4I+D1541D4I-2L2T):https://www.chiphell.com/thread-1711829-1-1.html
DIY系列: https://blog.brianmoses.net/2017/03/diy-nas-2017-edition.html https://blog.brianmoses.net/2017/12/diy-nas-econonas-2017.html
这里要说明ASRock主板只提供windows非服务器驱动,其它OS未必能装。故可以Win10为主加NFS server。喜欢黑群晖(5.2 5592up2)的可用虚拟机(esxi或HyperV):https://post.smzdm.com/p/439699/
9. 其它
DDR3是240pin,DDR4是288pin。ECC/non-ECC DIMM的管脚定义相同,差别在前者每byte多了1bit CBx校验(在DataBurst后)输出,Alert脚也多了相应功能。当然这些功能都需主板支持。ECC用于非ECC主板的可能障碍,是主板是否可能利用CBx不输出的这段时间?DIMM上的EEPROM其mode register是可以禁止CRC输出的,编程参考:https://forum.arduino.cc/index.php?topic=141848.0 ASRock H270M-ITX/ac说明支持ECC运行在非ECC模式,支持Gen6 Skylake,gen7 Kabylake,不支持gen7 300 series。当然所有RDIMM都不能用。