Add command at reboot

  • I have a couple of zpools that does not show up at startup.
    It works if I import them after restart, but then I have problems using nfs that is pointing to these zfs-pools...


    So I would like to do a workaround and make sure that the pools are loaded at boot.


    I found that I could add abash script that will be loaded on startup. But I cant create the correct script as I get a warning when I try to add it with "update-rc.d mystartup.sh defaults 100" (that I copied from a guide).
    The error is:

    Code
    insserv: warning: script 'mystartup.sh' missing LSB tags and overrides
    insserv: There is a loop between service openmediavault-beep and mystartup.sh if stopped
    insserv:  loop involving service mystartup.sh at depth 2
    insserv:  loop involving service openmediavault-beep at depth 1
    insserv: Stopping mystartup.sh depends on openmediavault-beep and therefore on system facility `$all' which can not be true!
    insserv: exiting now without changing boot order!
    update-rc.d: error: insserv rejected the script header


    The script is simple (too simple probably)
    #!/bin/bash
    echo “Loading xfs pool”
    zpool import -a -f


    What is the best way to make sure that my zfs pools always are loaded at startup?
    Yes I know they should be loaded as they existed before the restart, but that is not the case.
    Sometimes no pool is loaded, other times just on or two (of three).


    It is not a clean solution to do this kind of workaround, but I can't find the root cause. So in the meanwhile this seems to be a good enough workaround...

Jetzt mitmachen!

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