ZFS and Volumes

  • Hello All, I installed the ZFS plugin and managed to add (via the OMV Plugin) a Pool, Filesystem (=Dataset) and Snapshots. I dont quite understand what adding a Volume gives me because it is nowhere visible and cannot be used for anything. Any tips?

    OMV6 i5-based PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD CPU)

  • OK, here is the trick: ZFS Volumes are block devices of defined size that can then be used by Linux to create filesystems on. Unfortunately, this doesn't work in the OMV GUI. The ZFS volume does not show under Filesystems-create new.
    Does anyone know how to fix this?

    OMV6 i5-based PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD CPU)

  • Awesome: You can create filesystem on a ZFS Volume but you have to do it manually in Linux. Afterwards the Filesystem shows up in OMV !
    Example:
    CReate a ZFS pool called Pool2S
    Create a ZFS Volume inside Pool2S with size 10MB (via OMV Plugin) called Vol10
    SSH into your OMV server
    mkfs -t ext4 -V /dev/zvol/Pool2S/Vol10
    Now you can mount a 10MB Block Device with ETX4 filesystem inside OMV-Filesystems

    OMV6 i5-based PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD CPU)

  • Now you can mount a 10MB Block Device with ETX4 filesystem inside OMV-Filesystems

    What is the reason for to create an ext4 file system on top of an ZFS file system?

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • Good point. I haven't found a reason yet but I am sure there is a need for it somewhere, otherwise they would have not implemented that functionality :)

    OMV6 i5-based PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD CPU)

  • Sorry for reviving this old thread, but I thought I'd like to contribute with a use case to the last unanswered question:


    "What is the reason for to create an ext4 file system on top of an ZFS file system?"


    I actually did exactly this, to host my docker storage (default /var/lib/docker), since I am using ZFS on my data drives, and USB thumbdrives as OS disks. I did not want my docker storage to reside on the OS flash drives, and also I did not want docker to have ZFS as storage, since docker will then integrate the image handling with ZFS snapshots, which will cause a mess, since my other data is then also snapshotted in a way that is outside my control.


    So I created a ZVOL inside my ZFS dataset, and formatted it as ext4, mounted it as /docker, and then symlinked /var/lib/docker to /docker.

    I believe I did the same as MarcS, creating the filesystem with mkfs in a shell, but instead of mounting it via OMV gui, I added the UUID to /etc/fstab, for automounting on boot.

  • +1 Miwer : I am going to do the exact same thing as I hate the fact that when running aprox. 20 containers and 20 or so mounted volumes on a zpool, docker will create 200+ legacy datasets / clones on my pool.


    Docker probably have some clever thinking behind creating each layer of the image as a separate dataset but it surely doesn't look nice when you `zpool list...`


    I think creating an ext4 zvol is a great solution as it still gives you all the nice benefits of zfs like compression and snapshots while not creating all those datasets.


    I don't know any downsides to this approach or if there's an overhead so anyone knows please chip in.


    In case anyone are having the same thoughts,I'll share this pretty detailed guide that I found which should walk you through the process.

    https://www.dominicdoty.com/2020/10/24/dockeronzvol.html

Jetzt mitmachen!

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