Package javaforce.vm
Class Storage
java.lang.Object
javaforce.vm.Storage
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Storage[]static final intstatic final intstatic final intstatic final intdoublestatic final intstatic final intstatic final intstatic final intintstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intdouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanformat(int fmt) Format local partition or iSCSI target.static booleanformat_supported(int fmt) static voidget_all_stats(Storage[] pools, int year, int month, int day, int hour, int sample) 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.Returns gluster brick path.Returns gluster volume path within brick path.getName()getPath()Returns mount path.intgetState()String[]static StringGet mounted file system total size.getUUID()Get libvirt UUID (does NOT match Linux device UUID)booleangluster_volume_create(String[] hosts) booleanstatic String[]list()Returns list of UUID for Storage units registered.static String[]static voidbooleanmount()Mount iSCSI,Gluster,Ceph pools.booleanmounted()booleanregister()static booleansetSystemIQN(String iqn) static voidCloses any threads without stopping Storage volumes.booleanstart()booleanstop()booleanunmount()Unmount iSCSI, Gluster pools.boolean
-
Field Details
-
ArrayType
-
type
public int type -
name
-
uuid
-
host
-
target
-
path
-
user
-
read_latency
public transient double read_latency -
write_latency
public transient double write_latency -
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:
-
TYPE_CEPHFS
public static final int TYPE_CEPHFS- 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
-
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() -
shutdown
Closes any threads without stopping Storage volumes. -
getState
public int getState() -
getUUID
Get libvirt UUID (does NOT match Linux device UUID) -
getSystemIQN
-
setSystemIQN
-
getName
-
getStateString
-
getTypeString
-
getStates
-
getDiskUUID
Returns UUID of a disk device in /dev. -
listLocalParts
-
mount
public boolean mount()Mount iSCSI,Gluster,Ceph pools. start() will already mount other types. -
unmount
public boolean unmount()Unmount iSCSI, Gluster pools. 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. -
getGlusterBrick
Returns gluster brick path. -
getGlusterVolume
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_volume_create
-
isMountedManually
public boolean isMountedManually() -
create_stats_folder
public void create_stats_folder() -
get_all_stats
public static void get_all_stats(Storage[] pools, int year, int month, int day, int hour, int sample) -
main
-