ZFS Do I need ZFS for personal laptop?

I am new to FreeBSD. I am in the process of installing on my Thinkpad t480. I plan to use Gnome3. I want to use FreeBSD because of the challenge and learning I will experience. I have used Linux in the past, but I never really learned much about how the system worked. I like how using FreeBSD will force me to learn more.

Regarding ZFS, I am not sure if I need it. It sounds good, but for personal use on a laptop is it needed? I am not sure if I should try to use it now, or first install the basic system with automatic formatting. I am sure I will have to re-install my system at some point soon, so perhaps I should hold off on adding more complexity right now.

Is it much more complex to set up ZFS? I have an SSD and internal HDD. I plan to do backups of the HDD where I will store my files.

I will need to mount to the internal hard drive. I read a previous postSSD mix HDD where some suggestions were made on this point. I tried it but couldn't figure it out. That is when I quit with the ZFS install and just installed the normal formatting option.
 
Are you planning to use this system long-term? Are you planning to use it to store valuable data? If no, and you're just playing and testing, use the default.

ZFS has many advantages. To me the biggest one for any system is that the data on disk is protected by checksums, so a disk failure that is not detected by the disk will be detected by the file system, and you won't be running on corrupted data. Where ZFS really shines is the fact that it integrates RAID into the file system, but on a laptop with a single disk, that won't help. There are many other advantages of ZFS, but those are the big ones. The cost of ZFS is mostly in having to do the administration differently; instead of traditional mkfs/mount commands, you end up using ZFS specific commands. Since you seem to be seeing this as a learning experience, this is probably not a big disadvantage.
 
I have an SSD and internal HDD. I plan to do backups of the HDD where I will store my files.
Why not going with RAID 1 then? I have the same configuration now on my laptop and after I will acquire another SSD I plan to remove the dvd and replace it with a caddy so I can have 3 SSDs in RAID Z.
By the way last month one of my SSDs was faulty from factory and it only lasted 9 weeks. Without RAID I would have lost all my data. So after replacing it all I have to do was to resilver the pool.
Code:
    NAME        STATE     READ WRITE CKSUM
    zt00r       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada0p2  ONLINE       0     0     0
        ada1p2  ONLINE       0     0     0
 
It would be good for tou to use ZFS. You have little to worry about during the installation. There is an auto-zfs option. Choose the option and the BSDinstall will do all the work for you.

Another advantage is the ease of replacing or expanding drives with minimum downtime - you might not need reinstall, reconfigure, etc.
 
for personal use on a laptop is it needed?
No. What you run FreeBSD on does not determine whether you need ZFS. The advantages ZFS offers, which are mentioned in this thread, are what determines whether you need ZFS. Otherwise, UFS, the default, is perfectly fine.

I reinstalled FreeBSD on my workstation a few weeks ago but was running UFS for the last 17 years with no issues whatsoever.
 
I would use ZFS on the laptop and anywhere i can, because just a power failure, system hang & etc.. at UFS cause already data is lost or damaged.
There are many ways, treats and eventualities to lose data on every (!) file system, but that you're data is lost on UFS in case of a system crash or power failure is an urban legend; Instead many years ago UFS was one killing feature of FreeBSD beyond Linux ext2/3 because you can pull the plug and crash your system - and you will get it up without data loss ;)

So far all my UFS survived power failures and system crashes. IMO the best way not to loose data is not the file system, but a backup; And "backup" is not piece of software to execute, but a concept.
 
I am now interested in installing with ZFS. I am not sure what choice I make in the automatic setup which asks if you want stripe- no redundancy, or the other options which I can't remember what they were. How do I choose this?

And how do I set up the RAID 1 for one disk?

Is there a special process for mounting the drive? I plan to install the system on the SSD and use the HDD for storing files.
 
And how do I set up the RAID 1 for one disk?
You can't. Maybe my previous comment misled you, but you need 2 drivers (SSD or HDD) to have RAID-1 (mirror-0) and 3 for RAID-Z.
I can give you other example: my HTPC (which runs FreeBSD) has only one SSD with ZFS.

eg. HTPC - no RAID, default FreeBSD ZFS install.
Code:
# zpool status
  pool: zr00t
 state: ONLINE
  scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    zr00t       ONLINE       0     0     0
      ada0p3    ONLINE       0     0     0

errors: No known data errors
root@amy_tvb:~ # gpart show
=>       40  468862048  ada0  GPT  (224G)
         40     409600     1  efi  (200M)
     409640       1024     2  freebsd-boot  (512K)
     410664        984        - free -  (492K)
     411648  468449280     3  freebsd-zfs  (223G)
  468860928       1160        - free -  (580K)

# camcontrol devlist
<Crucial CT240M500SSD1 MU05>       at scbus0 target 0 lun 0 (ada0,pass0)

