ZFS Plugin not mounting pool on boot

  • I'm having problems with the ZFS plugin. After a system restart does not mount the existing ZFS pool. I have to go to the plugins interface and manually import it every time. That's a problem, because I store my images and containers there, so even aftar the pool is online, docker and virtualbox still fail and I have to go there and restart or even reconfigure them , as in case of docker.


    I've already tried reinstalling the plugin without results.

  • Hello nicjo and thank you.


    The ZFS_MOUNT variable is correct but the import path is commented out. What should be in there, the /Z2 folder name?


  • I would try to just uncomment the line and use the default value. It all depends on how your pool is created and myself I used the identifiers in "/dev/disk/by-id" so that's what I have as that parameter. You could try do to "zpool status" to see how the disks are "named" in your setup. Mine are called things like "ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N2H5DYTY" and they are symlinks present in the /dev/disk/by-id folder.

  • The default line also didn't work.
    The output from zpool status after manually import is:


    The file list on /dev/disk/by-id is:


    The disks on the Z pool are the western digital. I've tried other directories, but there's nothing on them.

  • Search for "Selecting /dev/ names when creating a pool" on the page https://github.com/zfsonlinux/zfs/wiki/FAQ to get information on the issue. I would recommend to change naming scheme to /dev/disk/by-id which is explained a bit further down on that page.


    After you have changed the naming scheme (by exporting/importing the pool with proper flags) you need to make sure that the ZPOOL_IMPORT_PATH variable lists /dev/disk/by-id and you should be set.

  • I executed the following commands:


    Zitat

    # zpool export Z2
    # zpool import -d /dev/disk/by-id Z2

    And the pool was correctly imported using device id's as it showed on zpool status.



    I made sure that the correct option was in the configuration file (ZPOOL_IMPORT_PATH="/dev/disk/by-id") and rebooted. But the pool isn't there after the reboot. ;(;(;(

  • I haven't found anythig related to "stale cache" on the link you previously sent.
    Is there a way to "debug" it?


    I don't think is anything wrong with the pool or cache. If so it would also cause issues when manually importing. I'm suspecting more on some weird init problem with init order/permissions or anything that could have changed during a system update.


    That message shown about doing a pool update, you've seen it? Could that be the reason?

  • The /etc/zfs/zpool.cache file


    Whenever a pool is imported on the system it will be added to the /etc/zfs/zpool.cache file. This file stores pool configuration information, such as the device names and pool state. If this file exists when running the zpool import command then it will be used to determine the list of pools available for import. When a pool is not listed in the cache file it will need to be detected and imported using the zpool import -d /dev/disk/by-id command.



    Generating a new /etc/zfs/zpool.cache file


    The /etc/zfs/zpool.cache file will be automatically updated when your pool configuration is changed. However, if for some reason it becomes stale you can force the generation of a new/etc/zfs/zpool.cache file by setting the cachefile property on the pool.
    $ zpool set cachefile=/etc/zfs/zpool.cache tankConversely the cache file can be disabled by setting cachefile=none. This is useful for failover configurations where the pool should always be explicitly imported by the failover software.
    $ zpool set cachefile=none tank

  • Oh, sorry, i did search for "stale cache" as is.
    The file is present and as content. I can see references to the disks by id.


    Anyways I executed # zpool set cachefile=/etc/zfs/zpool.cache Z2 and rebooted.
    The pool it's online now!


    I think we also improved it with the id change.
    Thanks.

Jetzt mitmachen!

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