Package javaforce.vm
Class Storage
java.lang.Object
javaforce.vm.Storage
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intintstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanformat(int fmt) Format local partition or iSCSI target.static booleanformat_supported(int fmt) getBrick()Returns gluster brick path.Get device size.static StringgetDiskUUID(String dev) Returns UUID of a disk device in /dev.getFolderSize(String folder) Gets size of files in folder (not recursive)static StringgetFormatString(int fmt) Get mounted file system free size.getPath()Returns mount path.intgetState()String[]static StringGet mounted file system total size.getUUID()Get libvirt UUID (does NOT match Linux device UUID)Returns gluster volume path within brick path.static booleangluster_probe(String host) booleangluster_volume_create(String[] hosts) booleanstatic String[]list()Returns list of UUID for Storage units registered.static String[]static voidbooleanmount()Mount iSCSI/Gluster pools.booleanmounted()booleanregister()static booleansetSystemIQN(String iqn) booleanstart()booleanstop()booleanunmount()Unmount iSCSI pool.boolean
-
Field Details
-
type
public int type -
name
-
uuid
-
host
-
target
-
path
-
user
-
TYPE_LOCAL_PART
public static final int TYPE_LOCAL_PART- See Also:
-
TYPE_LOCAL_DISK
public static final int TYPE_LOCAL_DISK- See Also:
-
TYPE_NFS
public static final int TYPE_NFS- See Also:
-
TYPE_ISCSI
public static final int TYPE_ISCSI- See Also:
-
TYPE_GLUSTER
public static final int TYPE_GLUSTER- See Also:
-
STATE_OFF
public static final int STATE_OFF- See Also:
-
STATE_ON
public static final int STATE_ON- See Also:
-
STATE_BUILD
public static final int STATE_BUILD- See Also:
-
STATE_ERROR
public static final int STATE_ERROR- See Also:
-
FORMAT_EXT4
public static final int FORMAT_EXT4- See Also:
-
FORMAT_GFS2
public static final int FORMAT_GFS2- See Also:
-
FORMAT_OCFS2
public static final int FORMAT_OCFS2- See Also:
-
FORMAT_XFS
public static final int FORMAT_XFS- See Also:
-
-
Constructor Details
-
Storage
-
-
Method Details
-
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
Get libvirt UUID (does NOT match Linux device UUID) -
getSystemIQN
-
setSystemIQN
-
getStateString
-
getTypeString
-
getStates
-
getDiskUUID
Returns UUID of a disk device in /dev. -
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
-
format
public boolean format(int fmt) Format local partition or iSCSI target. -
getPath
Returns mount path. -
getBrick
Returns gluster brick path. -
getVolume
Returns gluster volume path within brick path. -
format_supported
public static boolean format_supported(int fmt) -
getDeviceSize
Get device size. -
getTotalSize
Get mounted file system total size. -
getFreeSize
Get mounted file system free size. -
getFolderSize
Gets size of files in folder (not recursive) -
gluster_probe
-
gluster_volume_create
-
gluster_volume_start
public boolean gluster_volume_start() -
main
-