Class Storage

java.lang.Object
javaforce.vm.Storage
All Implemented Interfaces:
Serializable

public class Storage extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • Storage

      public Storage(int type, String name, String uuid)
  • Method Details

    • list

      public static String[] list()
      Returns list of UUID for Storage units registered.
    • register

      public boolean register()
    • unregister

      public boolean unregister()
    • start

      public boolean start()
    • stop

      public boolean stop()
    • getState

      public int getState()
    • getUUID

      public String getUUID()
      Get libvirt UUID (does NOT match Linux device UUID)
    • getSystemIQN

      public static String getSystemIQN()
    • setSystemIQN

      public static boolean setSystemIQN(String iqn)
    • getStateString

      public String getStateString()
    • getTypeString

      public String getTypeString()
    • getStates

      public String[] getStates()
    • getDiskUUID

      public static String getDiskUUID(String dev)
      Returns UUID of a disk device in /dev.
    • listLocalParts

      public static String[] listLocalParts()
    • mount

      public boolean mount()
      Mount iSCSI/Gluster pools. start() will already mount other types.
    • unmount

      public boolean unmount()
      Unmount iSCSI pool. stop() will already unmount other types.
    • mounted

      public boolean mounted()
    • getFormatString

      public static String getFormatString(int fmt)
    • format

      public boolean format(int fmt)
      Format local partition or iSCSI target.
    • getPath

      public String getPath()
      Returns mount path.
    • getBrick

      public String getBrick()
      Returns gluster brick path.
    • getVolume

      public String getVolume()
      Returns gluster volume path within brick path.
    • format_supported

      public static boolean format_supported(int fmt)
    • getDeviceSize

      public Size getDeviceSize()
      Get device size.
    • getTotalSize

      public Size getTotalSize()
      Get mounted file system total size.
    • getFreeSize

      public Size getFreeSize()
      Get mounted file system free size.
    • getFolderSize

      public Size getFolderSize(String folder)
      Gets size of files in folder (not recursive)
    • gluster_probe

      public static boolean gluster_probe(String host)
    • gluster_volume_create

      public boolean gluster_volume_create(String[] hosts)
    • gluster_volume_start

      public boolean gluster_volume_start()
    • main

      public static void main(String[] args)