Author Topic: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?  (Read 2791 times)

0 Members and 1 Guest are viewing this topic.

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3854
  • Country: ro
FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« on: November 14, 2021, 09:05:40 pm »
Tried this weekend FreeBSD and openSUSE for the first time.  The machine was an i7 4790k, 32GB RAM, nVidia GTX760, Samsung PRO 512GB SSD and few extra HDDs.

The goal is to find an OS for the main desktop in the lab (at home).
- must have a form of snapshot/restore/backup, preferably ZFS as a root file system
- preferably KDE Plasma for GUI
- must be open source
- must not lock the user inside a single world (no Windows or Mac)

FreeBSD was very nice, manged to make it run with the proprietary nVidia drivers and hardware acceleration, has native ZFS integration, though BSD needs little tinkering even for the most basic things, so I find myself constantly googling how to do things that are usually automated in Linux.  As an example to connect the ADALM-PLUTO SDR (a device using LAN over USB) I had to manually look if a new addapter appeared, and to manually bring up the addapter and manually assign an address to it.  In Ubuntu, you just plug the cable and that's it.

openSUSE was the best surprise, very good documentation, amazingly good looking, and it's for the first time when out of the box settings are just right for me.  So far I've tried already almost any other Linux distros, including Gentoo or Arch, but never before I have seen something like openSUSE before, absolutely love it.  Typing from openSUSE with KDE Plasma right now, and even the forum editor looks better from openSUSE!  :D

openSUSE would be my choice in a heartbeat, but it is using BTRFS instead of ZFS for its root disk, and YaST disk features like snapshot/restore/diffs/pools etc. are not working with ZFS.

That's a pity, openSUSE on ZFS would have made the perfect Linux distro.

But then I've stumbled on this blog from a BTRFS dev,  https://josefbacik.github.io/kernel/btrfs/extent-tree-v2/2021/11/10/btrfs-global-roots.html  and the plan is to make major disk format changes, and that's the last thing anybody would want to hear about a file system.

Ubuntu with experimenta ZFS support seems attractive, too.  They developed their own ZSys tool as a ZFS administering helper, and integrate that into Ubuntu, so there are integrated features to roll back, for example automatic OS snapshots, the ability to reboot the OS using any available snapshot, etc.  That would require some extra steps to add a KDE Plasma on top of the regular Ubuntu distro, and the support and documentation are in format more too popular for my needs, but I'm already used to Debian so less reading required.




I'm tempted to leave Kubuntu and switch to openSUSE/BTRFS from now on, and keep ZFS for storage HDDs only.
Other comments or ideas are welcome.

Any observations from current openSUSE users, or any advice regarding BTRFS?

Offline evb149

  • Super Contributor
  • ***
  • Posts: 2220
  • Country: us
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #1 on: November 15, 2021, 04:34:42 am »
Yeah I've been surprised / frustrated / disappointed about BTRFS. 
Every few years I check and it seems like there is some caveat that it isn't really "production ready" as in rock solid, stable, well tested,
basically robust against bugs / data loss cases etc.  Maybe it has changed and is more stable but your own comment suggests otherwise.
And even at its best of promised attributes  it seemed a poor comparison for what ZFS already was back in '2005 or so.
 
On the one hand ZFS has been free in the wild for some decades now
(though quite a shame about the whole solaris / open solaris / open indiana et. al. thing and the ZFS anti-LINUX licensing stuff by SUN)
and it is just about perfect minus some things that SUN didn't specifically design for / finish.  ZFS-Crypto was an after thought and never really
got first class implementation / design support AFAIK though it was said to be "coming soon".  Deduplication another after thought that seemed to
be problematic in actual systems.   Although not entirely a fault of the ZFS implementation overall the lack of robust ECC was / is a concern for
data integrity in desktop / low end workstation machines like we're discussing -- it may be the data on disc is well protected by ZFS checksums but
if the data gets corrupted at the layers of storage interfacing / drivers / OS / host memory buffers then no longer is the integrity checking
preserved end to end by ZFS from the application to the storage device and apparently problems at one time resulted from that.
Some years back IIRC memory management was an issue too for ZFS deployments where it wasn't uncommon for smallish systems to be able to
deploy several TBys of disk storage but be architecturally limited to a small number of GBys of RAM and the ratio of the two wasn't optimal wrt.
some kinds of intermediate data buffers / structures or some such thing so things could get degraded / broken / fail to scale well or something in
such cases.  On the one hand that's a bit better now that at least typical systems can have NN GBy RAM vs N but at the same time now the discs are
NN TBy / unit so the scaling ratio of RAM to pool size is as bad or worse than ever so I don't know what the latest advice about tuning and scaling is
for small systems like you are discussing; maybe it isn't an issue if you have a "small" pool without tons of devices etc.

The other thing I don't know about is how they've currently engineered and optimized the support for the present kinds of very heterogeneous low end storage devices -- * small NVME 0.5-2TB SSDs; * SATA attached small SSDs; * SATA attached slow NAS or archival type spinning disc drives; USB attached archival spinning disc drives, * remote attached storage (e.g. NAS, cloud, ...).

