LinkedIn Sourceforge

Vincent's Blog

Pleasure in the job puts perfection in the work (Aristote)

Special FreeBSD install for a NAS

Posted on 2024-09-29 17:12:00 from Vincent in FreeBSD Nas

My last evaluation on other BSD has decided my to use ZFS for my NAS.

My OpenBSD is working since +8 years very well, but I'm at 85% of his capacity, so I have to replace/upgrade his capacity.

Despite my OpenBSD NAS offers a pseudo-snaptshot system via rsync, this little machine becomes too small and too old to manage and provide files of several GB we have today. So, why not replace the software when we have to replace the hardware ;).


Introduction

My OpenBSD NAS is running on a Intel J5005 with 1.5Ghz CPU with 4GB of ram.
This machine has 1 Gbps ethernet port.

In more than 8 years this machine has run 24x7 without any troubles. This is why I like so much OpenBSD ;).

It resists to few power cut; I did the upgrade (my sysupgrade) without trouble 2x per year.

I'm mainly using it to share files via NFS, SMB and scp.

NFS is used from other OpenBSD machines and few Linux PC.
SMB is used from Apple MacOS and same Linux PC
SCP is used from Android GSM via Cx File explorer

This machine is also used to broadcast my music via sndiod and mpd.

Why to change it ?

My storage capacity is reaching 85% in such case I replace my disks.
In 8 years, I've replaced the disks 3 times. I've always double the capavity.
Initially I had 1TB, now I have 1 disks of 4TB.

The Hardware machine is becoming old. Not that the capacity of the machine is too low, but running 24x7, this machine can go to into a well-deserved retirement.

Due to my time machine, I have +8 millions of hardlinks. Because of that I've always preferred to perform backups via pax command. And with such volume of data, it takes +- 30 hours. Such backup is perform on 1 cold disk. I install it on my desktop machine and I do the backup via NFS.
I have to find a smarter way to perform those backups too.

My software choice

After having spend time on evaluating Hammer2 and ZFS, I've decide to implement ZFS.

Hammer2 is a very smart Filesystem. I like the ability to restart without FileSystemCheck. And snapshots features are working very well. It does not have a big impact on machine's resources. And I like the cpdup tool they are using. To my knowledge, the work performed by the DragonFlyBSD is not enough recognize. I would love to see it running on OpenBSD ;). But I've the feeling that this will never happen :(.

Remember my old days at Sun E10000 training (mid 2000) where we have used ZFS, I've decided to implement ZFS. This remind me some good old days ;).

Moreover thanks to OpenZFS, this filesystem is often used in companies and with a large open source community.

My hardware choice

I would have a machine with storage 4 disks and 1 disk for the OS.
This machine should use less power as possible and have 2.5Gbps ethernet card

On aliexpress we can find several of such boards, but it's not easy to see how those disks are integrated in the main board. On some systems, I've the feeling that the 4 disks bay share the same slot. Either PCIe or SSD.

On amazon, I find lot of proprietary solutions. Does FreeBSD will run on it ?

And Finally, I found a board Odroid H4+ which match all my requirements. Moreover I already using a Odroid-H2 since several years as firewall. Based on this good experience, Odroid was my choice.

For the RAM, I've decided to install the Kingston Furry 16MG which as the InBond ECC. This will surely not be as good as real ECC, but if this could help a bit. At least this RAM does not cost much more than the other so-dimm.

For Disks, I've bought 4x Crucial SSD. There is nothing special except I like to mark. I've selected SSD instead of HDD because of their lower power consumption.

For the NVME, I've selected the one having the highest TerrByteWrite before failure. There are several marks available. Because of delivery, I've selected the WesternDigital SN700 of 500GB. This is more than I need. But I plan to use it as ZIL and Cache too.
You will see this in later posts.

On early tests, I see a power consumption of 16W for this Odroid-H4+ setup with FreeBSD and ZFS. Which is equivalent to the 18W used by my current NAS system (having 1 spining disk)

You can find the dmesg here

extra note

I've upgraded the Odroid-H4+ bios to version 1.05 upgrade process
Now, I can enable the IBECC ;)
and I can read temperature via sysctl hw.acpi.thermal

Conclusion

The market of low costs NAS is flooded by proprietary solutions. It's not that easy to find one which will be compliant with FreeBSD. At least for a newbee like me with FreeBSD.

In the following blog you will see more and more info about FreeBSD, jails, bhyve and ZFS.

Moreover, I'm willing to evaluate the benefit of having a dedicated partition on the NVME for ZFS log and Cache. Such setup is not part of the standard installation process. But you'll see this in my next posts.



1, 0
displayed: 281



What is the last letter of the word Python?