use of com.emc.sa.service.linux.UnmountBlockVolumeHelper.VolumeSpec in project coprhd-controller by CoprHD.
the class LinuxSupport method findMultipathEntries.
public void findMultipathEntries(List<VolumeSpec> volumes) {
for (VolumeSpec volume : volumes) {
MultiPathEntry device = execute(new FindMultiPathEntryForVolume(volume.viprVolume));
volume.multipathEntries = Lists.newArrayList(device);
}
}
use of com.emc.sa.service.linux.UnmountBlockVolumeHelper.VolumeSpec in project coprhd-controller by CoprHD.
the class FindMultiPathEntriesForMountPoint method executeTask.
@Override
public Void executeTask() throws Exception {
List<MultiPathEntry> allMultiPathEntries = executeCommand(new ListMultiPathEntriesCommand(), SHORT_TIMEOUT);
for (VolumeSpec volume : volumes) {
volume.multipathEntries = Lists.newArrayList();
String device = volume.mountPoint.getDevice();
if (StringUtils.startsWith(device, "/dev/mapper/")) {
String deviceName = StringUtils.substringAfterLast(device, "/");
for (MultiPathEntry entry : allMultiPathEntries) {
if (StringUtils.equals(deviceName, entry.getName())) {
volume.multipathEntries.add(entry);
break;
}
}
}
if (volume.multipathEntries.size() == 0) {
warn("FindMultiPathEntriesForMountPoint.noMultipathEntries", volume.mountPoint.getPath());
}
}
return null;
}
use of com.emc.sa.service.linux.UnmountBlockVolumeHelper.VolumeSpec in project coprhd-controller by CoprHD.
the class FindPowerPathEntriesForMountPoint method executeTask.
@Override
public Void executeTask() throws Exception {
List<PowerPathDevice> powerPathDevices = executeCommand(new PowerPathInquiry());
for (VolumeSpec volume : volumes) {
volume.powerpathDevices = Lists.newArrayList();
String device = volume.mountPoint.getDevice();
for (PowerPathDevice powerpathDevice : powerPathDevices) {
logDebug("FindPowerPathEntriesForMountPoint.checking", powerpathDevice.getDeviceName(), powerpathDevice.getDevice(), device);
if (StringUtils.equals(device, powerpathDevice.getDevice())) {
volume.powerpathDevices.add(powerpathDevice);
break;
}
}
if (volume.powerpathDevices.size() == 0) {
logWarn("FindPowerPathEntriesForMountPoint.noDevices", volume.mountPoint.getPath());
}
}
return null;
}
use of com.emc.sa.service.linux.UnmountBlockVolumeHelper.VolumeSpec in project coprhd-controller by CoprHD.
the class LinuxSupport method findPowerPathDevices.
public void findPowerPathDevices(List<VolumeSpec> volumes) {
for (VolumeSpec volume : volumes) {
PowerPathDevice device = execute(new FindPowerPathEntryForVolume(volume.viprVolume));
volume.powerpathDevices = Lists.newArrayList(device);
}
}
use of com.emc.sa.service.linux.UnmountBlockVolumeHelper.VolumeSpec in project coprhd-controller by CoprHD.
the class FindMountPointsForVolumes method executeTask.
@Override
public Void executeTask() throws Exception {
ListMountPointsCommand command = new ListMountPointsCommand();
Map<String, MountPoint> results = executeCommand(command, SHORT_TIMEOUT);
for (VolumeSpec volume : volumes) {
volume.mountPoint = LinuxUtils.getMountPoint(hostId, results, volume.viprVolume);
}
return null;
}
Aggregations