Native ZFS support for Webmin

Currently the full features of ZFS aren’t usable natively in Webmin, people have at times been directed towards “ZFS Manager” (ZFS Manager | A Module for Webmin (wordpress.com)) extension. However there doesn’t seem to have been any work done, on the extension since during Summer 2023. There’s also been no further updates released.

So due to this situation I was wondering whether its possible, for native support to be added to standard modules releases please?

| SYSTEM INFORMATION |
|------------------------------|-------------------------------|
| FreeBSD 13.3 |
| Webmin version | 202.1 |

1 Like

Gosh! I thought ZFS was put to sleep rest in pieces with the exit of Oracle.
I would doubt if Webmin staff have either the time or budget to keep it alive.

The ZFS Filesystem is still around and being developed! Though FreeBSD is now using the ZFS filesystem by running OpenZFS. This OpenZFS is currently on version 2.2.5. On top of this the iXSystems are also contributing code to the OpenZFS software, for its development.

The event of Oracle leaving ZFS, hasn’t killed the ZFS filesystem. As due to the OpenZFS which has many contributors. It’s still being used in a wide variety of places, so in no way is it put to sleep.

So given that ZFS is still being developed and FreeBSD is also being developed, maintained and supported.

@Ilia Can serious thought please be given to working on implementing native support for ZFS in Webmin?

@Stegan If you were to check out the OpenZFS website and the companies page. Your going to have a real surprise as to how much, that the ZFS Filesystem is still going.

1 Like

ZFS is massive in NAS storage systems.

Proxmox and TrueNAS are heavily dependant on this, and in fact my Virtualmin is on a ZVol that is on a TrueNAS running ZFS.

However I could not use Webmin to control it, and I am not sure I would want to either as the development that TrueNAS put into getting ZFS to work correctly is substantial.

everyones setup is different but the resources required to run ZFS are considerable.

P.S. snapshoting on ZFS is very handy and can prevent against Ransomware but should not be used as a backup.

2 Likes

@John35 What exactly isn’t working? What do you mean by native support? What is the content of your /etc/fstab file on your FreeBSD system?

@Jamie, I can see that you added support for zfs back in the days based on the local_disk_space sub in the mount module, correct?

Yes, although the support is limited to preventing double-counting of local disk space.

Can you please unpack this?

@Ilia What I mean by native support for ZFS is features similar to the module listed above. But part of the standard official code of Webmin’s standard modules.

For instance being able to show and configure the default properties of ZFS pools, also the properties of pools present on the system that Webmin is installed on or connected to.

Additionally being able to create and manage snapshots within Webmin, as well as the same for the ZFS pools. On the matter of managing ZFS pools within Webmin this includes being able to resize the pools.

Additionally be able to monitor the health of the ZFS pools and remediate it where possible within Webmin.

@Stegan As a follow up to your post Yesterday and my reply. I noticed today that a Sovereign Tech Fund has invested in FreeBSD, with a lot of money.

This investment was to the tune of 686,400 Euros, which is a very significant amount and was made during August 2024. The fund is based in Germany.

Sovereign Tech Fund to Invest €686,400 in FreeBSD Infrastructure Modernization | FreeBSD Foundation

1 Like

I’m sure Webmin staff would like such a commitment as would anyone else down the chain. I still cannot really see the relevance/significance to the majority of Webmin users :man_shrugging:

@Stegan Other than Cockpit (for systemd) based Linux distros, using Webmin is the only open source and/or free browser based administration interface for FreeBSD, which is stable and production ready.

So this investment will bring new users and developers to FreeBSD and they’re going to be needing an interface like Webmin for administration, from their web browsers. So having native management, features for ZFS on Webmin will aid those with FreeBSD based servers to administer them. Especially when configuring and manging the ZFS based storage on those servers.

At the moment major parts of the ZFS management outside of the apparently not still being worked on 3rd party module, are all command line console based. This includes managing the ZFS based storage pools, such as resizing them.

So being able to do so within the Webmin interface would really help with remote administration through it.

The improvement to processes of FreeBSD (especially CI/CD) will be an aid to future FreeBSD development and testing. As this means features developed by FreeBSD will be improved, but also likely the interfaces for these tools will also at some point be available for development with FreeBSD.

Thus meaning that Webmin development teams can use them to aid in the development of future versions of the software, when preparing the FreeBSD based releases.

It also will aid in the preparation of SBOM for the Webmin releases, when Webmin is used in relevant environment where such is required.

What I mean is that on a ZFS system if you run df to show local disk space used and available, all filesystems mounted from the same ZFS pool show the same total size. So if they were added up it can look like there’s a lot more disk on the system than there really is.

2 Likes

