Help with setting up ZFS as a beginner

4w4tts

Cadet
Joined
Oct 15, 2022
Messages
3
Hi,
My storage media:
- My Passport (WDC WD20NMVW-11EDZS2) 2TB USB external HDD
- An old 1TB laptop HDD (2.5”) now in an HDD caddy inside my laptop (connected through the internal SATA port for the ODD)
- An old 1TB 3.5” HDD that connects via a SATA-USB adapter

I've ran badblocks on the two 1TB drives without any errors and the SMART values are all good.

I have about 12GB of non-ECC RAM on an ASUS X556UQK laptop.

Being on Linux for a while now, I'd like to try a CoW filesystem. Btrfs doesn't have any native encryption. ZFS with its native encryption sounds a bit easier to me than having to add another layer of complexity. So I'm going to settle on ZFS, at least for now, but I'm totally new to these concepts, and since I want to have my data encrypted and secured ASAP, I'm in a hurry to set things up. Where can I best learn the essentials? Is this guide recommended?

Is it possible to stripe (not sure if it's the correct term) the two 1TB drives and use the whole set as a mirror for the 2TB drive? Would you recommend that?

In case of temporarily not having access to one of the disks, would it become impossible to access the rest of my data in the available ones?

I want to check globally against data corruption, but only having redundancy/mirrors/snapshots for the most important data such as family photos, etc. OS images and things like that are not much important and therefore, I don't want to have redundancy for them.

And one of the complicated questions is about wiping the 2TB drive. I mean, I have the two 1TB drives already wiped, and now I need to wipe the 2TB one after moving the data on it to somewhere safe and encrypted. Is it possible with ZFS to first encrypt the two 1TB drives for moving the data on the 2TB NTFS drive to them? I'm doing this to make everything unrecoverable in case of a theft or something.

How can I safely and reliably move my data from the 2TB NTFS drive to ZFS? Someone mentioned using a VM and virtual network adaptor for it, but it sound too complex for me now. So I thought about whether it's practical to have something like hashdeep generate hashes for all the files on an NTFS volume on Windows, and then copying to ZFS using NTFS-3G and double checking the checksums with the pre-generated hashes. Is there any better or automated way?

Thank you.
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
What are you going to boot from ?
If you chuck encryption into this mess it will certainly be a huge train-wreck !

In hind-sight you are not talking about using TureNAS at all. Just running ZFS on some flavour of Linux.
You are in the wrong forum.
 

4w4tts

Cadet
Joined
Oct 15, 2022
Messages
3
What are you going to boot from ?
If you chuck encryption into this mess it will certainly be a huge train-wreck !

In hind-sight you are not talking about using TureNAS at all. Just running ZFS on some flavour of Linux.
You are in the wrong forum.
An SSD in my laptop.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
This should be in Off Topic forum.


Laptops are not a good choice for a server. I do use ZFS, both for the OS pool and data pool, on both my very old laptop and newish laptop. Both work fine with ZFS, (using Linux). BUT, they are NOT servers, and they don't use USB attached storage, (except as a backup / alternate boot media).

USB drives are problematic with ZFS:
Why you should avoid USB attached drives for pool disks

Next, being in a hurry with ZFS & native encryption is a recipe for data loss. Using ZFS purely from the command line, (not using a GUI like the one from TrueNAS), is in someways complex if you don't have the basics.

Is it possible to stripe (not sure if it's the correct term) the two 1TB drives and use the whole set as a mirror for the 2TB drive? Would you recommend that?
Yes, it's possible. NO it is HIGHLY NOT recommended. And in general, if you can't figure it out on your own, you shouldn't do it because you won't likely be able to support such a configuration correctly.

I want to check globally against data corruption, but only having redundancy/mirrors/snapshots for the most important data such as family photos, etc. OS images and things like that are not much important and therefore, I don't want to have redundancy for them.
This can be done through separate ZFS datasets, (aka filesystems), in a ZFS pool. For the ones that need redundancy, you use "copies=2" on those datasets. This doubles the required storage per file, (but, you should have guessed that). Leave the ones that don't need redundancy as the default, (aka "copies=1"). This does NOT protect you from complete disk failure, so backups are highly suggested. Even with "copies=1", ZFS will still tell you if any file looses a block, so you can restore that specific file and avoid a full restore.


You have so many unusual requirements, that the TrueNAS forums, (even in the off topic area), are likely not the right place to ask questions.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'm not necessarily looking to make a server.

Then you're in the wrong forums. These forums are for the discussion of TrueNAS, a NAS oriented server appliance operating system.

How come some users have had no problems with it?

For the same reason that "some users" have had no problems with RAID controllers, etc. The requirements for a stable TrueNAS system cover a period of years; there are lots of "wrong" or "bad" things you can do that will survive a few hours or a few weeks, but turn into problems later. This ranges from issues such as cooking your drives by putting them into a chassis with poor cooling, using SMR drives that cannot tolerate resilver cycles, plugging a bunch of HDD's into an undersized power supply and burning out the PSU, using an overclocked CPU on a gaming mainboard, etc. It's very much like asking why you do not get into an automobile accident every time you go out for a drive. The statistics work in your favor, somewhat. It's a fallacy to think you cannot get into a crash just because you haven't gotten into a crash in the past.

With that in mind, the problem with USB is that the protocol is occasionally flaky and the devices can definitely be flaky. USB enclosures are prone to overheat, USB cords are easily dislodged, USB bridge chips often have the same serial number baked into them. This raises a whole bunch of problems for running a stable server, and such setups often don't survive long.

Do you have suggestions for where to ask?

In general, there are a lot of smart, clever, and cool people hanging around these forums. However, these forums are primarily intended for TrueNAS discussions. Off-topic discussions are welcome in the Off-topic forum, which can include discussions of ZFS, PC's, off-road racing, or ways to improve your grandma's peach cobbler recipe. Not all topics will catch the interest of the userbase, but you are welcome to try. There are also numerous other more specialized forums out there on the Internet for discussion of topics such as storage, laptops, etc.
 
Top