DataHoarderAnon

/hsg/ + /dhg/ FAQs

Oct 24th, 2020 (edited)
4,359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.95 KB | None | 0 0
  1. ***************************************************************************************************************************************
  2. Due to pastebin's new "Policy" of deleting random shit for no reason, the information in this paste has been migrated to the /g/ wiki.
  3. If you would like to help contribute and make our page better please do so here.
  4.  
  5. > https://wiki.installgentoo.com/wiki/Home_server
  6.  
  7. Feel free to Keep this paste bookmarked, just know I will no longer be maintaining it as of now.
  8. ***************************************************************************************************************************************
  9.  
  10. FREQUENTLY ASKED QUESTIONS
  11. ------------------------------------
  12.  
  13. --------What hardware do I get?------------------------------------------------------------------------------------------------------
  14. Depends on your use case. A simple file server can be run on an SBC with a couple hard drives attached. If you want to do more fancy things like virtualization, streaming 4K movies, etc you are going to want better hardware. If you plan on using ZFS or Btrfs, server grade hardware and ECC ram are recommended but not required.
  15.  
  16.  
  17.  
  18. ---------What OS do I use?-----------------------------------------------------------------------------------------------------------
  19. See the Useful Links pastebin for an overview of operating systems and file systems. OMV is good enough if all you are storing is rarely accessed (pirated) media. Even standard Linux like Ubuntu supports software raid and filesystems like OpenZFS. TrueNAS core (formerly FreeNas) is BSD based and fairly simple to install and use but server grade hardware and ECC memory are recommended.
  20.  
  21. > https://pastebin.com/Jg4bvf4y
  22.  
  23. ---------Should I use raid 5 (or raid 5 equivalent)?---------------------------------------------------------------------------------
  24. Rebuilding a raid array is an intensive process and it's not uncommon for a second disk to fail during the process. Raid 5 and equivalents only offer 1 disk redundancy, so if a disk fails during your rebuild you're fucked. Try to aim for at least two disk redundancy, or do a raid 10 instead.
  25.  
  26.  
  27.  
  28. ---------Hardware or Software Raid?--------------------------------------------------------------------------------------------------
  29. Software raid typically has a number of features that are more beneficial than just standard RAID. Best in class at this moment is ZFS which has automatic file self healing and file system level checksums to combat bitrot. Btrfs is also good if you want an alternative to ZFS, but is still in development so be careful. Unraid is more noob friendly (but you pay for it). Snapraid+merger FS is a viable (free) alternative to Unraid if you don't feel like spending money on your OS. Check the Useful Links pastebin for more on these options.
  30.  
  31.  
  32.  
  33. ---------Should I use ZFS?-----------------------------------------------------------------------------------------------------------
  34. ZFS has a lot of really great features that make a a superb file system. It has file system level checksums for data integrity, file self healing which can correct silent disk errors, incremental snapshots and rollback, file deduplication, encryption, and more.
  35.  
  36. There are however, some downsides to ZFS. Notably inflexibility and the upfront cost. ZFS RaidZ arrays CANNOT BE EXPANDED after being created. Parity cannot be added either (you cannot change a RaidZ1 to a RaidZ2 later on). You cannot use differently sized disks or disks with data already on them, even disks formatted as ZFS. In other words, you need to buy ALL of the disks you plan on using in your RaidZ array at the same time, because unlike other software raid (or even hardware raid), you won't be able to change it later. This inherently makes ZFS costly to use and thus unfriendly to more budget oriented server builds. Now also add in the fact that running ZFS also requires a hefty amount of RAM, preferably ECC ram, which is expensive in and of itself and requires server hardware to utilize to it's fullest, and that some of the fancy features like dedup also require a good processor too... The price tag starts to add up really quickly.
  37.  
  38. So when asking yourself "Should I use ZFS?" you really should be asking "Do I really need ZFS?" (Do I want long term data integrity and all those other fancy features?) and "Can I afford ZFS?". If the answer to both of those questions is "Yes", then you can and should use ZFS, otherwise use something else like Snapraid or mdadm.
  39.  
  40.  
  41.  
  42. ---------What are containers and why should I use them?------------------------------------------------------------------------------
  43. "Containers" are a method of isolating running software from both the host OS and other software. You may also hear them called Jails or Chroot Jails if you are running some variant of BSD (such as TrueNas CORE/FreeNas).
  44.  
  45. There are a number of reasons why you would want this.
  46. - Less overhead than standard virtual machines because you aren't virtualizing the kernel.
  47. - Isolated software cannot interfere with each other or the host. If a container crashes it won't effect anything else.
  48. - Like VMs, containers are portable. You can create a container, configure it however you want, and deploy it anywhere.
  49. - Like VMs, removing containers and starting from scratch or a backup in the event of a fatal crash is easy.
  50. - Docker and Podman containers are incredibly easy to deploy and you can find pre-configured container images online.
  51.  
  52. Best practice is to keep the base OS as clean as possible and install each individual application (such as Plex, Samba, etc) in their own container. This makes your server much more stable since there is no chance of a containerized application crashing your server, or an installation gone wrong from ruining your host OS.
  53.  
  54.  
  55.  
  56. ---------If I use raid does that mean I don't need to backup?------------------------------------------------------------------------
  57. Raid is not a backup. Not even Raid 1. Raid doesn't protect against accidental deletion or total failure of an array. We STRONGLY recommend a 3-2-1 backup strategy. 3 Copies, 2 on site, 1 remote. If you cannot afford that, backing up to external drives or the cloud is better than nothing.
  58.  
  59.  
  60.  
  61. ---------Should I Shuck?-------------------------------------------------------------------------------------------------------------
  62. It's massively cheaper to buy WD Easystores or WD Elements (when they go on sale) than it is to buy an equivalent size NAS hard drive like WD Red/Iron wolf. Just remember: YOU VOID YOUR WARRANTY. If your drive fails you are most likely fucked. When you buy regular NAS drives you are basically paying more for the warranty.
  63.  
  64. A note on WD externals, Some 8 and 10TB drives are air-filled rather than filled with helium. These air-filled drives can run significantly hotter than the helium ones. Check the model number with Crystal Disk Info before shucking, if it has an H it is most likely a helium drive. If you have airflow constraints in your case, it might be better to try and get Helium drives, otherwise it shouldn't be much of an issue.
  65.  
  66. > https://old.reddit.com/r/DataHoarder/comments/9x59uo/8tb_wd_red_idle_temperature_headed_for_the_moon/e9rqvm2/?context=3
  67.  
  68. Some other things to consider if you decide to shuck:
  69. - Shucked drives under 8tb might be SMR drives.
  70. - Shucked drives lack the middle mounting hole that most other drives have. You may need an adapter for your HDD trays if your case doesn’t support them. Some cases might not have adapters at all, research before buying your case!
  71.  
  72. Regarding the 3.3v pin issue:
  73. - Shucked drives WILL NOT BOOT with most consumer power supplies. This is because of a feature on enterprise drives that lets administrators reboot hard drives by powering the 3.3 volt pin which isn’t used on consumer hard drives. Consumer PSUs, of course, always power this pin, so the hard drive will be stuck in an infinite boot loop and never power on. This can be solved by covering the first three pins on the hard drive with insulating Kapton tape.
  74.  
  75. > https://i.imgur.com/tLiFcar.jpg // These pins here.
  76.  
  77. - DO NOT use liquid electrical tape. This can damage the drive.
  78. - DO NOT cut the Sata power cable this can damage the drive and your PSU.
  79. - Molex to sata adapters DO work but be careful, as some of the poorly made ones can catch fire. I wouldn’t risk it.
  80.  
  81.  
  82.  
  83. ---------SMR or CMR?-----------------------------------------------------------------------------------------------------------------
  84. SMR stands for "shingled magnetic recording" It's an alternative method to conventional magnetic recording (CMR) that traditional hard drives use. While SMR technology allows for greater data density, they are also slow compared to CMR. These drives are bad for NAS use cases and especially bad for ZFS due to compatibility issues. Just avoid them all together. See the WD red guide in the Useful Links pastebin for which models are SMR and which are CMR. All Seagate NAS drives are CMR. Easystores/Elements 8tb and above should be safe.
  85.  
  86.  
  87.  
  88. ---------Should I get SSDs?----------------------------------------------------------------------------------------------------------
  89. SSDs are recommended for the OS and programs only, or for use in cache, or ARC cache in ZFS in place of expensive ram. Don't buy SSDs for main storage unless you want to spend tens of thousands. Check out the SSD buying guide for more on SSDs.
  90. > https://ssd.borecraft.com/SSD_Buying_Guide_List.pdf
  91.  
  92.  
  93.  
  94. ---------My motherboard is out of Sata ports! What do I do?--------------------------------------------------------------------------
  95. There are a number of options for increasing the number of drives your server can support. The best and recommended approach is to use a SAS HBA with SAS to Sata breakout cables. Each SAS port can support up to 4 Sata drives (or even more if you use an expander). You can find used LSI SAS HBAs on ebay for relatively cheap which have ~2 internal ports, or 8 total Sata drives. Avoid SAS1 cards as they are far too old by now and have some limitations.
  96.  
  97. Sata HBAs and port multipliers/Expanders are not recommended. They are garbage and not worth buying. Sata port multipliers specifically can cause issues when you try to us any kind of Raid with them.
  98.  
  99. There are some counterfeit LSI cards on the market, avoid Chinese sellers, sellers with no return policy, etc.
  100. > https://forums.servethehome.com/index.php?threads/how-to-buy-non-counterfeit-lsi-9207-8i.26304/
  101. > https://www.youtube.com/watch?v=QQUWwhDU_KQ // Good video on how to spot counterfeits.
  102.  
  103.  
  104.  
  105. ---------What about Synology, Qnap, etc?---------------------------------------------------------------------------------------------
  106. Only buy a prebuilt NAS if you want to spend more and get less. They are typically woefully under powered for the price and you’re better served with a $65 odroid than a $300 QNAP/Synology. That said, they are the most noob friendly option with a GUI interface for setup.
  107.  
  108.  
  109.  
  110. ---------So I have my server set up and my OS installed, what now?-------------------------------------------------------------------
  111. First thing you want to do is set up your storage and implement your Raid (if any). You can find the necessary guides for setting up your particular storage solution in the Useful Links pastebin.
  112.  
  113. > https://pastebin.com/Jg4bvf4y
  114.  
  115. Now that you've set up your storage, you want to share your storage directory(s) over the network so you can begin transferring and managing files on your server. The most common way to do this is by using Samba or NFS. TrueNas makes creating shares incredibly easy, other OS's might be a bit more involved. There should be guides readily available on how to set up shares in the forums for whatever dedicated OS you are using, try searching "samba" or "nfs" in the forums and you should find some guides. If you are running standard Linux like centOS or Ubuntu, there are plenty of guides online how to set up Samba/NFS on your particular distro.
  116.  
  117. > https://ubuntu.com/tutorials/install-and-configure-samba#1-overview // Super easy guide for setting up Samba in Ubuntu
  118.  
  119. If you want to use Samba/NFS in a container (you should!), you first want to "bind mount" the directory you wish to share into the container. Once you've done that, install Samba/NFS into the container and point Samba/NFS to newly bind mounted directory.
  120. > https://docs.docker.com/storage/bind-mounts/ // If using docker containers
  121. > https://gist.github.com/julianlam/07abef272136ea14a627 // if using LXC on standard Linux
  122. > https://www.ixsystems.com/documentation/freenas/11.3-U5/jails.html#additional-storage // For FreeBSD Jails in FreeNas
  123.  
  124. Go into your other computer and map the share you just made. Now you should be able to transfer and manage the files on your NAS remotely. Now you can do whatever you want with the share! Add permissions so only you can access certain files, use a program like rsync on your PC to sync files between your PC and NAS, Schedule regular backups of your computers to the NAS, transfer over your movie collection to use with Plex, It's up to you!
  125.  
  126.  
  127.  
Add Comment
Please, Sign In to add comment