Skip to content

Instantly share code, notes, and snippets.

@dchest
Last active February 14, 2018 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dchest/8925274b497cd7236e497b416eb15ba7 to your computer and use it in GitHub Desktop.
Save dchest/8925274b497cd7236e497b416eb15ba7 to your computer and use it in GitHub Desktop.
Duct tape NAS

Photos

https://twitter.com/dchest/status/963536947699486721

Components

Total (without shipping, which is cheap): $404

Software

Notes

  • Performance: over the network (SMB), uploads are ~ 2 minutes per gigabyte. Good enough for my purposes, but of course, very slow compared to a "real NAS".
  • I read that RPi shares USB bus with LAN port, so wi-fi may be faster... will check this later.
  • Local writes to HDD are ~20 MiB/s.
  • The purpose of two drives is for redundancy, not for more space. If one drive fails, my data is still safe on the other drive. At first, I wanted to create RAID-1 (easy with OpenMediaVault, but >2 days to resync 4 TB drive), but then decided that I also care about software failures, so I plan to have one drive as a primary, which is rsync'ed overnight to another drive. This way, if some bug or my mistake leads to deletion of something on one drive, I can unplug that drive and restore data from another drive before it resyncs. This is not perfect (not a proper backup, since there's no historical data snapshots), but allows me to use all 4 TB and have some time window where I can recover from an accident. (I also have SMB configured with recycle bin — deleting a file actually moves it to .recycle directory, which is cleaned every 30 days. Just a few clicks in OpenMediaVault.)
  • It needs two power cords: one for Raspberry Pi, one for USB hub.
  • Powered USB hub is needed because RPi, while having 4 USB ports, has not enough power for two HDDs (two SSDs will probably work though).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment