ZFS information.

  • Hi Folks,


    What is the code for setting up a scrub for the OMV5 version of ZFS? What site would you recommend for information on how to run ZFS.


    Thanks.

  • What is the code for setting up a scrub for the OMV5 version of ZFS?

    zfsutils sets up a monthly scrub by default. Do you need more than that?


    cat /etc/cron.d/zfsutils-linux

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


    # TRIM the first Sunday of every month.

    24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi


    # Scrub the second Sunday of every month.

    24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • zfsutils? Where do I find that?

    The plugin installs it automatically as a dependency - https://github.com/OpenMediaVa…master/debian/control#L18

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I have ZFS up and running on OMV5. Everything seems to be working well. And if setting up the three drives for Z1 is the same as setting up a pool, that is what I have done. And if I understand the comments from others, the monthly scrub is already scheduled without me needing to do anything. Is that correct?

  • Is that correct?

    If you installed the plugin, you have a monthly scrub setup. The plugin doesn't actually create the schedule but a package that is a dependency of the plugin does.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Is there a default date for when the scrub runs? Is it the first of the month, or the last day of the month, when?

    cat /etc/cron.d/zfsutils-linux

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ZFS ran it's first scrub on my system. ZFS reported the following: scan: scrub repaired 0B in 00:25:37 with 0 errors on Sun Apr 10 00:49:40 2022. I'd like some help interpreting the report. specifically what does it mean that it repaired 0B and what does 0 errors mean?


    Thanks

    Bart

  • scrub repaired 0B in 00:25:37 with 0 errors on Sun Apr 10 00:49:40 2022. I'd like some help interpreting the report.

    Everything is fine:

    scrub repaired "0B"means nothing needed repairing. Occasionally, you might see a few KB to a few MB repaired. This can happen as disks age. There's still nothing to worry about.

    "0 errors"
    is what you're looking for. 0 errors means nothing is / was corrupted.

    Here's the most extensive ZFS cheat sheet I've found. -> cheat sheet 
    I doubt that you'll need to use 95% of those commands, but it's a good reference to have on hand.

    You might give some thought to running the following from the command line:
    (
    Substitute your pool name in for ZFS1 )

    zfs set aclmode=passthrough ZFS1

    zfs set aclinherit=passthrough ZFS1

    zfs set acltype=posixacl ZFS1

    zfs set xattr=sa ZFS1


    (Optional)
    zfs set compression=lz4 ZFS1

    _____________________________________________________________________


    To answer an earlier question:
    If you used the plugin to set up ZFS, you created a "pool". (A pool of disks.) You can set up add shared folders on the root of the pool, but you'd be better off to add "file systems" to the pool. A ZFS filesystem has editable properties that might be of use to you later.

  • I attempted to add zfs pool called zfs1 and got error. Details are contained in the attached. Is this normal?


    Oddly enough, I had to select the apply button twice, and things seem to be functioning.


    Any number of factors might be involved in a single error. They only way to determine if there's a problem is if it's "repeatable".

    In the bottom line, if everything is working, I wouldn't worry about a one time event.

  • I've discovered that moving directories has resulted in system no longer seeing home via ssh and SMB not behaving properly. Is this handled in omv-env or elsewhere? Thank you.

    Could not chdir to home directory /srv/dev-disk-by-uuid-blah-blah/home/user

  • "Moving Directories"? Why would be the purpose of moving directories?

    If you've moved "home" for the SSH user, the system is not going to find it. (The path no longer exists.) I'm not sure how this would access Samba permissions.

    The only course I could recommend would be to delete and recreate the user.

  • If you remane the directory back and use OMV to change the home directory location, OMV will take care of this for you.

    If you only want to change something for a single user use the cli and update the users home directory to where you moved it.


    https://linux.die.net/man/8/usermod


    But make sure, OMV does not touch this user again.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • /srv no longer exists

    OMV needs /srv for many things - most importantly the saltstack code. You can't remove it or move it.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!