Thinkpad T430 RAID-1:
Rich (BB code):
# zpool status
  pool: zt00r
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:26:22 with 0 errors on Sat Jan 16 12:44:21 2021
config:

    NAME        STATE     READ WRITE CKSUM
    zt00r       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada0p2  ONLINE       0     0     0
        ada1p2  ONLINE       0     0     0

errors: No known data errors
                            
# gpart show
=>       40  937703008  ada0  GPT  (447G)
         40     409600     1  efi  (200M)
     409640  937293408     2  freebsd-zfs  (447G)

=>       40  937703008  ada1  GPT  (447G)
         40     409600     1  efi  (200M)
     409640       2008        - free -  (1.0M)
     411648  937289728     2  freebsd-zfs  (447G)
  937701376       1672        - free -  (836K)

# camcontrol devlist
<ADATA SU630 S190429a>             at scbus0 target 0 lun 0 (ada0,pass0)
<MATSHITA DVD-RAM UJ8B0 SB01>      at scbus1 target 0 lun 0 (cd0,pass1)
<KINGSTON SUV500MS480G 003056RI>   at scbus2 target 0 lun 0 (ada1,pass2)
 
To answer OP's question: no, you don't need it. zfs are mostly good things, which might make you want it, and the reasons have been explained in this thread.
Personally, I would go with UFS on a laptop. In other news, keeping documentation / notes on how you have configured your machine and backups of your data helps to avoid stress when you make a mistake and mess up.
 
So if I go with the no-RAID option on SSD using ZFS guided install and choose stripe no redundancy, how do I then mount the HDD and use it for storage? Can the HDD be included in the ZFS, or is it kept separate?
 
I have another related question. I am a beginner to all of this. Can I use an external hard drive as my second HDD and set up the RAID this way? Do the drives have to all be internal, or can I connect the external hard drive when I want it to work? I know this is probably a silly question.
 
The whole purpose of RAID is redundancy in case of any drive loss. If you're dynamically using one drive in an array then that defeats the whole purpose.

I'd stick two drives together using your internal SATA controller, then an external drive for backups. Keep it simple.
 
You can't. Maybe my previous comment misled you, but you need 2 drivers (SSD or HDD) to have RAID-1 (mirror-0) and 3 for RAID-Z.
Actually, you can "by hand", but it's of little to no interest.

Code:
$ zpool status mpool
  pool: mpool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        mpool       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada2p1  ONLINE       0     0     0
            ada2p2  ONLINE       0     0     0
 
The whole purpose of RAID is redundancy in case of any drive loss. If you're dynamically using one drive in an array then that defeats the whole purpose.

I'd stick two drives together using your internal SATA controller, then an external drive for backups. Keep it simple.

I am not sure if I can stick to hard drives together inside my Thinkpad T480. Would there be enough space inside to do that? I will have to check.
 
I am not sure if I can stick to hard drives together inside my Thinkpad T480. Would there be enough space inside to do that? I will have to check.
My mistake; I missed that. I think only the Thinkpad X1 Extreme has two m2 SATA slots. The T480 only has one last time I checked. I'm not sure what the extent of 'personal' use is in your case from your original post. If your use case necessitates the use of ZFS: go for it. If not. UFS is perfectly fine for most things. One thing to note with UFS is that the vm subsystem is directly tied to it; I don't think that's the case with ZFS. So you may get more performance out of UFS with a single m2 SATA setup.
 
Redundancy is the whole purpose of having RAID. On single driver is useless.

You can have on a Thinkpad T480 only one 2.5" 7mm drive SSD/HDD and one M.2 x2 SSD.
My point was just to show that is possible. I have already written that was almost useless. However, this weird RAID allows scrub to repair damaged files and could be efficient against localised bad sectors (probably at the cost of lower I/O speed).
 
Redundancy is the whole purpose of having RAID. On single driver is useless.
But ZFS is more than just RAID. It also has checksums on everything which is good.

Doing RAID across a single disk: It's not crazy, it's not pointless, but it is of limited value. It will protect against failure of individual sectors, or areas of the disk. It does not protect against complete failure of the whole disk. On ZFS, this is really easy to accomplish, without having to create extra partitions and laying out the file system across it, by using the command "zfs set copies=2" on a selected pool.
 
I want to clarify. If I replace my HDD with a 2. SATA SSD and keep my current m.2 SSD, will this be enough for setting up ZFS RAID?
 
If you have two devices that are similar in capacity and performance, then you can start considering RAID. If one is larger, the largest RAID you can create will be the size of the smaller one.

RAID is all about redundancy (thence the name). The simplest form of RAID is mirroring a.k.a. RAID-1, which requires two disks, and will give you 50% efficiency (for every byte store, you need 2 bytes on the two disks). If you have more disks, you can get higher efficiencies, but in a laptop, that't not very realistic.

(Let's not split hairs about RAID-0, which is not actually redundant).
 
Back
Top