import in /etc/rc.common?

24 views
Skip to first unread message

ylluminate

unread,
Mar 8, 2014, 8:44:49 PM3/8/14
to zfs-...@googlegroups.com
So as I understand it, a pool is not automatically imported on reboot with the current OpenZFS implementation?  If not, would it not be wise to stick something like:
/usr/local/sbin/zpool tank

in /etc/rc.common to make sure your tanks are imported at system init until we have this working as expected?

Dave Cottlehuber

unread,
Mar 10, 2014, 7:20:52 AM3/10/14
to zfs-...@googlegroups.com
Nope, just use this:

/Library/LaunchDaemons/org.open-zfs.zpool-import.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.open-zfs.zpool-import</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/sbin/zpool</string>
        <string>import</string>
        <string>-a</string>
        <string>-f</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/private/var/log/open-zfs.log</string>
    <key>StandardOutPath</key>
    <string>/private/var/log/open-zfs.log</string>
    <key>TimeOut</key>
    <integer>0</integer>
</dict>
</plist>

I probably plundered this from @ilovezfs at some point.

--
Dave Cottlehuber
Sent from my PDP11



Reply all
Reply to author
Forward
0 new messages