mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
set nosubdir for NFS SR
This commit is contained in:
parent
6de28bb1a4
commit
c9edb7ecfe
@ -5091,6 +5091,14 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
s_logger.debug("Checking " + srr.nameLabel + " or SR " + srr.uuid + " on " + _host);
|
||||
}
|
||||
if (srr.shared) {
|
||||
if (SRType.NFS.equals(srr.type) ){
|
||||
Map<String, String> smConfig = srr.smConfig;
|
||||
if( !smConfig.containsKey("nosubdir")) {
|
||||
smConfig.put("nosubdir", "true");
|
||||
sr.setSmConfig(conn,smConfig);
|
||||
}
|
||||
}
|
||||
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
boolean found = false;
|
||||
for (PBD pbd : pbds) {
|
||||
@ -5910,10 +5918,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
}
|
||||
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
Map<String, String> smConfig = new HashMap<String, String>();
|
||||
smConfig.put("nosubdir", "true");
|
||||
SR sr = SR.create(conn, host, deviceConfig, new Long(0), name, uri.getHost() + uri.getPath(), SRType.NFS.toString(), "user", shared, smConfig);
|
||||
|
||||
SR sr =
|
||||
SR.create(conn, host, deviceConfig, new Long(0), name, uri.getHost() + uri.getPath(), SRType.NFS.toString(), "user", shared,
|
||||
new HashMap<String, String>());
|
||||
if (!checkSR(conn, sr)) {
|
||||
throw new Exception("no attached PBD");
|
||||
}
|
||||
@ -6183,9 +6191,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
deviceConfig.put("server", server);
|
||||
deviceConfig.put("serverpath", serverpath);
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
SR sr =
|
||||
SR.create(conn, host, deviceConfig, new Long(0), pool.getUuid(), Long.toString(pool.getId()), SRType.NFS.toString(), "user", true,
|
||||
new HashMap<String, String>());
|
||||
Map<String, String> smConfig = new HashMap<String, String>();
|
||||
smConfig.put("nosubdir", "true");
|
||||
SR sr = SR.create(conn, host, deviceConfig, new Long(0), pool.getUuid(), Long.toString(pool.getId()), SRType.NFS.toString(), "user", true, smConfig);
|
||||
sr.scan(conn);
|
||||
return sr;
|
||||
} catch (XenAPIException e) {
|
||||
|
||||
@ -560,9 +560,9 @@ public class XenServerStorageProcessor implements StorageProcessor {
|
||||
deviceConfig.put("server", server);
|
||||
deviceConfig.put("serverpath", serverpath);
|
||||
Host host = Host.getByUuid(conn, hypervisorResource.getHost().uuid);
|
||||
SR sr =
|
||||
SR.create(conn, host, deviceConfig, new Long(0), pool.getUuid(), Long.toString(pool.getId()), SRType.NFS.toString(), "user", true,
|
||||
new HashMap<String, String>());
|
||||
Map<String, String> smConfig = new HashMap<String, String>();
|
||||
smConfig.put("nosubdir", "true");
|
||||
SR sr = SR.create(conn, host, deviceConfig, new Long(0), pool.getUuid(), Long.toString(pool.getId()), SRType.NFS.toString(), "user", true, smConfig);
|
||||
sr.scan(conn);
|
||||
return sr;
|
||||
} catch (XenAPIException e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user