The plugin currently creates the pool and then sets the options (whether on the form or not). I could change the code to pass the options on creation (creating a filesystem does that). I was more concerned about whether you think those options should just be set on pool creation for the filesystem to inherit them OR if the filesystem creation should explicitly set them.
-
-
ryecoaaron I think the options "-O atime=off -O acltype=posix -O xattr=sa" should be set at pool creation time.
-
@ryecoarron I looked at https://docs.openmediavault.or…velopment/howitworks.html to get a better idea of how the front end and back end communicate. Putting omv-egined in debug shows the rpc call is to the zfs service addpool method when the user creates a pool via the WebUI. Looking at your commit changes for including zstd compression confirms "method OMVRpcServiceZFS.addPool" is the central piece of code.
Line 158, looks to be the place where you could add pool properties options "failmode=continue" and "autoexpand=on".
The pool is effectively created at line 194.
More importantly, between line 197 & 202 is where you could add/amend code to set pool filesystem properties "atime=off, alctype=posix, xattr=sa" before the setProperties method is called.
Is the idea of hidden fields used on OMV WebUI pages? Are hidden fixed fields with names and values on the create pool page a viable way to get those options passed to the back end?
-
-
Line 158, looks to be the place where you could add pool properties options "failmode=continue" and "autoexpand=on".
The pool is effectively created at line 194.
More importantly, between line 197 & 202 is where you could add/amend code to set pool filesystem properties "atime=off, alctype=posix, xattr=sa" before the setProperties method is called.Yep, I already have the changes made and have been doing some testing.
Is the idea of hidden fields used on OMV WebUI pages?
It can be done but that isn't what I am doing for this.
Are hidden fixed fields with names and values on the create pool page a viable way to get those options passed to the back end?
Sure but I was hard-coding them in the php code
-
update defaults · OpenMediaVault-Plugin-Developers/openmediavault-zfs@46198b1Signed-off-by: Aaron Murray <plugins@omv-extras.org>github.com
-
ryecoaaron Looks good to me and thanks.
-
-
zfs plugin 7.0.3 in the repo now.
* Exclude root and boot filesystems if they are zfs
* Set default ashift to 12
* Add zstd compression types and populate compression types with a function
* Add search field and make columns sortable on properties form
* Sort properties by name by default
* Update pool and filesystem creation defaults
-
ryecoaaron
Hat das Label gelöst hinzugefügt. -
@ryecoarron Things are not quite right yet. This is what I have after creating a new pool from the WebUI:
Code
Alles anzeigenroot@omv7vm:~# dpkg -l | grep openm ii openmediavault 7.0-32 all openmediavault - The open network attached storage solution ii openmediavault-kernel 7.0.3 all kernel package ii openmediavault-keyring 1.0.2-2 all GnuPG archive keys of the openmediavault archive ii openmediavault-md 7.0-6 all openmediavault Linux MD (Multiple Device) plugin ii openmediavault-omvextrasorg 7.0 all OMV-Extras.org Package Repositories for OpenMediaVault ii openmediavault-zfs 7.0.3 amd64 OpenMediaVault plugin for ZFS root@omv7vm:~# zpool history NewPool History for 'NewPool': 2024-02-18.16:51:25 zpool create -f -o ashift=12 -o failmode=continue -o autoexpand=on NewPool raidz1 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-3 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-4 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-5 2024-02-18.16:51:26 zfs set compression=zstd-3 NewPool 2024-02-18.16:51:26 zfs set omvzfsplugin:uuid=178f6803-f681-47ce-ab71-37d2edfa8f9e NewPool 2024-02-18.16:51:26 zfs set omvzfsplugin:uuid=178f6803-f681-47ce-ab71-37d2edfa8f9e NewPool 2024-02-18.16:51:36 zfs set omvzfsplugin:uuid=178f6803-f681-47ce-ab71-37d2edfa8f9e NewPool root@omv7vm:~# zfs get all NewPool | egrep "acl|attr|time" NewPool atime on default NewPool aclmode discard default NewPool aclinherit restricted default NewPool xattr on default NewPool acltype off default NewPool relatime on default root@omv7vm:~#
Values of acltype, xattr, and atime are still the defaults.
Not part of this bug fix, but two other problems are incorrect mount option shown in WebUI for zfs filesystmes and devices used in pools are not excluded from "creating filesytems", e.g:
At the CLI:
Code
Alles anzeigenroot@omv7vm:~# zpool status MainZFS pool: MainZFS state: ONLINE config: NAME STATE READ WRITE CKSUM MainZFS ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0 ONLINE 0 0 0 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-1 ONLINE 0 0 0 errors: No known data errors root@omv7vm:~# lsblk -f | grep MainZFS ├─sda1 zfs_member 5000 MainZFS 13916081971760056460 ├─sdb1 zfs_member 5000 MainZFS 13916081971760056460 root@omv7vm:~# findmnt --real --type zfs TARGET SOURCE FSTYPE OPTIONS /MainZFS MainZFS zfs rw,noatime,xattr,posixacl,casesensitive └─/MainZFS/Camera MainZFS/Camera zfs rw,noatime,xattr,posixacl,casesensitive /NewPool NewPool zfs rw,relatime,xattr,noacl,casesensitive root@omv7vm:~#
-
Values of acltype, xattr, and atime are still the defaults.
These are set for the filesystem not pool because trying to create pool with those options from the command line told me they are not pool options.
Code$ sudo zpool create ztest10 -o ashift=12 -o atime=off -o acltype=posix -o xattr=sa -o failmode=continue -o autoexpand=on -m /srv/ztest11 /dev/vdj property 'atime' is not a valid pool or vdev property $ sudo zpool create ztest10 -o ashift=12 -o acltype=posix -o xattr=sa -o failmode=continue -o autoexpand=on -m /srv/ztest11 /dev/vdj property 'acltype' is not a valid pool or vdev property $ sudo zpool create ztest10 -o ashift=12 -o xattr=sa -o failmode=continue -o autoexpand=on -m /srv/ztest11 /dev/vdjproperty 'xattr' is not a valid pool or vdev property $ sudo zpool create ztest10 -o ashift=12 -o failmode=continue -o autoexpand=on -m /srv/ztest11 /dev/vdj $
Not part of this bug fix, but two other problems are incorrect mount option shown in WebUI for zfs filesystmes and devices used in pools are not excluded from "creating filesytems", e.g
Guess I will have to see where the mount options come from
-
-
I guess I need to use capital 'O' for the options. I will fix.
-
I was about to say has the difference between lower case o and upper case O been missed here in the zfs command.
-
add options to pool creation · OpenMediaVault-Plugin-Developers/openmediavault-zfs@f21dee0Signed-off-by: Aaron Murray <plugins@omv-extras.org>github.com
-
-
ere in the zfs command.
And that is why I dislike working on this plugin.
-
The mount options are hard-coded. I will look for a better solution but not going to put a lot of time into this since it has always been this way.
openmediavault-zfs/usr/share/omvzfs/Utils.php at master · OpenMediaVault-Plugin-Developers/openmediavault-zfsOpenMediaVault plugin for zfs. Contribute to OpenMediaVault-Plugin-Developers/openmediavault-zfs development by creating an account on GitHub.github.com -
And that is why I dislike working on this plugin.
I haven't setup a new pool in awhile but, thanks for working on it.
-
-
7.0.4 is in the repos. It will set the mount options from the output of /proc/mounts when importing or creating a new pool.
-
7.0.4 is in the repos. It will set the mount options from the output of /proc/mounts when importing or creating a new pool.
ryecoaaron Adding a pool now creates the pool with the desired properties set. Thanks for the enhancements to the complex zfs plugin.
The sort/search on the properties from greatly improves the usability. Not only did you previously have to page back and forth, but with the edit button being at the top of the page and the save button at the bottom it was necessary to scroll up and down a lot to make a few changes to filesystem properties. Now you can just search for the property you want to edit which is much simpler to do.
Want to know which filesystem properties are inherited form the pool just sort on source. If you want to know current value of recordsize, sort on Value. Want to know current value of all ACL related properties search on ACL. These few examples show the improvement.
-
Just wanted to say thank you for setting such sensible defaults and adding the option.
I continue to be impressed by your dedication to these plugins
-
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!