ZFS Plugin: Why are all Shared Folders moved to a newly created nested filesystem?

  • So today I wanted to create a couple of nested filesystems in ZFS so I can snapshot smaller subsets of the data. When doing this, I noticed that upon creation of a nested filesystem, all shares that were originally pointing to the parent filesystem now point to the nested filesystem (as the parent "device").


    It's easy enough to fix, just switch back to the actual parent device, but why this behaviour? What is the use-case of automatically changing the share to the newly created (and therefore empty) filesystem?


    Example:

    I have a ZFS filesystem called "Camera" on the main ZFS Pool:

    MainZFS/Camera

    This is shared as a shared folder and then via SMB to all my clients. Additionally, another regular folder within the share called "Video" (MainZFS/Camera/Video) is a shared folder.


    I create a sub-filesystem called "RAWs" there and mount it to, say "MainZFS/Camera/Temp/RAWs", using the Plugin:

    MainZFS/Camera/RAWs


    Now what happens, is that all shares originally referencing MainZFS/Camera now reference the "device" MainZFS/Camera/RAWs and therefore all shared folders now end up being shared on the location "MainZFS/Camera/Temp/RAWs"... This means obviously nothing is being shared anymore and new empty folders are created in that new filesystem instead.


    Again, it seems like there is some purpose behind this, but I really can't figure out what the purpose of this would be?

  • After another quick check I can see the problem stems from on how your initial shared folder is set up.




    In my example, zhare2 exhibits the problem you describe if the dataset MainZFS/Camera/RAWS is created, but zshare does not.


  • Thanks! That seems like a viable workaround! I assume, however, that if I'd create a new filesystem in MainZFS then zshare would exhibit the same issue?


    It could be that is not the case, will test it afterwards.


    Edit: I can confirm my hypothesis from above. If I create a shared folder in MainZFS called "zshare" and then create a new filesystem in MainZFS called "zsharetest", the zfs plugin updates the previously created "zshare" shared folder to the new filesystem:

    • Offizieller Beitrag

    It is a known bug for a long time that paths that are a subset of another path have problems. I haven't been able to fix it.

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It is a known bug for a long time that paths that are a subset of another path have problems. I haven't been able to fix it.

    I forgot to mention that unfortunately cloning a snapshot of a dataset whose path is referenced as shared folder also results in changes to the the shared folder config.

    • Offizieller Beitrag

    I forgot to mention that unfortunately cloning a snapshot of a dataset whose path is referenced as shared folder also results in changes to the the shared folder config.

    I understand that it is a bug. Telling me more cases where it causes problems doesn't help me find the solution. I can't do everything myself.

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for the heads-up Krisbee .

    ryecoaaron I'll try and read up on the code, but I'm no dev and have no experience with php. Can I change the php code on the fly on a vm omv install or would I need to compile from source/somehow reload or reinstall omv everytime I try to make a change?


    Sorry if this is a stupid question, but in my experience getting these stupid questions out of the way saves hours of fruitless research because everyone just assumes you need to know this and noone explains it.

    • Offizieller Beitrag

    Can I change the php code on the fly on a vm omv install or would I need to compile from source/somehow reload or reinstall omv everytime I try to make a change?

    When you make a change, you will have to restart omv-engined with: sudo monit restart omv-engined


    This will put omv-engined in debug mode:


    sudo monit stop omv-engined

    sudo killall omv-engined

    sudo omv-engined -df

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!