[HOWTO] Instal ZFS-Plugin & use ZFS on OMV

  • I'm having insserv loop errors involving ZFS when I try to update some other packages like samba or virtualbox, and update/remove is broken.
    This is the output when trying to update:


    Seems that this error appeared before, but no solution was posted.
    I have a ZFS pool in use.

  • What did you do to fix the issue? Would be good to know for others who might get the same problem.


    I think he was stuck with OMv 1.x, he has issues with zfs package postinst file. So i can't remember has the override being placed at both versions testing and stable?

  • Override should be in both repos since some time back.


    I'm currently porting the plugin to the upcoming 3.x version of OMV which is using systemd to start the services at boot. I hope that this should remove the need for overrides in the future.

  • I hope that this should remove the need for overrides in the future.


    this is currently on their github


    https://github.com/zfsonlinux/zfs/blob/master/etc/systemd/


    Don't know if they pass it to debian package.


    On the zfs-mount.service they have

    Code
    Before=local-fs.target

    so i guess should be fine.

  • Please add a -f = Force Check button like a option to force first import when the pool is previosly used by other system.



    PD : or use -f automatically if first time fail like does Nas4Free to import.



  • Thanks for the tutorial. One question: when I setup samba I can access some folders but not others. Any suggestions? I messed around with chmod a bit but it did not seem to affect permissions.

  • @cllgnc89


    Maybe you can add a property to the filesystem: 'acltype' and use 'posixacl'. So you can edit folder acls in omv interface - see the screenshot.



    I need a little help too....
    I dont want to create a share for every user, I only want to share the 'users' filesystem and also want to use quotas. But, if I share the FS '/Storage/users' with CIFS, and mount for ex. 'user1', with is a filesystem by itself, I only see the quota of '/Storage/users'. Does someone know a solution?

  • There is something unclear here.


    Let's get to it.



    NORMALLY U USE ZFS LIKE THIS
    create pool:
    # zpool create myfirstpool mirror -o ashift=12 ata-sldkfjlsjfdsljfslkjf ata-oiurorisiofsjodifjisojfio


    Creating DATASET in a zpool:
    # zfs create myfirstpool/myfirstDS


    List pool:
    # zpool list


    we see myfirstpool


    List datasets:
    # zfs list


    we see myfirstpool/myfirstDS



    Get all zfs attributes for a specific dataset:
    # zfs get all myfirstpool/myfirstDS


    FOLLOWING YOUR WEB GUI INSTRUCTIONS IF I CHECK WHAT OMV MADE


    List pool:
    # zpool list


    we see myfirstpool


    List datasets:
    # zfs list


    we see myfirstpool (This is clue that no proper dataset is made... just some default zfs thing created the same name as zpool. zfs always makes something like this at time of zpool creation but i don;t think it is supposed to be used for data storage)


    Get all zfs attributes for a specific dataset:
    # zfs get all myfirstpool/myfirstpool


    we see error "no such dataset"


    POINT


    It seems to me that you created a zpool and did not create a dataset in it as proper practice. Instead, the plugin uses a default dataset created at time of zpool creation? I have concerns about the validity of this... in particular about data safety.


    Would be nice to have some elaboration on this.


    What you have to realize is that zfs requires datasets to be made in zpools.

  • In OMV, when you select a zpool and click add object... you get options:


    Fielsystem
    Volume
    Snapshot


    What the heck do you mean by Filesystem and VOlume here... the teminology doesn't make sense.


    By Volume do you mean "dataset"? What do you mean by Filesystem then? Is that "dataset"... Confusing.
    Also why do you need to specify size for volume... this shouldn't be required in zfs.


  • When developing the plugin I've mainly tried to use the terminology set by Oracle, see here: https://docs.oracle.com/cd/E18…/html/819-5461/ftyue.html
    Let me know if there still is something that's not clear. Sorry for not posting back earlier.

  • It seems to me that you created a zpool and did not create a dataset in it as proper practice. Instead, the plugin uses a default dataset created at time of zpool creation? I have concerns about the validity of this... in particular about data safety.


    Could you please provide some reference as to why the file system created by "zpool create" shouldn't be used for data storage? Waht makes it any different than other file systems created by ZFS?

  • Quote

    Could you please provide some reference as to why the file system created by "zpool create" shouldn't be used for data storage? Waht makes it any different than other file systems created by ZFS?


    Well, there are some issues with data being on the root FS of a pool, I believe mainly to do with `zfs send`. From what I read, but not experienced, `zfs send` needs to be able to create all of the filesystems on the remote, and it can't do that with the root fs, so none of those files will send. Although, I cannot find any real documentation that talks about this situation.


    From: http://www.solarisinternals.co…/ZFS_Best_Practices_Guide


    Code
    Consider using the top-level dataset as a container for other file systems. The top-level dataset cannot be destroyed or renamed. You can export and import the pool with a new name to change the name of the top-level dataset, but this operation would also change the name of the pool. If you want to snapshot, clone, or promote file system data then create separate file systems in your pool. File systems provide points of administration that allow you to manage different sets of data within the same pool.


    I feel like it would be a bit counterintuitive to have the UI auto-create a child dataset and force you to deal with it. If you want to follow this best practice, then create some data sets after creating the pool.

Participate now!

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