Commit f56f67e4 by Tim Stewart

Set canmount=noauto before setting mountpoint

I get an "already mounted" error when the sync peer comes online.  I
verified that the -u option to `zfs recv ...' is working properly, so it
seems that `zfs set mountpoint=...' is mounting the dataset
automatically.

Making this change prevents the automatic mount and the sync peer comes
online properly.
parent 45c2e247
......@@ -154,14 +154,14 @@ ZfsClient.prototype.restore = function restore(serverUrl, callback) {
self._pollInterval,
cb);
},
function _setMountPoint(_, cb) {
var cmd = 'zfs set mountpoint=' + self._mountpoint + ' ' +
self._dataset;
function _setNoAutoMount(_, cb) {
var cmd = 'zfs set canmount=noauto ' + self._dataset;
log.info({ cmd: cmd }, 'ZfsClient.restore: exec');
exec(cmd, cb);
},
function _setNoAutoMount(_, cb) {
var cmd = 'zfs set canmount=noauto ' + self._dataset;
function _setMountPoint(_, cb) {
var cmd = 'zfs set mountpoint=' + self._mountpoint + ' ' +
self._dataset;
log.info({ cmd: cmd }, 'ZfsClient.restore: exec');
exec(cmd, cb);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment