èªåã¯ãããã©ã¸ãªãªãããé²ç»ããã·ã¹ãã ãéçºãã¦ããããªãã§ããã
ãããã©ããããµã¼ãã¼ã§éç¨ãã¦ãããã¨ããã®ãã¡ã¢ãã¦ãããã¨æãã¾ãã
- åæ
- ãµã¼ãã¼ï¼ãã¼ãã¦ã§ã¢ï¼
- ã¹ãã¬ã¼ã¸ä»£
- ããããå®é¯ã«ã¤ãã¦
- OS, FileSystem
- Backupã«ã¤ãã¦
- CrashPlanã«ã¤ãã¦
- ãã³çã«ã¤ãã¦
- Google Photosã«ã¤ãã¦
- Virtual Box + Windows
- ç£è¦ã»ã¢ã©ã¼ã
- 課é¡ã»ä»å¾ã®æ¹åæ§
åæ
- ã¹ããªã¼ãã³ã°ã®ã¤ã³ã¿ã¼ãããã©ã¸ãª(radikoã2ãã£ã³ãã«ã»ã©ãA&G+ãªã©)ããªã¢ã«ã¿ã¤ã ã§é²é³ã»é²ç»ãã¦ãã
- ãã®ä»æ¯é±æ´æ°ã ã£ãããããã¤ãã¨ã£ã¦ãã
- ãã³çã1æ¥15æ¬ã»ã©ä¿åãã¦ããï¼net-radio-archiveã®æ°æ©è½ã¨ãã¦éçºä¸)
- ãã¬ãæ¾éã®TSã¯ãã£ããã£ãã¦ãªã
ãµã¼ãã¼ï¼ãã¼ãã¦ã§ã¢ï¼
- èªå® ãµã¼ãã¼
- å®é¯: Fujitsu TX100
- PentiumG 2Core 2.6GHz
- Unbuffered ECC Memory 2GB â 8GB ã«å¢è¨
- System HDD 250GB
- 3TB HDD x3
ã¹ãã¬ã¼ã¸ä»£
èªå® ãµã¼ãã¼ã«ãã¦ããã®ã¯ã¯ã©ã¦ãã¹ãã¬ã¼ã¸ã¯ãªã«ãã©ããã£ã¦ãæéãé«ããããS3ã«ææ°ä¸åãæãããã¯èªåã§HDDè²·ã£ã¦ãã¦RAIDçµãã ã»ããçµæ¸çãªæ°ãããã
æè¿ã¯Backblaze B2ã¨ããç ´æ ¼ã®S3äºæã¹ãã¬ã¼ã¸ãçºè¡¨ãããã®ã§ããã¤ã§åãããã«ã·ã¹ãã ãæ¹ä¿®ãã¦ããããããããªãã¨èãå§ãã¦ããã
ãã S3ç³»ã®ãã¤ã¯ãã£ã¬ã¯ããªæ§é ã¨ããã®ãæã¤ãã¨ãã§ãããããããã¡ã¤ã«ã·ã¹ãã ã¨ãã¦ã¯ä½¿ããªãã®ã§ãã¡ã¤ã«ã®ãªã¹ããªããã¯å¥ã«DBã§æã£ã¦ããã¦ããªã³ã¯ã表示ããWebãã¼ã¸ãçæããå¿ è¦ããã£ãããsftpãªããã§å¤é¨ããç¹ãã§ãã¡ã¤ã«ãè¨ç½®ãããã§ããªãã£ããã¨ä¸ä¾¿ãªã®ã§nfsãªããã§ãã¡ã¤ã«ã·ã¹ãã ã¨ãã¦mountã§ãã¦ãªããã¤å®ãã¯ã©ã¦ãã¹ãã¬ã¼ã¸ã¨ãåºã¦ãã¦ãããªãããªã¼ã¨é¡ã£ã¦ã
ããããå®é¯ã«ã¤ãã¦
å®é¯ã¯èªåã§PCèªä½ãããããã ãã¶å®ãè¦ç©ããã¨ãªã£ãããã©ããªç ´æ ¼ã§ãæ¥åç¨ãµã¼ãã¼ãªã®ã§å®å®ãã¦ããã ããã¨æã£ã¦è²·ã£ããå®éå®å®ãã¦ããã ML110ã¨ããããªã®ã¯ããå°ãå¼·ãCPUã欲ããã£ãããã§ãã¾ãç¾ç¶ãããã (CPU Usage Avg 㯠50/200% ããã)ãç´ç²ãªNASç¨ãããªãã¦ã¢ããªã±ã¼ã·ã§ã³è²ã åããå ´åã¯4Coreã®ãã¤è²·ã£ã¦ãè¯ãã£ããããããªã
ECCã¡ã¢ãªãã使ç¨ã§ããªããã®ãè²·ã£ãã®ã¯å®å ¨ã«å¤±æã§Non-ECCãåããã»ããè¯ããèªåã¯ä»æ¹ãªãã®ã§ã¤ããªã¯ã§å®ãã®ã6GBåè²·ãéãããå¤åå ¨é¨ã§6000åããããªã®ã§å®ãã£ã¡ãå®ããECCã¡ã¢ãªã§ãè²ã 種é¡ã¨ããããä¾çµ¦ãå°ãªãã®ã¯é¢åã
OS, FileSystem
- Linux. Ubuntu 14.04
- ext4 (System)
- ZFS (Data Storage)
- ZFS on Linux
- RAID-Z 3TBx3å° (使ç¨ã§ãã容éã¯6TB)
èªå® ã§NASã£ã½ãã·ã¹ãã ãçµãããã«ã¯ãã¼ã¿ããµã£ã¨ã°ããªããã¨ã¯æ¥µãã¦éè¦ã§ãããRAIDã ã£ããSnapshotã ã£ããã®æ©è½ã¯ãã£ãã»ããè¯ãã FreeNASãªãããå ¥ããã°å ¨é¨æããã§ãããèªåã¯ãã®ãµã¼ãã¼ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¼ã¨ãã¦ã使ãããFreeBSDã使ããã»ã©è±ªã®è ã§ã¯ãªãã®ã§Ubuntuã«ããã Linuxã¯FreeBSDã»ã©ZFSã¨ã®è¦ªåæ§ãé«ããªãã®ã§å¤§ä¸å¤«ãä¸å®ã ã£ããä»ã®ã¨ããåé¡ã¯ãªããï¼ã¤ã³ã¹ãã¼ã«ã¯é¢åã ã£ãï¼
Linuxã使ãä¸ã§RAIDã¨Snapshotã使ããçµã¿åããã¯ä»¥ä¸ã®éãã ã
1ã¤ãã¯ãã©ãã£ãæå°çã£ã½ãããBtrfsã¯ä¸å®å®ãã¤RAID5,6ã«ã¤ãã¦ã¯Stableãããªãã ZFSã¯dkmsã§kernelã®buildãå¿ è¦ã ã£ããã¨é¢åã§ããã¤apt-get upgradeãªããã§kernelãæ´æ°ãããã¨ZFSããã¼ããããªããªã£ããåã¤ã³ã¹ãã¼ã«ãå¿ è¦ã«ãªã£ããããã
å ¨é¨å¾®å¦ãªãããªã®ã§ããZFS使ã£ã¦ã¾ããåãããã«ãªã£ã¦zfs_arc_maxã1GBãããã«æãããã å¾ã¯å¿«é©ã
Backupã«ã¤ãã¦
èªå® ã¹ãã¬ã¼ã¸ãã£ã¦ãç¥ãåããã£ã±ããããã§ãããé©ãã¹ããã¨ã«Backupãã¨ã£ã¦ãªã人ãå¤ããã¤ã¾ãã¹ãã¬ã¼ã¸ãè¤æ°å°å£ãããããã§ãã¼ã¿ã¯ããã¾ãã¨ãããå®éé£ã°ãã¦ã人ãå¤ããRAIDããã£ã¦æ éçãä¸ããã ãã§å£ããã¨ãã¯å£ãããé·ã¨ã水害ã¨ãé£ãã£ããRAIDã«æå³ãªãããã ã
ã¨ããããã§ã©ã£ãå¥ã®å ´æã«ãã¼ã¿ãä¿åããå¿ è¦ããããã㧠CrashPlanã¨ãããµã¼ãã¹ã使ã£ã¦ããã
競åãµã¼ãã¹ã«Backblazeãããããã¡ãã¯ãNASã§ä½¿ããªãã¨å ¬å¼ã«æ¸ãã¦ãã£ã¦ãµã¼ãã¼ã«åªãããªãã
Dropboxç³»ã®å®¹éç¡å¶éãµã¼ãã¹ãªããã¯TSéãããããã¨ã/dev/urandoméããããããªã©ã®é¬¼çã«ãã£ã¦ã¬ã³ã¬ã³æ®ºããã¦ãã (Bitcasaã¨ã) ä¸æ¹ã§ãã®ã ãã¶åããããããã¯ã¢ããç³»ã®Backblazeã¨CrashPlanã¯ãã¾ã åé¡ãªãå¥å¨ã§å®å®æãããã
CrashPlanã«ã¤ãã¦
ããã¯ã¢ãããµã¼ãã¹ã $5/monthã§å®¹éç¡å¶éã®ããã¯ã¢ãããã§ããã headless(GUIã®ãªã)ãªLinuxã§ã®ä½¿ç¨æ¹æ³ãªã©ãä¸å¯§ã«è§£èª¬ããã¦ããã ã¾ãå®é復å ããã¨ãã®é度ãç¾å®çãã¿ãããªåé¡ã¯ããããå¿ è¦ãªãã¼ã¿ã ããã³ãã¤ã³ãã§å¾©å ãããã¨ãã§ããããèªåã®ç¨éã ã¨å¤åãªãã¨ããªãã ããã
ã¢ãããã¼ãé度ã¯çµæ§é ãããã³çé¤ãã¦20GB/monthãããã®å¢å éã®èªåã ã¨ãªãã¨ã追ãã¤ãã¦ããããã以ä¸ã ã¨å³ããã¦å·¥å¤«ããã諦ãããããå¿ è¦ããããããããªãã
ããã¯ã¢ããç¨ã®daemonãJavaã§ããã¨ã¡ã¢ãªãæ¶è²»ããããã¡ã¤ã«æ°ã«ããããããã©ã«ãã§1GBæ¶è²»ãããã容éããã¡ã¤ã«æ°ã«ãã£ã¦ã¯ãã以ä¸ã®ã¡ã¢ãªã®å²å½ãå¿ è¦ã«ãªã (詳細ã¯ãã®è¾ºã®ããã¥ã¡ã³ã ã«æ¸ãã¦ãã)
ãã³çã«ã¤ãã¦
ãã³çã¯é²ç»èªä½ã«ãè¦å´ããããã®å®¹éã«ãè¦å´ããã30åç¨åº¦ã®çªçµã§ã300MBç¨åº¦ã®å®¹éãæ¶è²»ããã£ããã¨ä¸ææ¾éã ã£ããéçä¸ç¶ã ã£ããã¨ãã£ãé·æéçªçµãé²ç»ãã¦ãã¾ãã¨1ãã¡ã¤ã«3GBãããã®ããã«ãªãã
ãã³çãé²ç»ãå§ãããã¹ãã¬ã¼ã¸ã«ä¿åãã¦ããã«ãããã¤ãCrashPlanã§ã®ããã¯ã¢ããã追ãã¤ããªããªã£ã¦ãã¦ãã¾ãããã«ãªã£ãã
ãããªãªãæä¸ä¸»ã¨ãã¦ç¾ããã®ãGoogle Photosã§ããããã®ãµã¼ãã¹ã¯åã¨ã³ã³ã¼ãã許容ããã°ãªãã¨å®¹éç¡å¶éã§åç»ãä¿åã§ããï¼ï¼ã¢ãããã¼ããé«éï¼ï¼
ã¨ãããã¨ã§ãã³çã«ã¤ãã¦ã¯Google Photosã«ã¢ãããã¼ãããä¸ã§èªå® ãµã¼ãã¼ããã¯é 次æ¶å»ãã¦ããéç¨ãã¨ããã¨ã«ããã
Google Photosã«ã¤ãã¦
Google Photosã¨ã¯ç»åã¨åç»ã®ç¡éã¹ãã¬ã¼ã¸ï¼æ¤ç´¢æ©è½ä»ãï¼ã§ããããã°ãããã
ã¢ãããã¼ããé«éã§ä¸å¿Quotaã¯ããããã ãCrashPlanã¨ã¯æ¯è¼ã«ãªããªãã»ã©ã®ã¹ã«ã¼ããããåºãã
ã¨ã¯ããLinux Serverã§ä½¿ç¨ããã«ã¯ããã¤ãåé¡ãããã
- Uploadã«APIã使ããã®ãããããããªããå¤ãPicasaã®ãã¤ã使ãããããªä½¿ããªããããªï¼è©¦ãã¦ããªãï¼
- èªåããã¯ã¢ããã½ããã®Google Photos Backupã¯Windowsã¨MacçãããªãLinuxçãç¨æãããæ°é ã¯ãªã
ã¨ããããã§ãã¡ã¤ã«ã®æ´æ°ãæ¤ç¥ãã¦APIå©ããã®ãä½ã£ãä¸ã§è¬APIãå©ããªãã試è¡é¯èª¤ããã®ã¯ã¤ãããã ã£ãã®ã§ããªãã¨ãGoogle Photos BackupãLinuxã§åããªãã試è¡é¯èª¤ãã¦ã¿ãã
- Wine â OAuthã£ã½ãTokenãWindowsã§åå¾ãã¦ã¬ã¸ã¹ããªã®å 容ãWineã«ã³ãã¼ãã¦ããã¨åããã¨ã¯åãããã ãã¨ã¦ãä¸å®å®ã§30åã»ã©ã§åæã«æ»ãã ããã¦ãWineã®è¨å®ã試è¡é¯èª¤ãããã¨ã«æ¯ãã¾ããå¤ãã£ãããã¦ãã¡ã£ã½ãã®ã§è«¦ããã
- Virtual Box + Windows(æ£è¦) + Synced Folder â æ¦ãåé¡ãªãåã
ãªããé²è¦§æã«åç»ã«ãã¡ã¤ã«åãªã©ãã§ãªãã®ã§ä¸è¦§æ§ä½ããã ãGoogle Driveã¨é£æºãã¦ãã¡ãããè¦ãã°ãã¡ã¤ã«åã§ä¸è¦§è¡¨ç¤ºã§ãããã¨ãããã£ããGoogleãµã¼ãã¹éã®è¬ã£ã½ãé£æºæé«ï¼
Virtual Box + Windows
VMä¸ã®Windowsã§Google Photos Backupã¨ããä¸å¿GUIãªã¢ããªãåããããUbuntuã«GUIç°å¢ãå ¥ããã
ãã¹ã¯ãããç°å¢ã丸ãã¨å ¥ããã¨éããã ã£ãã®ã§ X + fluxbox + tight vnc server ã¨ããæ§æã«ãããç°å¢æ§ç¯ã¯ã¨ã¦ãé¢åã ã£ããCPUãã¡ã¢ãªãã»ã¨ãã©æ¶è²»ãã¦ãããåªç§
Google Photos Backupã¯ã ãããåé¡ãªããã®ã®ãã¢ãããã¼ããåæ°åã®ãã¡ã¤ã«ãæ®ãã¦æ¢ã¾ããæ°ãããã¡ãªã¦ãæ¢ç´¢ããªããªãã¨ããåé¡ããã£ããããWindowsã®ã¿ã¹ã¯ã®ã¹ã±ã¸ã¥ã¼ã«ã§ã¢ããªãåèµ·åããbatãã¡ã¤ã«ãç»é²ãã¦ãä¸æ¥ã«ä¸åº¦å¼·å¶åèµ·åãæ¸ããããã«ãããã¢ãããã¼ããæ¢ã¾ãæ ¹æ¬åå ã¯ä¸æã
rem google-photos-backup-restart.bat taskkill \IM "Google Photos Backup.exe" "C:\......Google Photos Backup.exe"
ãããããã¡ã¢ãªã¯æ¶è²»ããªããã®ã®ãããã«CPUãæ¶è²»ããã®ã§Virtual Boxã®è¨å®ã§1Coreã®25%ãªã©ã«å¶éãã¦ããã¨ããã
ç£è¦ã»ã¢ã©ã¼ã
ã¡ããªã¯ã¹ç£è¦ã¯mackerelã使ãããããç¡æã ãæé«ï¼
ãã°ç£è¦ãã¦ã®ã¢ã©ã¼ãã¯æãåã£ã¦ããããä¸å¿cronã®stdout, stderrã®å 容ãã¡ã¼ã«ããããã«ãã¦ãããæ¥æ¬èªæååããç´ããªããmailtoãã©ãã®ãã¡ã¤ã«ã«ãæ¸ãã¦ããªãæ°ãããã®ã«ã¡ã¼ã«ãé£ãã§ãããªã©è¬æåã§åä½ãã¦ããç¶æ ãªã®ã§ãã£ã¨ããæ¹æ³ã«åãæ¿ãã¦ãããããããã®ãããã¯ç¥è¦ããªãã
課é¡ã»ä»å¾ã®æ¹åæ§
- ã·ã¹ãã ãè¤éãã¤æé æ¸ãªã©ããªãããåæ§ç¯ãå°é£ã«ãªã£ã¦ãã
- Google Photosã¾ããã®éç¨ãããå°ãã¾ã¨ãã«ããæ¹æ³ãèãã¦ãããã
- Backblaze B2ã使ãç©ã«ãªãããã§ããã°ãã¡ãã«ãã¼ã¿ãç½®ãããã¼ã«ã« + CrashPlan Backupãªãã¼ã¿ãæ¸ããã¦ãããã