Native support of ZFS by FreeBSD is one of the advantages of FreeBSD when running on a system with adequate resources to realize the advantages of ZFS. Full support by Webmin of ZFS on FreeBSD would significantly increase the appeal of Webmin on FreeBSD. Prior relevant discussion about ZFS on FreeBSD is here: https://sourceforge.net/p/webadmin/bugs/5269/

As an aside, I recently tackled a significant impediment to broader Webmin adoption on FreeBSD, which is installation. Webmin now can be installed or upgraded on a FreeBSD system when logged in as a Superuser or a user with permission to run sudo by running this command line:

sudo pkg install curl && sh -ci "`curl -s http://www.AdeptData.com/Software/Download/InstallWebminOnFreeBSD.sh`"

A full installation instruction page that will be linked to from the Webmin site is coming. Here is a link to download the installation script for review prior to running it, or for copying the script to FreeBSD local storage to be run from there: <http://www.AdeptData.com/Software/Download/InstallWebminOnFreeBSD.sh>

1 Like

@MSSEsq Thanks for preparing this script for use by users. However there’s a FreshPorts listed Webmin package which hasn’t seen love since the beginning of last year.

If this package were to see new maintenance, then all the FreeBSD users would need to do is run “pkg install webmin”.

FreshPorts – sysutils/webmin: Web-based interface for system administration for Unix

Years ago I used the FreshPorts Webmin and Virtualmin packages to install on FreeBSD, which produced multiple problems. Those packages are often quite out-of-date. Allowing Webmin to update itself is detected by the FreeBSD security system as extreme corruption. Working around this problem requires creating 0 size placeholder files for the many files reported as missing using something like touch, and then running sudo pkg check --recompute to make the security system consider the update legitimate. Also, the Virtulamin package installed an obsolete configuration file that was missing many required parameters. That prevented Virtualmin from functioning properly. The installation script that I developed installs or upgrades to the latest version from the official repository, and avoids the FreeBSD security system problem. Webmin itself can install the Virtualmin module from the official repository.

@Stegan @Ilia and/or @Jamie Anyway I hope we’ll be able to see this in a release of Webmin.

@MSSEsq The script looks really useful however would alterations other than changing the download filename be needed for downloading and installing the minimal version of Webmin that can be used on FreeBSD?

Also the sudo command is capable of being used by FreeBSD but isn’t installed by default. So depending on the installation process used, and how systems are setup it may not already be installed. So may need to be installed manually by the user first or they will need to su root or login as root locally (alternatively via SSH).

@John35 I want to avoid hijacking your discussion about ZFS support with tangential discussion of Webmin installation using my script, but since you are the original poster, I should reply.

The standard open-source version of Webmin supports FreeBSD, so no “minimal” or otherwise customized version is needed. The download URL in the script is redirected to the correct download URL for the current version. If you want to see this, then edit the script to run curl with the --verbose option.

You are correct that the script requires sudo and curl. I considered starting a sub-shell running as the Superuser as an alternative to using sudo, but decided that doing so seemed less suitable for newer users wanting to become familiar with FreeBSD by running Webmin. Webmin can be installed on a fresh instance of FreeBSD by logging in as root using the standard kernel shell that opens automatically and then running the following two command lines:

pkg install sudo curl
sudo sh -ci "`curl -s http://www.AdeptData.com/Software/Download/InstallWebminOnFreeBSD.sh`"

I tested this on a fresh FreeBSD virtual machine and had Webmin running in less than two minutes. Of course, the root user does not need to use the sudo command, but publishing a single version of the installation command lines seems less likely to cause confusion. Your questions reinforce the need for an instruction page that I plan to publish along with the installation script.

@MSSEsq When I mentioned Minimal the reference was to the other file download from the Webmin website. If you need to know specifically I’m referring to this URL https://www.webmin.com/download/webmin-current-minimal.tar.gz.

This download includes a smaller subset of the software compared to https://www.webmin.com/download/webmin-current.tar.gz, which contains a complete set of every standard module and/or theme. Currently the script will download and install the complete set, which is more resource consuming. If someone doesn’t need all of the standard modules, it could be a waste.

To get the script to download and install the minimal option at the very least would require the user to alter the URL in the script. Though depending on the situation it maybe better, to offer a choice between the complete or minimal during the installation.

At first I thought there was a bug in the script you developed, however upon further testing by trying with the official setup.sh script only. It was found that the official script is the source of the Webmin instance, not being able to run at start-up even when enabled as such during installation. This is due to there being a missing start-up script file, typo or other bug in the setup.sh script or directory structure of the compressed file.

@Joe There’s currently a bug in the setup.sh script for when it’s supposed to install the service (daemon) initialisation script. It’s not installing it for FreeBSD so can this please be fixed.

@Jamie, I think we broke it during the systemd migration?