In the consumer market none of those are particularly high quality, many don't well support the expected diagnostic / self test (SMART, SCSI, ...) modes, many are so slow that just one read or write cycle can take many hours or multiple days, they may not deal with errors / error recovery / error handling well or flexibly, the system may not deal with online failures or hot swapping correctly / well, sometimes they "lie" about and / or "fail" power integrity guarantees (does that write operation the drive PROMISED was "finished / synced" really complete / succeed if the power failed just at the wrong moment..), and they're not necessarily very reliable in general.   So in theory one should be able to set up cache / journaling on the smaller / faster devices for optimizing the reliability of the whole pool but whether that actually works reliably in such small systems these days ... eh...?

In my own past experience I've trusted Solaris derivatives and FBSD more than Suse / Ubuntu et. al. for ZFS since it was a first class citizen on the former and something partially / experimentally tacked on by integration of an out-of-distro subsystem in the case of the LINUXes.  Maybe these days it's good enough for some uses to consider LINUX host based ZFS on a workstation.

The other experience I have is that if one builds a low end server (e.g. desktop PC class) and uses it as a storage server it'll probably be pretty reliable and once the initial problems are sorted out one can have "in service uptime" measurements of many weeks or several months sometimes even years no problem for modest uses.

When I create a workstation desktop that's running some LINUX and runs GUI desktop and general purpose office use cases, typically things may not work nearly as reliably.  Maybe it'll run for many days or a few weeks without a crash or some kind of resource starvation problem but not usually many weeks to several months to a few years. 

For a personal storage server maybe it is forgivable to reboot it cleanly a few times a month or weekly or whatever to allow for OS upgrades and refreshing the system state etc.  But I always worry about what will or could get corrupted / lost in the case of unexpected freeze / crash / power fail / hardware fail / hardware lock up etc. cases which happen many times per year or even per month depending on use cases.

I don't know if there's a good way to have a reliable storage server and a highly capable / modern workstation in the same machine.
Even if one virtualized the two one would still have significant limits due to the effective inability for a GPU to work well in most cases when virtualized
without some very ad-hoc configurations to optimize that.  USB pass through is also somewhat limiting in addition to other advanced kinds of PCIE peripherals.

"must have a form of snapshot/restore/backup" -- the problem is that just because you may have a couple of pools attached, maybe even some hot spare
devices, that's not REALLY a backup.  It is a RAID and/or other levels of redundancy.  But one power surge, flood, fire,  or cosmic ray or buggy OS / FS problem of just the wrong sort can happily overwrite / corrupt / break anything that's actually locally directly attached to the machine and writable.  A true backup is a completely independent system that isn't automatically synchronized / mirrored in a dangerous way that could be blind to data loss / corruption cases.

You might check out fedora or centos or one of the centos derivatives:
https://en.wikipedia.org/wiki/CentOS

They may have more integrated system administration oriented tools / documentation / workflows than one typically sees for some more average user oriented distributions like ubuntu desktop etc.

I'd suggest being careful about the RAIDZ and dedup and other kinds of setups that are presenting more chances of things going amiss and taking especially long times and complex processes for device failure recovery.

 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #2 on: November 15, 2021, 03:29:47 pm »
Tried this weekend FreeBSD and openSUSE for the first time.  The machine was an i7 4790k, 32GB RAM, nVidia GTX760, Samsung PRO 512GB SSD and few extra HDDs.

The goal is to find an OS for the main desktop in the lab (at home).
- must have a form of snapshot/restore/backup, preferably ZFS as a root file system
- preferably KDE Plasma for GUI
- must be open source
- must not lock the user inside a single world (no Windows or Mac)

FreeBSD was very nice, manged to make it run with the proprietary nVidia drivers and hardware acceleration, has native ZFS integration, though BSD needs little tinkering even for the most basic things, so I find myself constantly googling how to do things that are usually automated in Linux.  As an example to connect the ADALM-PLUTO SDR (a device using LAN over USB) I had to manually look if a new addapter appeared, and to manually bring up the addapter and manually assign an address to it.  In Ubuntu, you just plug the cable and that's it.

I'm not surprised. FreeBSD is great for many things but not as a replacement for a standard desktop system. Hardware support is also way behind what Linux supports.

Quote
openSUSE was the best surprise, very good documentation, amazingly good looking, and it's for the first time when out of the box settings are just right for me.  So far I've tried already almost any other Linux distros, including Gentoo or Arch, but never before I have seen something like openSUSE before, absolutely love it.  Typing from openSUSE with KDE Plasma right now, and even the forum editor looks better from openSUSE!  :D

Yes, openSUSE is great, it's the most easy to use Linux diistro there is, and in my view is vastly underrated (probably because it's European).

Also, there is other stuff like OBS (OpenSUSE Build System) which has lots of additional programs that aren't part of the main repositories.

Quote
openSUSE would be my choice in a heartbeat, but it is using BTRFS instead of ZFS for its root disk, and YaST disk features like snapshot/restore/diffs/pools etc. are not working with ZFS.

That's a pity, openSUSE on ZFS would have made the perfect Linux distro.

Why?

BTRFS is not just the default file system in openSUSE, it is also the default and fully supported file system in SUSE Linux Enterprise (SLE), which is SUSE's commercial Linux offering. SUSE is also one of the main contributors to BTRFS (as they are to many other FOSS projects). The fact alone that BTRFS is fully supported by the 2nd largest enterprise Linux vendor (after Red Hat) should already tell you that BTRFS, at least on SUSE, is completely reliable. The only thing that isn't supported are the RAID5/6 modes of BTRFS, which are blocked in SLE (you can do RAID/5 on Linux dmraid, which is supported).

