예제 #1
0
 public static boolean logicalVolumeExists(String lvName) {
   boolean success = false;
   String returnValue =
       SystemUtil.run(new String[] {StorageProperties.EUCA_ROOT_WRAPPER, "lvdisplay", lvName});
   if (returnValue.length() > 0) {
     success = true;
   }
   return success;
 }
예제 #2
0
 public static String createSnapshotLogicalVolume(String lvName, String snapLvName)
     throws EucalyptusCloudException {
   return SystemUtil.run(
       new String[] {
         StorageProperties.EUCA_ROOT_WRAPPER,
         "lvcreate",
         "-n",
         snapLvName,
         "-s",
         "-l",
         "100%FREE",
         lvName
       });
 }
예제 #3
0
 public static String createLogicalVolume(String volumeId, String vgName, String lvName)
     throws EucalyptusCloudException {
   return SystemUtil.run(
       new String[] {
         StorageProperties.EUCA_ROOT_WRAPPER,
         "lvcreate",
         "--addtag",
         volumeId,
         "-n",
         lvName,
         "-l",
         "100%FREE",
         vgName
       });
 }
예제 #4
0
 /**
  * @param lvName
  * @param snapLvName
  * @param sizeMB - Volume size in MB
  * @return
  * @throws EucalyptusCloudException
  */
 public static String createSnapshotLogicalVolume(String lvName, String snapLvName, long sizeMB)
     throws EucalyptusCloudException {
   // return SystemUtil.run(new String[]{EUCA_ROOT_WRAPPER, "lvcreate", "-n", snapLvName, "-s",
   // "-L", String.valueOf(size) + "G", lvName});
   return SystemUtil.run(
       new String[] {
         EUCA_ROOT_WRAPPER,
         "lvcreate",
         "-n",
         snapLvName,
         "-s",
         "-L",
         String.valueOf(sizeMB) + "M",
         lvName
       });
 }
예제 #5
0
 /**
  * @param volumeId
  * @param vgName
  * @param lvName
  * @param sizeMB - Volume size in MB
  * @return
  * @throws EucalyptusCloudException
  */
 public static String createLogicalVolume(
     String volumeId, String vgName, String lvName, long sizeMB) throws EucalyptusCloudException {
   // return SystemUtil.run(new String[]{EUCA_ROOT_WRAPPER, "lvcreate", "-n", lvName, "-L",
   // String.valueOf(size) + "G", vgName});
   return SystemUtil.run(
       new String[] {
         EUCA_ROOT_WRAPPER,
         "lvcreate",
         "--addtag",
         volumeId,
         "-n",
         lvName,
         "-L",
         String.valueOf(sizeMB) + "M",
         vgName
       });
 }
예제 #6
0
 public static String getPhysicalVolumeVerbose(String pvName) throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "pvdisplay", "-v", pvName});
 }
예제 #7
0
 public static String createVolumeGroup(String pvName, String vgName)
     throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "vgcreate", vgName, pvName});
 }
예제 #8
0
 public static String getVolumeGroup(String volumeGroup) throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "vgdisplay", volumeGroup});
 }
예제 #9
0
 public static String getPhysicalVolume(String partition) throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "pvdisplay", partition});
 }
예제 #10
0
 public static String createPhysicalVolume(String loDevName) throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "pvcreate", loDevName});
 }
예제 #11
0
 public static String getLvmVersion() throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "lvm", "version"});
 }
예제 #12
0
 public static String disableLogicalVolume(String lvName) throws EucalyptusCloudException {
   return SystemUtil.run(
       new String[] {StorageProperties.EUCA_ROOT_WRAPPER, "lvchange", "-an", lvName});
 }
예제 #13
0
 public static String reduceVolumeGroup(String vgName, String pvName)
     throws EucalyptusCloudException {
   return SystemUtil.run(
       new String[] {StorageProperties.EUCA_ROOT_WRAPPER, "vgreduce", vgName, pvName});
 }
예제 #14
0
 public static String removePhysicalVolume(String loDevName) throws EucalyptusCloudException {
   return SystemUtil.run(
       new String[] {StorageProperties.EUCA_ROOT_WRAPPER, "pvremove", loDevName});
 }
예제 #15
0
 public static String scanVolumeGroups() throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {StorageProperties.EUCA_ROOT_WRAPPER, "vgscan"});
 }
예제 #16
0
 public static String enableLogicalVolume(String lvName) throws EucalyptusCloudException {
   return SystemUtil.run(new String[] {EUCA_ROOT_WRAPPER, "lvchange", "-ay", lvName});
 }