[HOWTO] DIY Replicated NAS with Odroid HC2

Post Reply
domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

[HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

Introduction
Hopefully in the not so far future an academic will write a much needed History of Backup. There is indeed an endless series of technologies that appeared throughout the years to make, manage and restore backups. However my hope is that such an history will dedicate a significant portion of the book about the behavior and psychology of users about backing up their computer(s).

The necessity of backups was born the day someone started to store data on a computer. Probably around the late 40’s throughout the early 60’s. So let’s say the concept of backup was born about 70 years ago. Since then a lot of things happened in the computer industry, yet there are still a lot of people who do not even have of a figment of knowledge about these simple good practices:

1. Backup your data everyday.
2. Maintain multiple images of your backups and preferably in different locations.
3. Check from time to time that restoring a backup actually works.
4. If the data is “secret” like for instance your... own customers data (!) or subjected to legal restrictions like for instance “HIPAA” encrypt your backed up files.
5. Keep one or more copies of your backups on an air-gapped system, meaning: not connected to a wired or wireless network and certainly not the Internet. The easiest way is to have a copy on a system that is usually turned off.

True stories from the 80s

#1
Me (talking to a person who lost his data): Do you have a backup ?
Other person: What’s a “backup” ?
I explained what it was and why it is good to have them. The data was lost forever. In fact, not totally. But the user had to reenter several years of data entry. Thankfully it was still a period where data was small enough to be “stored” on paper too! The user has been a practitioner of backups since.

#2
The story is about a user who was on the verge to sue a developer for data loss. I was called as 3rd party to help both sides solving the conundrum in an amicable way. Where I arrived on location I quickly saw that the external hard disk (a big period box) was sitting on the table next… to a Dot Matrix printer. No wonder that the drive was having bad blocks on a recurrent basis! The drive which in these “old” times did not even have a parking mechanism for the head(s) was beyond repair, the head(s) crashed against the medium so many times. The user did backups of its data… on the same drive *&^%$#@! I explained to the developer how to extract what data could be recovered using block copy to a new drive. About 80% was recovered I learned later. The user and developer were still in business a few years later when I met them at a show. They were adamant to tell me that the disk was now on a separate table and they were using a second to backup every evening.

#3
A user was doing it almost correctly backing up his database on 800K diskettes, but not often enough. An incident occurred and he had to restore. The last backup was something like 3-month old with a set of around 40 diskettes. After checking the diskettes it appeared only one was damaged but making the restore fail in the middle. I relied on some esoteric tool to copy the bad diskette on a brand new one block by block. I then used another esoteric tool which could display some of the bad blocks (not all) on the screen, but not saved them elsewhere. So I had to do screenshots and then write the hexadecimal manually on the new diskette. Less than a dozen blocks could not be restored, so I zeroed them on the new diskette. He was able to restore, repair the database. He lost around two dozens rows but the rest was successfully resurrected. These were the times where we were young, beautiful and stupid. We did not even think about billing the guy for the emergency surgery, we were young, beautiful and… stupid. But a few weeks later he sent a box of pretty good alcohol.

These were the times of backing up on floppies, cassette tapes, more sophisticated tape systems or slow optical.

Fast forward to 2020
Today, backing up is a challenge: between mailboxes, books, pictures, music, videos, graphics, CAD, development projects, etc the amount of personal data you handle has grown exponentially into higher and higher spheres. Many of you the readers probably deals with several terabytes of data at home.
These users thanked the author domih for the post:
powerful owl (Sun Apr 04, 2021 12:33 pm)

domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

Introduction (2)

This DYI is about using 3 x Odroid HC2 to replicate data on 3 parallel NAS using:
- Samba
- Rsync
- CRON

It does not use distributing file systems (see https://en.wikipedia.org/wiki/Compariso ... le_systems). With some basic usage convention you end up with a 3-copy backup with the 3 x HC2 getting synchronized each hour during working hours. Because there is no overhead from a distributed file system, copying to and downloading files from the NAS is still at the 1GbE full speed.

This DYI is supported by a real production deployment.

As the smartctl output shown below details:
- The disk, a WD Red 10 TB, on the first HC2 has been running for 18573 hours = 773 days = 2+ years
- The Load_Cycle_Count (meaning how many times the disk had to spin up) is 10297, about 13 times a day. We will discuss this later.
- No disk errors so far and self-test is OK.

So this is (knocking wood) a no problem system.

Code: Select all

domih@hc2a:~$ sudo smartctl -d sat -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [armv7l-linux-4.14.180-178] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD100EFAX-68LHPN0
Serial Number:    JEGX6UGN
LU WWN Device Id: 5 000cca 267ccd3ff
Firmware Version: 83.H0A83
User Capacity:    10,000,831,348,736 bytes [10.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Apr  4 02:26:09 2021 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82)	Offline data collection activity
					was completed without error.
					Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(   93) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (1134) minutes.
SCT capabilities: 	       (0x003d)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   130   130   054    Old_age   Offline      -       108
  3 Spin_Up_Time            0x0007   151   151   024    Pre-fail  Always       -       436 (Average 436)
  4 Start_Stop_Count        0x0012   098   098   000    Old_age   Always       -       10293
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   067    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   128   128   020    Old_age   Offline      -       18
  9 Power_On_Hours          0x0012   098   098   000    Old_age   Always       -       18573
 10 Spin_Retry_Count        0x0012   100   100   060    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       33
 22 Unknown_Attribute       0x0023   100   100   025    Pre-fail  Always       -       100
192 Power-Off_Retract_Count 0x0032   092   092   000    Old_age   Always       -       10297
193 Load_Cycle_Count        0x0012   092   092   000    Old_age   Always       -       10297
194 Temperature_Celsius     0x0002   191   191   000    Old_age   Always       -       34 (Min/Max 20/49)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     18573         -
# 2  Short offline       Completed without error       00%      3000         -
# 3  Short offline       Completed without error       00%      1850         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
These users thanked the author domih for the post:
powerful owl (Sun Apr 04, 2021 12:34 pm)

domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

About the Odroid HC2
The Odroid HC2 is a low-cost ARM-based SBC with a SATA 3 connector enabling you to run a headless Linux OS (usually Ubuntu server). The SATA 3 connector allows you to use a multi-GB or multi-TB 3.5” hard disk. Thanks to its very large open case heat sink, the Odroid H2 runs totally silent putting aside the spinning hard disk. Due to this hardware configuration the Odroid H2 with its 1 GbE integrated NIC is a perfect low-cost SBC for running a NAS at home, a start-up or a small business.

You can buy the Odroid HC2 at Hard Kernel or at its US distributor Ameridroid or at the local distributor of you country. As of you this writing it sells for ~$55.

figure 1 - The Odroid HC2.jpg
figure 1 - The Odroid HC2.jpg (50.05 KiB) Viewed 638 times
The Odroid HC2

The Odroid HC2 is based on the Odroid XU4 using the Samsung Exynos5422 Cortex-A15 2Ghz and Cortex-A7 Octa core CPUs. The additional accessories are:

• Power Supply (12V/2A)
• Micro SC card
• Top case (optional)
• USB 2 Wireless (optional)

figure 2 - The Odroid HC2 with accessories.jpg
figure 2 - The Odroid HC2 with accessories.jpg (47.34 KiB) Viewed 638 times
The Odroid HC2 with accessories

The case let’s you pile-up several Odroid HC2 onto each other. However, IMHO, this requires a fan (like 120mm) at the back to get rid of the heat that accumulate around the disks, especially the ones at the top. In this article which uses three Odroid HC2, the cases are just laying side by side. No need for a fan. The boards and disks stay quite cool by simple convection, in winter… and in summer. In addition, California being earthquakes country, the HC2 are no just laying on the shelf, there are attached with Velcro.

figure 3 - 3 Odroid HC2 side by side.png
figure 3 - 3 Odroid HC2 side by side.png (1.24 MiB) Viewed 638 times
Three Odroid HC2 side by side

For disks, you are free to use whatever brand, model and size you wish as long as it’s a SATA drive. In this article we will use three WD Red 10 TB which are quite silent, reliable, performing well for a NAS and spin down very often which is good for saving energy (and money).

Next: a discussion about disk Spin Up and Spin Down Cycles and then the software side of this DIY.

powerful owl
Posts: 210
Joined: Thu Mar 28, 2019 8:57 pm
languages_spoken: english
ODROIDs: 3 x H2, 1 x H2+
Has thanked: 66 times
Been thanked: 23 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by powerful owl »

You should write that book!
Another point: don't store data or backups on media that rely on a specific computer to read it. Yes I made that mistake :roll:
Looking forward to the next installment in your series :)

User avatar
mad_ady
Posts: 9428
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 602 times
Been thanked: 673 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by mad_ady »

Indeed, this is a topic where we're captive audience...
I did some data recovery (photorec/testdisk/ddrescue mostly) in my days, lost some data (like an idiot, of course, while demonstrating to my future wife what format d: does...).
On the backup front - I still have a long way to go.
At home, I'm ok - my main NAS uses rsnapshot (that uses rsync and ssh behind the scenes) to do weekly backups of my home odroids) things like /home, /etc, /usr/local. Not full backups, because I dislike using disk space. My personal pictures/videos/keepass passwords are copied weekly to two other local disks + rsync'ed to a geo-redundant site (you know, so that they survive a nuclear blast).
The main risk, IMHO, is not disk failure, but a ransomware which infects a windows PC on the LAN and proceeds to encrypt the file shares... which get synchronized to the other copies destroying everything (in the same philosophy that RAID is not backup). So my suggestion is to have one HC2 to lazily synchronize data (e.g. every month), which is not accessible by host PCs directly - it gives you time to spot that you were hit by ransomware and isolate it.

At work, well... since nobody is tasked with handling backups, there is no centralized backup policy :(. I've tried backuppc at one point, but it felt difficult to set up. Also, it needs to work on all sorts of linuxes - from RHEL4 onwards... Let's just say I'm searching for time to straighten out this mess...

domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

@powerful owl
Thank you. This was supposed to be a future article for the magazine. However Hardkernel told me to just post it on the forums which are much more accessed than the magazine which they stopped. In addition as forum thread, search and comments makes it more interesting. The more comments, the merrier and I'm definitely not the ultimate guardian of wisdom. I'm just sharing a DIY solution that has served me well for 2+ years. The HC2-based solution is a CRON-based system built on what I was doing manually before and I have not lost a file for the last three decades :-) So let's share it with people who may need a similar solution with similar results. The HC2 made it possible because: (a) the disk is protected by the case while minimizing volume (b) the low power consumption of the HC2 makes it OK to run 3 systems 24x365 without blowing up the electricity bill.

@mad_ady
Thank you. I will mention rsnapshot and rdiff-backup as alternatives. I'm sure there are many others.
These users thanked the author domih for the post:
odroid (Mon Apr 05, 2021 3:12 pm)

domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

Which HDD to use and About Load and Unload Cycles
For disks, you are free to use whatever brand, model and size you wish as long as it’s a SATA drive. In this article we will use three WD Red 10TB (https://www.storagereview.com/wd_red_10tb_review) which are quite silent, reliable, performing well for a NAS and spin down very often which is good for saving energy (and money). Last but not least: not rotating = silence, which is a premium feature when the NAS is in your living room.

If a WD Red 10TB is too expensive, you can go, depending on needs, with 8TB, 6TB, 4TB… conversely, if 10TB is not enough, you can go 12, 14, 16 or 18TB.

Due to the CMR vs. SMR scandal for WD Red <= 6 TB revealed by Blocks & Files (see https://blocksandfiles.com/2020/04/14/w ... recording/) and popularized by STH (see https://www.servethehome.com/surreptiti ... -must-end/ and https://www.servethehome.com/wd-red-smr ... d-red-smr/) you want to go with CMR, for that consult the articles and decide which drive you want to go with: used <= 6TB pre-SMR or any >= 8 TB, used or brand new, or Red Pro no matter what.

The scandal is not about SMR itself but rather the fact that Western Digital replaced CMR with SMR in existing CMR products without telling anybody. Western Digital has subsequently broken its NAS Red brand in two, Red and Red Pro, to put its embarrassment into the past.

Note that Red are 5400 RPM while Red Pro are 7200 RPM. I never used a Red Pro so I can only speculate on their noise level in comparison to their 5400 RPM brothers.

Again, if Western Digital Red or Red Pro is not your cup of tea, use whatever brand you want.

The WD Red spin downs just after a few minutes. This means that in a Home or SOHO usage the disk will probably have to spin up for reading or writing files. This entails 3 or 4 seconds of wait when this happens. There are two aspects to address here:

1. Don’t hard disks die faster when they are constantly spinning down and spinning up?
2. You don’t want to wait 3 or 4 seconds.

In WD parlance spinning up and spinning down are called load/unload cycles.

Specification for WD Red
https://documents.westerndigital.com/co ... ed-hdd.pdf

Specification for WD Red Pro
https://documents.westerndigital.com/co ... ro-idk.pdf

For both series, the max Load/Unload cycles row says 600,000 cycles.

Let’s do a quick computation. Let’s say we are going to have the HDD load/unload 50 times a day (roughly twice and hour over 24H)

1 year = 50 x 365 = 18,250 cycles
10 years = 50 x 365 x 10 = 182,250 cycles
25 years = 50 x 365 x 10 = 456,250 cycles

So after 25 years of usage, we are still well under the 600,000 cycles.

In addition, the smartctl statistics posted earlier show an actual 13 load cycles a day in my usage over two years. Indeed, unless one never sleeps, no activity occurs during the night and unless one works 7 days, very low activity occurs during five days (working at the office) or two during week-ends (working at home, but at normal days and hours). It also depends on how many people use the NAS and on special situations like being mostly stuck at home for lock-down reason putting aside covidiots and mask-holes who don’t care and think they are different and eternal.

Anyway, no matter which disk you end up using, check the load cycles from the manufacturer product specifications and from the HDD with smartctl if you buy a used one.

You might think “but I heard that turning on and off a HDD too often is damaging!”, that might have been true of long time ago (70’s? 80’s?) but it is simply an urban legend today. Disks have been highly reliable for several generations. Similarly, think about the reliability of cars up to the 1950’s compared to today’s cars. Same thing.

Reducing the number of load cycles and addressing the 3 or 4 seconds wait when accessing the NAS when the disk was idle (not rotating) is performed through the same tool: a tool from the brand or a 3rd party tool which allows you to change the idle period. See for instance http://hd-idle.sourceforge.net/.
These users thanked the author domih for the post:
powerful owl (Sat Apr 17, 2021 9:20 pm)

User avatar
mad_ady
Posts: 9428
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 602 times
Been thanked: 673 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by mad_ady »

TL;DR version: For WD greens, use wdiddle to turn off agressive head parking.

Regarding load cycle - here's an excerpt from my ~7 year-old WD Green drive, that I used for ~4 years inside a WD Mybook NAS:

Code: Select all

Model Family:     Western Digital Green        
Device Model:     WDC WD30EZRX-00AZ6B0 
Serial Number:    WD-WCC070344331           
LU WWN Device Id: 5 0014ee 2b2e8cbb2                        Firmware Version: 80.00A80                           
User Capacity:    3,000,592,982,016 bytes [3.00 TB]         
Sector Sizes:     512 bytes logical, 4096 bytes physical    
Rotation Rate:    5400 rpm
....
4 Start_Stop_Count        0x0032   074   074   000    Old_age   Always       -       26785               
5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0                        
7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0                      
9 Power_On_Hours          0x0032   014   014   000    Old_age   Always       -       62965
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       1660841           
194 Temperature_Celsius     0x0022   122   092   000    Old_age   Always       -       30
The excessivelly high load count happened while on the WD NAS, because the drive's firmware had a misconfigured "park drive heads unconditionally every 8 seconds" setting. I had to use widdle3 to turn that off, but I learned about it too late. Details about this, here: https://www.truenas.com/community/threa ... exe.18171/

Since I moved the disk on an Odroid based nas (and reconfigured the park timer), load cycle hasn't increased significantly.

Almost a year ago I got a 4TB WD Blue and moved the data on it. The older 3TB drive became a backup disk that wakes up a couple of times a week. In contrast, my Blue drive has this load count after a year of usage as a family NAS (probably wakes up a few times a day for picture/video streaming):

Code: Select all

193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       1953
These users thanked the author mad_ady for the post:
domih (Sun Apr 18, 2021 12:14 am)

fvolk
Posts: 610
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 74 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by fvolk »

domih wrote:
Sat Apr 17, 2021 3:26 pm
Which HDD to use and About Load and Unload Cycles
In WD parlance spinning up and spinning down are called load/unload cycles.
Hmm... sure?

Attribute "12 Power_Cycle_Count" is the counter how often the harddisk was power cycled.
Attribute "4 Start_Stop_Count" is the counter how often disks spin up and down.
Attribute "193 Load_Cycle_Count" is how often the heads move from on-platter to the side unto the parking ramp.

In others words, attribute 193 is the robustness of the plastic ramp where heads move to rest, see e.g. https://www.dq-int.co.uk/blog/seagate-b ... -weakness/
That piece of plastic survives the specified xxxxxx load/unload cycles and "green" harddisks that constantly park their heads wear out their xxxxxx cycles sometimes very fast - but not for average consumers to notice.

Moving the heads away from flying over platters (e.g. my harddisk shows separately SMART "240 Head_Flying_Hours") when they are longer idle increases robustness against vibrations, at the cost of increased latency as the heads have to move back from ramp position onto the platters on next access, obviously. Workaround: I do hdparm -B 254 /dev/... on my disks on boot, that cures the rapidly rising load cycles count and the constant clicking noises of heads (un)parking. Don't buy disks that hardwire such values (or even worse, USB eternal 2.5" cases that auto spin-down harddisks and it cannot be modified in software)

If load cycle count is the same as start stop count that means the harddisk's firmware does no intermediately rest heads on ramp while platters are still spinning - probably to due its intended use case where extra latency for read accesses is not acceptable (performance series, e.g. WD black) or the drive was built by design more robust to resist against vibrations - NAS drives.

Frequent spin up/down is still a mechanical stress, and it's different to the endurance of that head parking plastic ramp.
After how many cycles spin up/down a drive dies today, I don't know, but NAS drives are probably hardened for this, as they are against vibrations as they are expected to run in a set.

I set my drives to auto spin-down after 30min idle at midnight every day and next day on first access they spin up again and they run through until midnight. This compromise works fine for me :-)
These users thanked the author fvolk for the post:
domih (Mon Apr 19, 2021 2:26 am)

fvolk
Posts: 610
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 74 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by fvolk »

On the subject of NAS and backup:
I run a Odroid H2 with 2x 2.5" drives in RAID 0, to compensate against SMR and have extra throughput to always fill GBit network speed. Maybe one day I will have 2.5G network, but until then I don't care.
Periodic backup is via borgbackup - so only delta of changes, compressed and encrypted - to a rotating set of external 5TB 2.5" USB disks, which are stored offline in different places.
A borgbackup snapshot can just be mounted transparently, so recovery of specific files is trivial and fast.
Works for me and has helped me already several times to recover accidentally lost/deleted files.
Initially I did this with a HC1 and a single disk, but due to missing encryption support in CPU I moved to the H2 as base - and the performance jump was worth it.
These users thanked the author fvolk for the post:
domih (Mon Apr 19, 2021 2:29 am)

brad
Posts: 1421
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 128 times
Been thanked: 208 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by brad »

Not a NAS but as a backup library I'm using HC4 with mirrored 4tb disks and urbackup. Running BTRFS with compression and offline deduplication jobs running at the moment have around 7Tb of backups stored (backups run every 12 hours across number of devices and have around 6 months of history). I would not say has saved me but has been very handy for going back to old data. Now with 5.11 kernel BTRFS is very stable. Some more details here viewtopic.php?f=206&t=40971 I do take somewhat monthly btrfs snapshots and store these at another location but the ideal will be to automate snapshots to the cloud or another location.

Here is a pic of how much worth of backups I can store on the 4Tb of mirrored disk (current deduplication job has been running for over a week now (probably take a week more) so expect to be able to reclaim some more space then):
Untitled.png
Untitled.png (104.99 KiB) Viewed 418 times
My current NAS is an Odroid N1 (yes N1) and has external 2Tb hdd connected (all backed up to urbackup above)

My new SAN/NAS is WIP and running on H2+ and have expanded it to 6x full speed sata ports with dual 2.5G Ethernet connectivity. Currently with 2x sata ssd's achieving 200+ MB/s over the 2.5G ethernet using samba/NFS. Once I buy more ssd's (6 in total) will have it as raid 10 and expect to be able to max out both 2.5 Ethernet ports in a multipath configuration for iscsi with over 400Mb/s available bandwidth (both directions). It runs TrueNAS with ZFS storage but has been a bit more expensive to build than the old one. A happy snap with only 2 drives connected and the one 2.5G connection at the moment as proof of concept.
Untitled1.png
Untitled1.png (261.55 KiB) Viewed 418 times
All these connect to another H2+ running OPNSense with the netcard acting as router / switch for everything which works surprising well
These users thanked the author brad for the post:
domih (Mon Apr 19, 2021 2:30 am)

domih
Posts: 404
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4 - 1GbE, 2.5GbE, 10GbE, 40+GbE
Location: San Francisco Bay Area
Has thanked: 156 times
Been thanked: 155 times
Contact:

Re: [HOWTO] DIY Replicated NAS with Odroid HC2

Post by domih »

fvolk wrote:
Sun Apr 18, 2021 6:25 pm
domih wrote:
Sat Apr 17, 2021 3:26 pm
Which HDD to use and About Load and Unload Cycles
In WD parlance spinning up and spinning down are called load/unload cycles.
Hmm... sure?
No, I'm not. I hesitated between the values which are pretty similar. I will revise the OP. TYVM!

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 4 guests