What I can tell you is that at work we have several hundreds of TB of important data on BTRFS, and so far it has been rock-solid. We also use SLE and openSUSE for engineering desktops, and again BTRFS has been perfectly fine for everything we throw at it.

You certainly can get ZFS support into openSUSE, but it makes no sense whatsoever. What you'd get is a file system which is optimized for large amounts of rotational media (hard drives, which is what ZFS was designed for) while losing the great integration of snapshots into openSUSE's management tools like YaST/snapper, and likely other functionality as well.

Quote
But then I've stumbled on this blog from a BTRFS dev,  https://josefbacik.github.io/kernel/btrfs/extent-tree-v2/2021/11/10/btrfs-global-roots.html  and the plan is to make major disk format changes, and that's the last thing anybody would want to hear about a file system.

Then you should stay away from ZFS because there have been similar changes in ZFS over the years. Which not only saw major changes but is now split in tow separate branches (Oracle ZFS and OpenZFS).

Quote
Ubuntu with experimental ZFS support seems attractive, too.  They developed their own ZSys tool as a ZFS administering helper, and integrate that into Ubuntu, so there are integrated features to roll back, for example automatic OS snapshots, the ability to reboot the OS using any available snapshot, etc.  That would require some extra steps to add a KDE Plasma on top of the regular Ubuntu distro, and the support and documentation are in format more too popular for my needs, but I'm already used to Debian so less reading required.

So you'd rather rely on the experimental implementation of ZFS on Ubuntu (which is known as "the Windows amongst Linuxes" for a reason) than on a fully supported BTRFS implementation?

I also question the wisdom using a desktop computer used as a desktop system as storage server. It's usually a good way to lose your data, even more so if you don't have any real backups (and no, RAID is not a backup!). So unless these drives hold hot data (i.e. data you need when working on that computer) offload them somewhere else, e.g., a NAS.


Yeah I've been surprised / frustrated / disappointed about BTRFS. 
Every few years I check and it seems like there is some caveat that it isn't really "production ready" as in rock solid, stable, well tested, basically robust against bugs / data loss cases etc.  Maybe it has changed and is more stable but your own comment suggests otherwise. And even at its best of promised attributes  it seemed a poor comparison for what ZFS already was back in '2005 or so.

I'm not sure what you did "check" but as mentioned above BTRFS is (and has been for several years) the default and fully supported file system of the 2nd largest enterprise Linux vendor. Which it wouldn't be if it wasn't "production ready". That may not be true for other distros but that's an issue with that particular distro, not BTRFS.

Also, back in 2005 ZFS was still in pre-release, and even Sun advised customers to stay away from it for anything important. And I still remember the many issues we had with ZFS on Sun's storage systems back in 2008/2009 (we spent quite a bit of time resolving problems in ZFS together with Sun's support, and it took a lot of effort from Sun and a lot of changes to ZFS to get it where it is today).

Quote
In my own past experience I've trusted Solaris derivatives and FBSD more than Suse / Ubuntu et. al. for ZFS since it was a first class citizen on the former and something partially / experimentally tacked on by integration of an out-of-distro subsystem in the case of the LINUXes.  Maybe these days it's good enough for some uses to consider LINUX host based ZFS on a workstation.

It depends if your data is worth something. Pretty much all ZFS support in Linux is still "experimental" which is short for "we have no idea if this setup is stable/reliable and you may well lose all your data for no reason".
« Last Edit: November 15, 2021, 03:31:19 pm by Wuerstchenhund »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 3589
  • Country: fi
    • My home page and email address
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #3 on: November 15, 2021, 06:00:58 pm »
but it is using BTRFS instead of ZFS for its root disk, and YaST disk features like snapshot/restore/diffs/pools etc. are not working with ZFS.
You could just use any FS on top of LVM, and use LVM for the snapshots, restore, et cetera.

You do need to either use thin provisioning, or not commit all disk space for the actual filesystems.  That extra space is needed to describe the differences between the snapshots and the live system.  I don't know how well LVM support is integrated into YaST, although its documentation does say it does support thin-provisioned LVM volumes.  I myself use the command-line LVM tools, and don't use OpenSUSE, so I cannot say whether the UI tools are any good.

LVM is basically a very thin layer on top of block devices like HDDs and SSDs, and allows combining them into a single logical device.  It does support software RAID, using Linux Device Manager and Multiple Device, DM and MD.  The filesystem on top of that doesn't really matter, because the storage is managed at the underlying block level.
 
The following users thanked this post: SiliconWizard

Offline nightfire

  • Regular Contributor
  • *
  • Posts: 235
  • Country: de
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #4 on: November 15, 2021, 07:17:24 pm »
I use FreeBSD since 3.2, so more than 20 years now. Although I love the system, I type this reply from my main Windows machine.
FreeBSD has a very big history and reputation on the server side of things, and can be used as a desktop, but lots of things that one would need in an advanced desktop environment are simply not the strengths of FreeBSD or one of its Desktop-optimised Distros like GhostBSD or FuryBSD.

