<span class="since">Since 0.4.1</span></dd>
<dt><code>dir</code></dt>
<dd>Provides the source for pools backed by directories (pool
- type <code>dir</code>), or optionally to select a subdirectory
+ types <code>dir</code>, <code>netfs</code>, <code>gluster</code>),
+ or optionally to select a subdirectory
within a pool that resembles a filesystem (pool
type <code>gluster</code>). May
only occur once. Contains a single attribute <code>path</code>
- which is the fully qualified path to the backing directory.
+ which is the fully qualified path to the backing directory or
+ for a <code>netfs</code> pool type using <code>format</code>
+ type "cifs", the path to the Samba share without the leading slash.
<span class="since">Since 0.4.1</span></dd>
<dt><code>adapter</code></dt>
<dd>Provides the source for pools backed by SCSI adapters (pool
pool->def->source.format == VIR_STORAGE_POOL_NETFS_AUTO);
bool glusterfs = (pool->def->type == VIR_STORAGE_POOL_NETFS &&
pool->def->source.format == VIR_STORAGE_POOL_NETFS_GLUSTERFS);
+ bool cifsfs = (pool->def->type == VIR_STORAGE_POOL_NETFS &&
+ pool->def->source.format == VIR_STORAGE_POOL_NETFS_CIFS);
virCommandPtr cmd = NULL;
int ret = -1;
int rc;
}
if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
- if (virAsprintf(&src, "%s:%s",
- pool->def->source.hosts[0].name,
- pool->def->source.dir) == -1)
- return -1;
-
+ if (pool->def->source.format == VIR_STORAGE_POOL_NETFS_CIFS) {
+ if (virAsprintf(&src, "//%s/%s",
+ pool->def->source.hosts[0].name,
+ pool->def->source.dir) == -1)
+ return -1;
+ } else {
+ if (virAsprintf(&src, "%s:%s",
+ pool->def->source.hosts[0].name,
+ pool->def->source.dir) == -1)
+ return -1;
+ }
} else {
if (VIR_STRDUP(src, pool->def->source.devices[0].path) < 0)
return -1;
"direct-io-mode=1",
pool->def->target.path,
NULL);
+ else if (cifsfs)
+ cmd = virCommandNewArgList(MOUNT,
+ "-t",
+ virStoragePoolFormatFileSystemNetTypeToString(pool->def->source.format),
+ src,
+ pool->def->target.path,
+ "-o",
+ "guest",
+ NULL);
else
cmd = virCommandNewArgList(MOUNT,
"-t",