Using actual, raw FreeBSD as the OS on TrueNAS hardware?

I'm looking to replace an old NAS, and started looking into TrueNAS (the OS(es)). I haven't yet come across any compelling reason why I shouldn't just use FreeBSD instead. However, while investigating that, I noticed that TrueNAS also makes actual computers, and I kind of like what I've seen of their Mini line.

I imagine that if I buy a diskless TrueNAS Mini and stick some disks in it, there's no reason why I couldn't just install FreeBSD rather than TrueNAS. But I haven't been able to find anything on the web actually saying so. No matter what search terms I use, the only results I've been able to get are things like "TrueNAS CORE is based on FreeBSD" or "Here's how to install FreeBSD inside a TrueNAS jail". I know TrueNAS CORE is based on FreeBSD. I don't want to run FreeBSD inside a TrueNAS jail. I just want a physical computer that I can stick a bunch of disks in with FreeBSD as its (main) OS, and I'm wondering if there's any reason why a TrueNAS Mini couldn't be that physical computer.

Does anyone have any information or insight on this? Thanks in advance.
 
If TrueNAS boots so should FreeBSD. But you'd probably need to install all NAS apps (enable NFS and install samba) yourself. You'd also need to manage it from the command line as it's doubtful their web based GUI would still work. It may or it may not. Essentially you'd be converting it from a TrueNAS appliance to a FreeBSD computer.

Think of it as akin to replacing Windows on a laptop with FreeBSD.
 
Make sure you take a backup first. The TrueNAS folks may have customized their kernel and/or userland for their appliance. None of this is 100% sure as we don't know all of what they've done to implement their appliance. But in theory this should probably work.

Try booting it off a USB drive first. The proof of concept (POC) should give you the assurance needed to continue with the project. If you already have a FreeBSD machine you can clone the drive to create a test USB drive. Or you could buildworld/buildkernel and installworld/installkernel to DESTDIR=/mountpoint. Cloning an existing machine would be simpler.

Your test USB would be easiest to build if the source machine was a UFS system. In that case you'd need to create a FreeBSD slice using fdisk or gpart, creating FreeBSD partitions using bsdlable or gpart, and using a dump/restore pipe like this -- dump 0f - / | (cd /new_root && restore xf -) -- for each UFS filesystem. If your source machine uses a zroot zpool, the job may be tricker, though you could zfs send | zfs receive to the new device. Then test on your source machine to make sure it boots. Then test it on your TrueNAS appliance. If it boots and you can play around with stuff you're safe to blow away your TrueNAS O/S and install FreeBSD.

Booting FreeBSD from ISO on the TrueNAS would be another way to to test. Just make sure you can mount the TrueNAS filesystems, have a look around to give you the assurance. If any of the above tests pass you're probably good to go.

This BTW is what I do when shopping for a new laptop. Except that I install X on the USB disk to make sure X works. You might want to try that too if you want to use your TrueNAS as an X workstation. If you want to use it as a server, whether X will work on it or not won't matter.

Just tread carfully so you can recover should it go horribly sideways, which I doubt it will, but you never know until you try.
 
FWIW this is what I do. I have a lovely TrueNAS mini, comes with a decent IPMI, dropped a 10G NIC in it, slapped on FreeBSD, and it's been doing a flawless job since then.

If anybody else comes down this path, aside from making obvious backups, note down disk partitions and labels, matching them up to physical disks, and ethernet devices.

- whether this is a UEFI or BIOS boot sysctl machdep.bootmethod
- keep output of gpart show -l and gpart show -p as well
- MAC addresses of all devices & whether aggregated, failover, static assigned or DHCP
- which device(s) are used as ZIL, SLOG, and if they're mirrored or now
 
  • Like
Reactions: mer
One thing I fear about is that TrueNAS guys specially crafted softwares (kmods and/or userland daemons) to support hot-replaceable drive trays, if any.

If I'm forced to implement any, I would want microswitch or some others to non-maskablly interrupt system and force the drive on the tray to be sync'ed in full speed (unless physically broken, thus, disallowing it) and at the very moment electric/electronic connection is lost on the drive, everything can be sane. This should forcibly pend any other jobs on the system.

This would force system to "degrade speed" by forcing synchronous operations to the drive to minimize write-backs when some errors are detected, need software support.