That said, I used a FreeBSD workstation some years at my previous employer (Datacenter, where we used Unix for our main stuff), but that was mostly used as a console multiplexer and webbrowser station. Currently I have some tinkering project going on to re-use my old desktop as some experimental graphics workstation for photography and picture/video editing (over network with X11 forwarding), and its nice to see what stuff one can do with OpenSource Software.
But as a "daily driver" with lots of graphics stuff going on, especially as a beginner to the whole *NIX stuff I would not necessarily recommend a standard FreeBSD box.
Here has to be kept in mind that the *BSD approach to most things is a more conservative one, so that usually you would get the most advanced desktop stuff on a penguin, not a daemon.

ZFS is a different kind of story- due to licensing issues, Linux folks frowned a long time on ZFS, so the whole implementation on BSD had more time to mature. Back then, when my last employer made some decisions on what Filesystem we would host some filehosting for our customers, and we chose ZFS on (Open)Solaris for the task. As Oracle back then bought out Sun, some colleagues were tasked to have a look at BTRFS as a possible replacement, but back then (7+ years) BTRFS was deemed not to be stable enough in comparison.
Since then lots of things should also have been improved, and I did not follow that development, as in my recent job some tools have radically shifted towards other things.

 

Offline olkipukki

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: 00
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #5 on: November 17, 2021, 12:43:01 am »
I’m using both FreeBSD and SLED (SUSE Linux Enterprise Desktop that literally paid version of openSUSE), and cannot agree more that Beastie desktop is not a casual and everyday system for random staff and SUSE is meaningful choice between everyone-knows-me and some extraordinary penguins.

Wonder why OP didn’t stop the choice on Ubuntu - KDE is not first-class citizen?
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3854
  • Country: ro
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #6 on: November 17, 2021, 01:43:33 pm »
Thank you all for the advice, what you guys wrote was very useful to me (in practice) so far.  I didn't answer sooner being too busy trying the things you all said.   ;D




To clarify a little, the machine is a single user desktop and main PC at home
- must have multimedia, meaning only offline movies and analog stereo, no DRM streams
- must use nVidia+Intel GPUs
- must be able to play a movie at 4k/60Hz on a monitor with DP (Display Port), or on any of the other 2-3 smaller monitors, including a HDMI one in another room
- must work with Creative sound card
- must work with audio over HDMI (for the remote HDMI monitor in the other room)
- amateur software writing
- some EDA tools for the home lab

