Is ZFS worth it if i only have one physical disk ?



  • I was wondering if i should use ZFS instead of UFS on my new installs.

    I only have one 64G mSata disk, so i suppose snapshots are out of the question. I have 8G Ram , so extra ZFS memory usage shouldn't be an issue.

    What is the advantages of ZFS for me ?
    More robust if power fails ?
    Anything else ?

    I have absolutely no experience w. ZFS , so i hope a "Guided install" will ask or select the right questions.

    /Bingo



  • @bingo600

    Simple answer: Yes! Much more robust in case of power outage. It make sense even on little disk.

    Regards,
    fireodo



  • @fireodo
    Thanx

    I'll give ZFS a try on my 2.4.4-p3 restore test on monday.

    Are there any other, features (ZFS Single disk) , that i could benefit from ?

    /Bingo



  • @fireodo said in Is ZFS worth it if i only have one physical disk ?:

    @bingo600

    Simple answer: Yes! Much more robust in case of power outage. It make sense even on little disk.

    Regards,
    fireodo

    I have heard the exact opposite. That you need a UPS if you are using ZFS because it does not handle power loss as well as UFS.

    I don’t know who to believe since not an expert on this.


  • LAYER 8 Global Moderator

    Not sure where you heard that UFS was better than ZFS for power losses.. But that is not right, ZFS is the better choice for loss of power situations that is for sure.

    You should always try and avoid sudden loss of power to be honest.. But if that is concern zfs would be better choice..

    UFS hates sudden loss of power that is for damn sure..



  • ive heard you could run 'zfs set copies=2 zroot' after installer that way you have an additional data set to run scrubs against even though you're single disk. don't know if it does anything actually seeing as I've never had any issues



  • @johnpoz

    I don't know who to believe one way or the other. I haven't seen a whitepaper any where that recommends one way or the other. There could be one but I always give up looking.

    What I heard from my friend Betty down at the Piggly Wiggly is that ZFS is only more reliable if you have it with 2 disks or have it write 2 copies. Problem is, the pfSense doesn't get written with 2 copies during install.

    My other friend Loretta down at the Walmart says she had a power loss with ZFS and it wouldn't boot and there were no zfs tools to help recover the data.

    My other friend Darrel says never use UFS cause it is FULL of bugs and it is a wonder it works at all.

    I see on the FreeBSD forums they recommend on using ZFS for servers only and not desktops because of the resource overhead.

    Than being said, I am using ZFS for my pfSense on a Dell OptiPlex with an SSD and 8G of RAM and a UPS.

    I think it doesn't matter for pfSense. Just keep a pfSense install image handy and keep config backed up.



  • @sherpagoodness said in Is ZFS worth it if i only have one physical disk ?:

    ive heard you could run 'zfs set copies=2 zroot' after installer that way you have an additional data set to run scrubs against even though you're single disk. don't know if it does anything actually seeing as I've never had any issues

    What I heard that this will only help for files that are written after installation so the pfSense itself won't have the additional data to scrub against.



  • @johnpoz said in Is ZFS worth it if i only have one physical disk ?:

    UFS hates sudden loss of power that is for damn sure..

    ZFS hates sudden power loss too but RAID helps to mitigate.



  • My home installation of pfSense using ZFS had to suffer about 30 power outages till now. pfSense started smoothly again after each one.



  • @IsaacFL well if you go through an in-place upgrade, eventually almost every file will get touched or close to



  • I just installed a 2.4.5-p1 on a testmachine w zfs, and 1 mSATA 64GB disk.

    The only ZFS parameter i changed (had to) , was :
    Pool Type/Disks : - I had to select the mSATA as a stripe disk
    Is that the correct choice for a 1 disk system ?

    None of them really makes sense (i think) , or can one really stripe on just one disk ?

    /Bingo



  • Does no one have any tips/recommendations for setting up ZFS on one HDD

    Is my selection of the HDD as stripe enough , or is there any other "smart things" to do. on a 64GB mSATA disk setup

    /Bingo



  • @bingo600 said in Is ZFS worth it if i only have one physical disk ?:

    Does no one have any tips/recommendations for setting up ZFS on one HDD

    Hi,

    We only install pfSense with ZFS!!!
    Nothing special anyway ...

    There are 16GB versions installed and 32, 64 and more recently since smaller SSDs are not available 128GB
    32GB is perfectly enough!

    It is a good idea to boost SWAP during installation if you have low RAM and that is it.



  • @DaddyGo

    I have 8G Ram & 64GB mSata in all my prod. units (i3-7100U)
    So i'm not Ram constrained.

    Thank you for the reassurance.

    /Bingo



  • @bingo600 said in Is ZFS worth it if i only have one physical disk ?:

    So i'm not Ram constrained.

    In addition to 8GB of RAM, I used to upgrade the basic 2G SWAP to 4G, it's harder later and you don't know when and what you want to run 😉



  • I'll take it into advice ..

    But once my FW starts to need to swap , i'd think hard about why i need that much Ram , and prob disable some of the "unneded" stuff that has to be active on the poor fella.

    Waste Cycles on inspecting/forwarding packets , not on swapping.

    /Bingo


  • LAYER 8 Moderator

    Don't know where that stuff from ZFS comes from, but we had installed several dozens of devices for multiple customers over the year and as soon as ZFS was available jumped ship and used it. Had the same stupid discussion with prejudices with our distri that argued that "ZFS is for storage and RAID and those boxes you install don't have that and so ZFS is bonkers". Had to slap him in the face with our statistics that clearly showed customers calling us for support for problems (when filesystem related) ALWAYS had UFS. Mostly power failure/shutdowns etc. as explained by @johnpoz

    My own lab box at home was failing recently with 2.5-dev tests and I was like "Damn that's now the first time I have a filesystem bug/failure due to hard reset/reboots with ZWF..." - only to realize after rebooting and debugging that I did forget to install the device after installing the 2.5-snapshot with ZFS - so it was running UFS again - and promptly failed and wiped my config to 0 bytes after a kernel panic and hard reset. After reinstalling with ZFS I had multiple panics in 2.5-dev environments (IPv6 / WAN related mostly) and hard resets - not ONE disk/filesystem failures.

    So those friends and hearsay people may well go with UFS if they like, I won't touch it with a five-foot-pole anymore :)

    Cheers
    \jens


  • LAYER 8 Global Moderator

    So knock on wood I have not had any issues, well one on a old 2440 that had lost power.. But normally all the pfsense I have are on good ups, and normally stable power anyway.

    But I have planned on my own 4860 to move to zfs when 2.5 comes out and take the time to upgrade to that.. Just going bring it up on zfs then.


Log in to reply