How does NAS manufacturers (not limited with TrueNAS) implement these?
Of course, any cold-swap-only NAS'es does not need considering these.
But it would be one of the key features for NAS'es with multiple hot-swappable drive bays.
 
Thanks, dch and T-Aoki.

FWIW, I wound up buying a TrueNAS Mini and installing FreeBSD on it, and it has been great (for a bit over a year now). I pretty much ignore the smallish drive that came with it; I don't even enable it in FreeBSD or the BIOS (in fact I think it might even still have TrueNAS installed on it, though I'm not 100% sure anymore).

My plan for it at the time (and in fact still my plan now, but it's... uhhhhhhh... very low priority) was to get rid of TrueNAS from it, write a VERY simple OS (described momentarily), and set it up as my default boot drive. When I want to boot the machine, I'd manually select the FreeBSD boot drive, but when anybody else does (and doesn't manually select a boot drive), they'll be presented with a prompt asking for a name. After they presumably enter one, the machine will start playing Progress Quest, and won't react to any input whatsoever :p
 
How does NAS manufacturers (not limited with TrueNAS) implement these?
Not just NAS manufacturers, but any storage system with replaceable disks.

How is that implemented? There is a broad spectrum.
  • At the simplest end is relying on the human who replaces disks to be smart enough. For example, in the UI (user interface) for the human the disks are named clearly, say 1...6 for a 6-disk NAS, and there are little numbers 1...6 printed next to each disk slot.
  • What is a little more comfortable is to add LEDs next to each disk slot. They are often color coded, for example green = power or activity, red = failure, blue = find me or replace me.
  • An underlying question here is how disks are even identified. For a small NAS with 6 disk slots, that's pretty easy: six numbers printed on the case, left to right. For a storage server with 2000 disks, spread over multiple racks and multiple enclosures in each rack, things are a lot more complex. Now build these storage servers into a cloud- oder supercomputer-scale deployment, with 100K disks in a single room (data center), and a lot of thought has to go into making it clear where each component is physically located. What you may see in practice is a map-like coordinate grid: 5th row of racks from north to south, then 3rd rack in the row from west to east, then 4th enclosure from the bottom of that rack, then 12th disk from the left, it should have the red LED on solid and the blue LED blinking, otherwise don't touch it.
  • The next level of complexity is to have a small sensor (typically a microswitch, as you suggested) that notices when the human starts to remove the disk; this can be attached to the extraction lever that many disk trays have. That microswitch can then be used to sync the disk (as you suggested), or to spin it down, and in particular to notify the system why the disk is about to vanish.
  • The harshest version I know of is a solenoid (electrically operated magnet) that prevents the disk from being removed, so the human can not pull out the wrong disk. The solenoid is then controlled in cooperation with the UI for field replacement of disks. Typically, there is a little pin hole that can be operated by a paperclip to override the solenoid in case of software failure.
A lot of this depends on the intended reliability of the system, its scale, and therefore its cost. And how well trained the field service technicians are. And even with the best systems and the best humans, the #1 cause of data loss is still mistakes made by field service, usually pulling the wrong disk out.
 
rwv37

Keep in mind that iXsystems does not produce any of the parts of TrueNAS Mini series.

The cases are from Ablecom company:
- https://ablecom.com/en/product/Chassis/Tower-Workstation/CS-M55
- https://ablecom.com/en/product/Chassis/Tower-Workstation/CS-M50
- https://ablecom.com/en/product/Chassis/Tower-Workstation/CS-T80

The motherboards are from Supermicro or ASRock companies:
- Supermicro A2SDi-4C-HLN4F with Intel C3558
- Supermicro A2SDi-H-TF with Intel C3758
- ASRock Rack C3558D4I-4L with Intel C3558

Today it would be better to get some AMD Ryzen or AMD EPYC Embedded or Intel N100/N150/N200 CPU on a Mini-ITX motherboard.

There are also great tiny NAS solutions with up to FOUR M.2 slots for really small low power and still fast NAS storage options such as this one:
- https://aliexpress.com/item/1005008648309450.html
- https://aliexpress.com/item/1005008456753400.html

There are also multiple NAS cases to choose from:

Hope that helps.

Regards,
vermaden
 
There are also great tiny NAS solutions with up to FOUR M.2 slots for really small low power and still fast NAS storage options such as this one:
- https://aliexpress.com/item/1005008648309450.html
- https://aliexpress.com/item/1005008456753400.html
Thank you. Some very interesting hardware options.

I know from experience that passive cooling may not be sufficient to run any sort of heavy duty cycle with (at least some) M.2 SSDs. If you choose to use multiple M.2 SSDs, the wise approach is to follow others. Otherwise, look for SSD slots with clearance for a good heatsink, SSDs that run cool by design, and case design options that allow you to add some sort of fan(s), as a last resort.
 
gpw928

Each of these M.2 ports in these boxes is capable of only 1x PCIe 3.0 speed = 1000MB/s so these M.2 drives will definitely run far from their maximum speed = less heat/more cool.

The good news is - 1000MB/s is plenty of transfer for a small NAS - especially after You enable GELI or ZFS encryption.

I was thinking of buying such box and creating RAID5/raidz from them with 3 data/1 parity ... but as my current NAS works well - I just keep it in mind as an option :)
 
I'm not sure I follow your comparison or at least should read it as "fair".
J3355B-ITX was already dated and slow back in 2019, the board you linked to only has 2 SATA, Realtek NIC, retailed for about 75-80 EURs performs about 60-70% slower compared to a N95 SoC. The Odroid boards also sports a "generic" barrel plug so you can use your old laptop PSU just fine or pick up one cheap as chips. Adding costs for the additional hardware to match doesn't make it much of a bargain at the bottom line.
 
I'm not sure I follow your comparison or at least should read it as "fair".
J3355B-ITX was already dated and slow back in 2019, the board you linked to only has 2 SATA, Realtek NIC, retailed for about 75-80 EURs performs about 60-70% slower compared to a N95 SoC. The Odroid boards also sports a "generic" barrel plug so you can use your old laptop PSU just fine or pick up one cheap as chips. Adding costs for the additional hardware to match doesn't make it much of a bargain at the bottom line.
I did not needed 4 SATA ports at the time and 4 SATA ports options were in the same price range ... slower - yes - but also less power consumption as N95 has 15W and N97 has 12W.

... also its about timing. NOW the Odroid H4+ costs what it costs - when I built these systems - Odroid H1 or H2 only were available - and in Poland to get them in THAT time it would cost about $200 for each of them - that was just not worth it.

The PSU ... I usually get Pico PSU for about $15-17 - then 5525<->USB-C adapter for $2 and then I just use USB-C charger for another $7 or so ... and You still need Barrel<->USB-C adapter and USB-C charger for Odroid H4 which means $15-17 more on the Mini-ITX solution compared to Odroid.

For $220 from here - https://aliexpress.com/item/1005008456753400.html - you get Intel N150 6W CPU along with 12 GB RAM and 64GB eMMC and Case and PSU - and its smaller then Odroid H4+.

For comparison Odroid H4+ (just a motherboard) with Intel N97 12W CPU comes for $140 and Odroid H4+ Ultra (just a motherboard) with Intel N305 15W CPU comes for $220 ...

Why not N100 6W and N97 12W instead on Odroid H4+? I do not know ...

But if I would be to decide - none of the Odroid H4+ options are reasonable when it comes to price.

... and if you need SATA ports instead of these M.2 ports - https://aliexpress.com/item/1005005544067216.html - there is $5 adapter for that :)
 
It also comes with zero aftermarket support so have fun if you find bugs (which you likely will) and when there's a new vuln discovered, there goes security. N95 because of availability and speed, they explain the reasoning on their site and there's also ark.intel.com.
JMicron JMB585 is poor at best and the PCB will be so thin and brittle that it'll be very unreliable, you want something like this instead https://radxa.com/products/accessories/m2-to-hexa-sata-adapter/ with some kind of reinforcement (like the acryllic one). To be honest, you seem to just post random ewaste with no serious evaluation at all. A USB-C charger for 7$ is extremely likely to be a safety/firehazard, there's a reason why they get banned for import in various countries and why on earth you'd you go that route when a used laptop PSU (Delta/Chicony/FSP/Lite-on etc) is like 20$ or even less?
 
I have been buying/using all these things in the past and once such USB charger failed me - all other times it just worked - maybe I am just lucky.
 
Back
Top