- not used for gaming
- not used as a file/web/streaming/etc. server
- has an 8TB WD Red HDD (that's their low enterprise server grade, but still SATA) for local/fast access storage
- it is not a backup machine

- there is another 4GB RAID5 dedicated NAS (over LAN), but it is very slow, has only 100Mb LAN, and the transfer speeds are much lower than that (about 10Mbit/s in practice, it's a small non-PC Linux on a SBC about twice the size of a Raspberry Pi and it looks like this https://duckduckgo.com/?q=WD+Share+Space+4+TB&ia=images ).  It's an old WD Share Space, slow but very reliable so far.  It has Samba and NFS and only has a brief webpage to add user and other common tasks.  It does not have OS access unless hacked, and I don't want to touch it because it always just worked.




@evb149

- I've tried Fedora with KDE a couple of years ago, and found it very heavy and slower than Kubuntu, but stable.  My understanding is that's the free rolling/testing distribution for Red Hat.
- centOS was always recommended as a not so cutting edge but rock-solid OS.  That was like a free version of Red Hat in my understanding.  I've read recently the project was ended, no idea if it is still alive under a new name.

Never installed centOS, but I guess this is to late now.  By reading only, centOS doesn't seem like a good choice for a multimedia desktop back then (when compared to Ubuntu).  In fact I even wanted to give it a try but the installer didn't cope with my hardware, so I couldn't install centOS, and didn't try to find out why the installer was constantly hanging.

- about ZFS-Crypto or any other disk encryption, I don't need that extra bag of worms, only have personal crap to store, like photos and hobby projects, I'm no spy, and the job of the former James Bond was taken already by a black woman, which is the new 007 in the latest "James Bond - No Time to Die" movie (2021).
- also no ZFS deduplication, not really needed for my usage, so far the 32GB RAM was more than enough for a single ZFS disk (8TB).  The RAM is not ECC, but brand name and faster than needed, it was bought back then for gaming/overclocking, so now it is very reliable when used at its normal speed profile (the BIOS detects too speed profiles inside the RAM ID chips, and allows to make a selection or fine tuning the timings).

Quote
The other thing I don't know about is how they've currently engineered and optimized the support for the present kinds of very heterogeneous low end storage devices -- * small NVME 0.5-2TB SSDs; * SATA attached small SSDs; * SATA attached slow NAS or archival type spinning disc drives; USB attached archival spinning disc drives, * remote attached storage (e.g. NAS, cloud, ...).
My understanding is ZFS is by default "friendly" with SSD disks, because it prefers to write on new sectors instead of reusing the "freed" blocks, I think this is called CoW (Copy on Write), but I'm not very sure.



SSD Provisioning and SWAP

- I've seen provisioning sometimes called over-provisioning or under-provisioning, sometimes refers to some internal (not visible) extra capacitity, some other times it refers to letting some free (unformatted) space on each SSD disk.
- for example the SSD tool called Samsung Magician does this on Windows:  It let about 10-15% of the total disk space unformatted.

It seems like the SSD firmware (or at least this Samsung SSD firmware) can figure out by itself that there is an unused (unformatted) area, and take advantage of that to reduce the wear out of the most frequent used sector from the allocated areas.  The re-mapping of used blocks to the unformatted area is transparent for the whole PC.

I'm not sure about over-provisioning.  Apparently none of the installers are over-provisioning by themselves on my SSD (tested FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS).

- Is this over-provisioning still a requirement for file systems like ZFS or BTRFS?
- All the auto/entire-disk install wizards are creating a 2GB swap partition, but it doesn't make any sense to me.  Do I still need that extra 2GB swap partition on a 32GB RAM PC?



@Wuerstchenhund

Quote
BTRFS is not just the default file system in openSUSE, it is also the default and fully supported file system in SUSE Linux Enterprise (SLE), which is SUSE's commercial Linux offering. SUSE is also one of the main contributors to BTRFS (as they are to many other FOSS projects). The fact alone that BTRFS is fully supported by the 2nd largest enterprise Linux vendor (after Red Hat) should already tell you that BTRFS, at least on SUSE, is completely reliable. The only thing that isn't supported are the RAID5/6 modes of BTRFS, which are blocked in SLE (you can do RAID/5 on Linux dmraid, which is supported).

What I can tell you is that at work we have several hundreds of TB of important data on BTRFS, and so far it has been rock-solid. We also use SLE and openSUSE for engineering desktops, and again BTRFS has been perfectly fine for everything we throw at it.

That removed any last doubt I was having about BTRFS.  In fact, the Ubuntu with ZFS on root has an open bug as we speak, confirmed and with data loss or even full ZFS array loss if encrypted.



@Nominal Animal

Quote
You could just use any FS on top of LVM, and use LVM for the snapshots, restore, et cetera.

You do need to either use thin provisioning, or not commit all disk space for the actual filesystems.  That extra space is needed to describe the differences between the snapshots and the live system.  I don't know how well LVM support is integrated into YaST, although its documentation does say it does support thin-provisioned LVM volumes.  I myself use the command-line LVM tools, and don't use OpenSUSE, so I cannot say whether the UI tools are any good.

Never used LVM, I need to learn more about it, only read some brief pages years ago and it looked less capable and more cumbersome to administer than ZFS.

Though, after all the ZFS goal might be just some personal sunken cost fallacy of mine, because it happened that ZFS was the FS I've start using when I bought that 8TB HDD, and already piled up a few TB (mostly of deletable files) but it might be difficult to migrate to some other format without another extra 8TB HDD, which I have no budget for right now.



@nightfire

Quote
FreeBSD has a very big history and reputation on the server side of things, and can be used as a desktop, but lots of things that one would need in an advanced desktop environment are simply not the strengths of FreeBSD
...
Here has to be kept in mind that the *BSD approach to most things is a more conservative one
The conservative part is one of the wanted benefits I was looking for when testing FreeBSD (e.g. rc configs and no systemd), but everybody tell me it might not be a good choice for my needs.

I think I'll keep a FreeBSD installed on another disk, and put some time into learning more about BSD and UNIX style.



@olkipukki

Quote
SUSE is meaningful choice between everyone-knows-me and some extraordinary penguins.
Wonder why OP didn’t stop the choice on Ubuntu - KDE is not first-class citizen?

The tale with Ubuntu is that a few years ago, when I decided to leave the Windows world forever, the only OS that can fully auto-install and recognize all the hardware out of the box was Ubuntu.

The Gnome was too basic and looked ugly to me, so very soon I've migrated to Kubuntu, which is a Ubuntu with KDE Plasma 5 out of the box.  Later I've learned that I can switch or have many GUI installed, tried almost all of them, and KDE Plasma is the right one for me.

Unfortunately there is no Kubuntu with ZFS on root, only an Ubuntu with ZFS on root installer.



Ubuntu 20.04 with ZFS root install + KDE Plasma added later

I've tried it these days and had a very unpleasant surprise.  The long time support version of Ubuntu has a broken/buggy installer when it came to ZFS on root (aside from the currently opened bug affecting dkms ZFS).  It installs, but then it silently upgrade the kernel version during the installation process (I've unchecked the "Download upgrades in the background" in the installer).  And the newer kernel doesn't boot.  I guess I should have unplugged the network cable during install.  :-//

After booting with the first kernel it worked, and I could install KDE on top of Ubuntu/ZFS root, and then tried to upgrade all, but the new kernel still doesn't boot.

When they say ZFS on root is experimental, they mean it, even for their latest flagship distro, Ubuntu 20.04.3 LTS.



Back to first time using openSUSE, some questions

At first I've tried Tumbleweed, but at some point it started to behave strange, for example after installing the proprietary nVidia drivers the autologon stopped working and couldn't make it work again from either the plasma or the YaST settings.

Then, after a big chunk of updates and switching once to Wayland and back to Plasma, it start behaving erratical even after a reboot and using only Plasma (it's stated in the docs Wayland doesn't work yet on openSUSE).

So I've reinstalled anew openSUSE Leap 15.3 the latest stable version of free SUSE.  This was rock solid so far, but at some point it needed extra codecs for VLC, and they do not have them yet in the Leap 15.3, so took some codecs declared as experimental that came together with a horrible VLC 3.0, so I've installed MPV.  That VLC 3.0 looks and behave like absolute crap!

- since the extra-codecs install, the sound card is not properly innitialized, volume is either mute, about 1% or 100%, no intermediary volume though the slider is moving normally.   >:(
- I've install a desktop widget (for no reason) called SUSE prime selector to try how it would be with the Intel GPU instead of nVidia, but that changed/added some xorg.conf.d files, and I don't know what else was changed but I don't know how to make it like before that widget.  The switching back to nVidia doesn't work from the widget menu, and after manually deleting the conf file added by the widget it reverted to using nVidia, but now the desktop looks different, I had to scale the display x1.5 to make it look the same.  Though, at the clean install the display was not zoomed yet the KDE was looking like the currently x1.5 zoomed.   :-//

- it was late in the morning, maybe I was too sleepy, but there was no snapshot in the YaST GUI to recover from that /etc/X11/xorg.con.d/* changes (maybe other changes in other places too, IDK, the widget asks for reboot (not logout) for its changes to take effect.

- at almost any action I need to redo prefernce settings from my former Kubuntu habits, or to install the missing programs.  This is not because os openSUSE, but over the last 3 years or so there are a lot of customization and installs that I now had to copy into the new OS, no matter what the final choice would be.

- then, for the latest Leap 15.3, not all the programs existing in the 15.2 repositories are present into 15.3, don't know if those programs will be left outside forever or just not yet ready, or maybe just the installer webpages are outdated (sometimes if I manually change in the command line from 15.2 to 15.3 it works even if the webpage was not listing any 15.3 program).  But not always, sometimes there is no repository in the most recent 15.3, or maybe I'm looking in the wrong place and I shouldn't bother with those webpages, but they are from the opensuse org URL, IDK.   :-//

- maybe I should consider just migrating the old Kubuntu to the SSD (now it's on an ancient 150GB Barracuda HDD).  After all, backups and/or snapshots can be made even without ZFS or BTRFS on the root partition.  At least in the old Kubuntu all the installs and customization are already made and working.

IDK, I'm puzzled and in sleep deprivation after so many installs.
Maybe I should sleep on it before committing to any.   :-DD

Either way, I'll keep the openSUSE KDE Dark theme.   ;D

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3854
  • Country: ro
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #7 on: November 19, 2021, 12:57:27 pm »
It happened that I've messed some things in openSUSE again, and instead of carefully undoing all the changes, I've rolled the whole system back to the previous day using YaST (from GUI/KDE) and again it took a little more than 1 hour to finish the rollback.  No idea why openSUSE takes so long to revert to the day before.  It's an i7/4GHz/32GB RAM and a SSD capable of sustained 400-500MBytes/s throughput.   :-//

For now I've give up on openSUSE/BTRFS, and switched to Ubuntu/ZFS instead (with Internet blocked during install, to skip over the kernel autoupdate during first time install / ZFS issue).

Is it normal for YaST/openSUSE/BTRFS to need about an hour or so to roll back to the day before, or was I doing it wrong?

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 3589
  • Country: fi
    • My home page and email address
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #8 on: November 19, 2021, 01:12:34 pm »
it took a little more than 1 hour to finish the rollback.
Definitely not using LVM snapshots, then.  They're basically instantaneous.  (As are VM snapshots also, by the way.)

Of course, with LVMs (and virtual machine snapshots), you do need to create every snapshot you may wish to roll back to; they're not auto-created.  Thus, LVM does not support stuff like "roll back to yesterday", unless 'yesterday' is a specific snapshot you've created.

(I posted this, because it would be faster for me to reinstall my system from scratch and copy back my user preferences et cetera from offline backup tarballs, than wait an hour for a rollback to complete.)
 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #9 on: November 24, 2021, 11:03:29 am »
- centOS was always recommended as a not so cutting edge but rock-solid OS.  That was like a free version of Red Hat in my understanding.  I've read recently the project was ended, no idea if it is still alive under a new name.

CentOS (Community ENterprise OS) was a clone of RHEL. Not too long ago RH changed it into a rolling beta for RHEL, which upset many CentOS users.

The role of CentOS has been taken on by Rocky Linux (founded by one of the founders of CentOS) and Alma Linux.

We've been using Rocky Linux for a short time now and so far it's been rock solid. It lacks some of the FIPS stuff that's in RHEL but that is of no concern for most users.


Quote
SSD Provisioning and SWAP

- I've seen provisioning sometimes called over-provisioning or under-provisioning, sometimes refers to some internal (not visible) extra capacitity, some other times it refers to letting some free (unformatted) space on each SSD disk.
- for example the SSD tool called Samsung Magician does this on Windows:  It let about 10-15% of the total disk space unformatted.

It seems like the SSD firmware (or at least this Samsung SSD firmware) can figure out by itself that there is an unused (unformatted) area, and take advantage of that to reduce the wear out of the most frequent used sector from the allocated areas.  The re-mapping of used blocks to the unformatted area is transparent for the whole PC.

I'm not sure about over-provisioning.  Apparently none of the installers are over-provisioning by themselves on my SSD (tested FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS).

- Is this over-provisioning still a requirement for file systems like ZFS or BTRFS?

Overprovisioning has nothing to do with the OS, it's a method to extend the lifetime of a flash storage device like a SSD by reducing the amount of memory that is in actual use (thus giving more spare memory cells for wear leveling).

Every SSD uses internal overprovisioning (i.e. it has more capacity than it says on the case, with consumer drives often just a few percents and enterprise drives sometimes exceeding 20%), but that's invisible to the user/system. Manual overprovisioning is only done when the situation demands a reduction in write load on the drive, and because of the ever lower endurance ratings of consumer SSDs this is mostly a thing now with consumer drives (server/enterprise grade drives usually do 0.5-3 DWPD, i.e. at 1 DWPD you can write the complete drive once a day every day for the 5 years or whatever the warranty is and your drive is still fine).

For desktop use, even with a consumer-grade SSD, overprovisioning isn't necessary. If you write a lot to the drive then you may want to consider just getting a better SSD which has the appropriate endurance rating.

Quote
Is it normal for YaST/openSUSE/BTRFS to need about an hour or so to roll back to the day before, or was I doing it wrong?

No, that's not normal. Especially on a system with an SSD (even if it's a slow SATA SSD).

From your description of all the problems you had I suspect there are some underlying issues with your hardware config.
« Last Edit: November 24, 2021, 11:07:30 am by Wuerstchenhund »
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3854
  • Country: ro
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #10 on: November 24, 2021, 12:06:59 pm »
Thank you for clarifying it all.

The disk is consumer level https://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850pro/ but from the PRO family, with 10 years warranty and recommended for small business server.  The cheaper Samsung SSDs with less endurance and shorter warranty for normal workstations is their EVO series (EVO cost/GB was about 2/3 of PRO).

I've benchmark mine and it does sustained writing at about 500 MB/s, never less than 400 MB/s (advertised as 550 MB/s), and reads up to 600 MB/s.  Maybe I've hit a bug in openSUSE, because for anything else other than YaST rollback, it all works very fast no matter which OS.   :-//




For now I settled on Ubuntu with ZFS on root + KDE Plasma on top.  They had to develop their own tool, ZSys, to make automated ZFS snapshots, and to add restore menus in the Grub boot screen, with option to restore either the OS, or OS+users data.

ZSys is another layer that came with a new concept on top of the ZFS datasets/snapshots, they called it "states".  One can still do ZFS handling from command line, but ZSys (zsysctrl) is integrated with Systemd and Grub, and doesn't need ZFS knowledge to save/restore a "state".

For now ZSys is command line only, it is working OK but still in development, and not very well documented.  The only intro/docs I could find apart from man pages is a blog from one of the ZSys devs, but don't expect that to be like a user manual:  https://discourse.ubuntu.com/t/zfs-focus-on-ubuntu-20-04-lts-blog-posts/16355




I kept FreeBSD as a second OS on a uSD card, I'm very pleased with FreeBSD so far but I'm not yet ready to use FreeBSD only, as a daily OS.  I've found a very promising book called "Absolute FreeBSD" by Michael W. Lucas, which I like a lot, oriented for learning the principles, more than "how to set x".  Not only educational (has some tales and inside story from the history of UNIX and BSD apparition, etc.) but sometimes even funny.

https://books.google.com/books?id=oEfWtQH7YK8C&printsec=frontcover#v=onepage&q&f=false
there is a 3rd edition already:  https://nostarch.com/absfreebsd3

It's a book about FreeBSD, but since I start reading it, I've learned more about Linux than from all other sources combined.  Yes, it's a BSD book that unintended also teaches Linux.  ;D

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #11 on: November 25, 2021, 05:22:05 pm »
The disk is consumer level https://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850pro/ but from the PRO family, with 10 years warranty and recommended for small business server.  The cheaper Samsung SSDs with less endurance and shorter warranty for normal workstations is their EVO series (EVO cost/GB was about 2/3 of PRO).

I know Samsung calls it "Pro" but as you said it's still consumer grade (the endurance rating is pretty poor, but in line with what's common for consumer grade drives).

I know many people like Samsungs but personally I'm not a fan of them, as my experience with a larger number of them was quite poor (lots of premature deaths plus a number of compatibility issues with their firmware).

Quote
I've benchmark mine and it does sustained writing at about 500 MB/s, never less than 400 MB/s (advertised as 550 MB/s), and reads up to 600 MB/s.  Maybe I've hit a bug in openSUSE, because for anything else other than YaST rollback, it all works very fast no matter which OS.   :-//

That's what I'd expect from a good SATA drive.

But I doubt that there is problem with what is a commonly used SSD and openSUSE or BTRFS.

Have you checked if your SSD is on the latest firmware?
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3854
  • Country: ro
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #12 on: November 25, 2021, 07:46:19 pm »
I've looked for an update only weeks ago, and it wasn't any new one for the last 1-2 years.  MB FW was updated when I start reinstalling, there were some microcode updates for the proc.  Both the SSD and the MB are about 4 years old, so if it were to be a HW bug somebody else would have noticed and fixed that already.

The SSD was not used more than a year.  Then I've start installing Linux "for testing" on some HDDs, and since then, never returned to Windows.  Didn't use the SSD in the last 3 years, it is not wear out.  It used less than 10% of its guaranteed TBW so far.




I remember when the rollbacks were running, there was a windows scrolling files all the time.  TBH I suspect it might have took that long because of displaying all those rolled back files.  But I doubt nobody did a rollback from Plasma before.  I don't know what it was.   :-//

Either way, I don't have the will to reinstall again after spending more than a day time customizing Ubuntu themes and colors to make a decent dark desktop.   ;D

So far Ubuntu with ZFS still working well, thought in the last days I was tinkering mostly with a new FreeBSD install, which also works very well.




...reinstall my system from scratch and copy back my user preferences...

"Is it possible to learn this power?"  ;D
What to save, and does this saves the pages/settings/passwords from Firefox?

Youtube, Github and alike are killing me with email reactivations each time I change the browser.  Everybody is possessed and obsessed about "protecting" me.  Why TF do they ask for a user/password if they are not gonna consider it!?!

I want a law for a mandatory checkbox to opt out of unsolicited "protection".   >:(

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 3589
  • Country: fi
    • My home page and email address
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #13 on: November 25, 2021, 08:23:49 pm »
...reinstall my system from scratch and copy back my user preferences...
What to save, and does this saves the pages/settings/passwords from Firefox?
Your Firefox profile in Debian derivatives is in $HOME/.mozilla/firefox/.  It can contain more than one profile directory (identifier.default, where the identifier part is an alphanumeric semi-random identifier).  The profiles.ini in that directory describes them, with the currently active/default one having the default=1 key.  On machines with 64-128 MiB of RAM to spare, but with slow storage, I've used a pair of scripts (either session scripts, or wrapped around the firefox startup script) to keep the profile in an uncompressed tarball when not in use, and on an tmpfs ramdisk when used.

In general, your user preferences are all in files or directories located in your home directory, starting with a dot ($HOME/.file or ~/.directory/).  The exact ones vary depending on the Desktop Environment you use (Gnome, KDE Plasma, XFCE, LXDE).  You can run for example find ~ -maxdepth 1 -name '.[a-z0-9]*' to see the entire list.  (In shell paths, $HOME/ at the start of the path is equivalent to ~/.)

Because I regularly take tarballs from my home directory in the background via
    ionice -c 3 nice -n 19 tar -cf yyyymmdd-username.tar -C ~username/ .
and then generate a detailed list their contents via
    ionice -c 3 nice -n 19 tar -tvf yyyymmdd-username.tar > yyyymmdd-username.files
and finally compress them using xz via
    ionice -c 3 nice -n 19 xz -z yyyymmdd-username.tar
I can extract for example only my custom binaries, Firefox profile, Thunderbird emails, and any stuff I have under Documents, quickly from a backup by running
    tar -xf path/to/yyyymmdd-username.tar.xz ./bin/ ./.mozilla/firefox/ ./.thunderbird/ ./Documents/
in the newly created user home directory.  When creating users, it makes sense to keep track of the user and group ID's, so that the numeric IDs match across your machines for the same accounts.  (There is no need for UIDs and GIDs to be continuous.)

If I am only looking for a specific file, I simply grep the yyyymmdd-username.files files to see which version I want.

You can exclude specific paths by using --exclude glob-pattern, so if you have lots of large files or say a media directory, you probably want to backup those separately.  I typically only care about my preferences, emails, and answer/code snippets (that I keep in a separate tree), which all only come to a few dozen megabytes per tarball, so I take a backup of those most often.
 
The following users thanked this post: RoGeorge

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: ca
    • VE7XEN Blog
Re: FreeBSD/ZFS, openSUSE/BTRFS or Ubuntu/ZFS(experimental)?
« Reply #14 on: November 26, 2021, 12:48:31 am »
it took a little more than 1 hour to finish the rollback.
Definitely not using LVM snapshots, then.  They're basically instantaneous.  (As are VM snapshots also, by the way.)

Since btrfs snapshots can be mounted in parallel with the filesystem they are snapshots of, the same should be true here. If you want to restore the whole root system, the idiomatic way would be to either change the default snapshot so a different one gets mounted as root, or rename the snapshot over top of the 'default' one, and then reboot the system. YaST may have some tricks up its sleeve to do it on the live system instead, but I'm not sure what that would entail, since it's generally not possible to unmount root. It might also be deleting the defunct snapshot that is taking the time, as this involves a lot more 'work' (finding the now-invalid blocks and freeing them) than restoring (change a pointer).

Quote
Of course, with LVMs (and virtual machine snapshots), you do need to create every snapshot you may wish to roll back to; they're not auto-created.  Thus, LVM does not support stuff like "roll back to yesterday", unless 'yesterday' is a specific snapshot you've created.

LVM snapshots are incredibly cumbersome and limited compared to btrfs/ZFS snapshots, so they aren't really comparable.

btrfs can be considered stable as long as you're not using the parity RAID modes, IMO. On a Linux desktop, it is the ideal choice if you want something like Apple's Time Machine; it's trivial to explore the state of the system years back and restore a single file or subtree as necessary, you can just mount and browse the snapshots in your file manager. Maybe there is a case for OpenZFS on a dedicated storage machine, but I would not trust that choice on a machine with a complex workload like a desktop, and don't really see a good reason to wedge ZFS in a place it doesn't belong and where it offers little additional functionality.

FWIW I agree that OpenSUSE is underrated, and easily the best of the commercial distributions for daily desktop use. However, personally I am using Arch/KDE (on btrfs).
73 de VE7XEN
He/Him
 
The following users thanked this post: Wuerstchenhund


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf