ganeti

Safe HaskellSafe-Infered

Ganeti.Storage.Drbd.Types

Description

DRBD Data Types

This module holds the definition of the data types describing the status of DRBD.

Synopsis

Documentation

data DRBDStatus Source

Data type contaning all the data about the status of DRBD.

Constructors

DRBDStatus 

Fields

versionInfo :: VersionInfo

Version information about DRBD

deviceInfos :: [DeviceInfo]

Per-minor information

Instances

Eq DRBDStatus 
Show DRBDStatus 
JSON DRBDStatus

The DRBDStatus instance of JSON.

data VersionInfo Source

Data type describing the DRBD version.

Constructors

VersionInfo 

Fields

version :: Maybe String

DRBD driver version

api :: Maybe String

The api version

proto :: Maybe String

The protocol version

srcversion :: Maybe String

The version of the source files

gitHash :: Maybe String

Git hash of the source files

buildBy :: Maybe String

Who built the binary (and, optionally, when)

Instances

Eq VersionInfo 
Show VersionInfo 
JSON VersionInfo

The VersionInfo instance of JSON.

data DeviceInfo Source

Data type describing a device.

Constructors

UnconfiguredDevice Int

An DRBD minor marked as unconfigured

DeviceInfo

A configured DRBD minor

Fields

minorNumber :: Int

The minor index of the device

connectionState :: ConnState

State of the connection

resourceRoles :: LocalRemote Role

Roles of the resources

diskStates :: LocalRemote DiskState

Status of the disks

replicationProtocol :: Char

The replication protocol being used

ioFlags :: String

The input/output flags

perfIndicators :: PerfIndicators

Performance indicators

syncStatus :: Maybe SyncStatus

The status of the syncronization of the disk (only if it is happening)

resync :: Maybe AdditionalInfo

Additional info by DRBD 8.0

actLog :: Maybe AdditionalInfo

Additional info by DRBD 8.0

instName :: Maybe String

The name of the associated instance

Instances

Eq DeviceInfo 
Show DeviceInfo 
JSON DeviceInfo

The DeviceInfo instance of JSON.

data ConnState Source

Data type describing the state of the connection.

Constructors

StandAlone

No network configuration available

Disconnecting

Temporary state during disconnection

Unconnected

Prior to a connection attempt

Timeout

Following a timeout in the communication

BrokenPipe

After the connection to the peer was lost

NetworkFailure

After the connection to the partner was lost

ProtocolError

After the connection to the partner was lost

TearDown

The peer is closing the connection

WFConnection

Waiting for the peer to become visible

WFReportParams

Waiting for first packet from peer

Connected

Connected, data mirroring active

StartingSyncS

Source of a full sync started by admin

StartingSyncT

Target of a full sync started by admin

WFBitMapS

Source of a just starting partial sync

WFBitMapT

Target of a just starting partial sync

WFSyncUUID

Synchronization is about to begin

SyncSource

Source of a running synchronization

SyncTarget

Target of a running synchronization

PausedSyncS

Source of a paused synchronization

PausedSyncT

Target of a paused synchronization

VerifyS

Source of a running verification

VerifyT

Target of a running verification

Unconfigured

The device is not configured

Instances

Eq ConnState 
Show ConnState 
JSON ConnState

The ConnState instance of JSON.

Arbitrary ConnState 

data LocalRemote a Source

Algebraic data type describing something that has a local and a remote value.

Constructors

LocalRemote 

Fields

local :: a

The local value

remote :: a

The remote value

Instances

Eq a => Eq (LocalRemote a) 
Show a => Show (LocalRemote a) 

data Role Source

Data type describing.

Constructors

Primary

The device role is primary

Secondary

The device role is secondary

Unknown

The device role is unknown

Instances

Eq Role 
Show Role 
JSON Role

The Role instance of JSON.

Arbitrary Role 

data DiskState Source

Data type describing disk states.

Constructors

Diskless

No local block device assigned to the DRBD driver

Attaching

Reading meta data

Failed

I/O failure

Negotiating

Attach on an already-connected device

Inconsistent

The data is inconsistent between nodes.

Outdated

Data consistent but outdated

DUnknown

No network connection available

Consistent

Consistent data, but without network connection

UpToDate

Consistent, up-to-date. This is the normal state

Instances

Eq DiskState 
Show DiskState 
JSON DiskState

The DiskState instance of JSON.

Arbitrary DiskState 

data PerfIndicators Source

Data type containing data about performance indicators.

Constructors

PerfIndicators 

Fields

networkSend :: Int

KiB of data sent on the network

networkReceive :: Int

KiB of data received from the network

diskWrite :: Int

KiB of data written on local disk

diskRead :: Int

KiB of data read from local disk

activityLog :: Int

Number of updates of the activity log

bitMap :: Int

Number of updates to the bitmap area of the metadata

localCount :: Int

Number of open requests to the local I/O subsystem

pending :: Int

Num of requests sent to the partner but not yet answered

unacknowledged :: Int

Num of requests received by the partner but still to be answered

applicationPending :: Int

Num of block I/O requests forwarded to DRBD but that have not yet been answered

epochs :: Maybe Int

Number of epoch objects

writeOrder :: Maybe Char

Currently used write ordering method

outOfSync :: Maybe Int

KiB of storage currently out of sync

Instances

Eq PerfIndicators 
Show PerfIndicators 
JSON PerfIndicators

The PerfIndicators instance of JSON.

data SyncStatus Source

Data type containing data about the synchronization status of a device.

Constructors

SyncStatus 

Fields

percentage :: Double

Percentage of syncronized data

partialSyncSize :: Int

Numerator of the fraction of synced data

totalSyncSize :: Int

Denominator of the fraction of synced data

syncUnit :: SizeUnit

Measurement unit of the previous fraction

timeToFinish :: Time

Expected time before finishing the syncronization

speed :: Int

Speed of the syncronization

want :: Maybe Int

Want of the syncronization

speedSizeUnit :: SizeUnit

Size unit of the speed

speedTimeUnit :: TimeUnit

Time unit of the speed

Instances

Eq SyncStatus 
Show SyncStatus 
JSON SyncStatus

The SyncStatus instance of JSON.

data SizeUnit Source

Data type describing a size unit for memory.

Constructors

KiloByte 
MegaByte 

Instances

Eq SizeUnit 
Show SizeUnit 
JSON SizeUnit

The SizeUnit instance of JSON.

Arbitrary SizeUnit 

data Time Source

Data type describing a time (hh:mm:ss).

Constructors

Time 

Fields

hour :: Int
 
min :: Int
 
sec :: Int
 

Instances

Eq Time 
Show Time 
JSON Time

The Time instance of JSON.

data TimeUnit Source

Data type describing a time unit.

Constructors

Second 

Instances

Eq TimeUnit 
Show TimeUnit 
JSON TimeUnit

The TimeUnit instance of JSON.

Arbitrary TimeUnit 

data AdditionalInfo Source

Additional device-specific cache-like information produced by drbd <= 8.0.

Internal debug information exported by old DRBD versions. Undocumented both in DRBD and here.

Constructors

AdditionalInfo 

Fields

partialUsed :: Int
 
totalUsed :: Int
 
hits :: Int
 
misses :: Int
 
starving :: Int
 
dirty :: Int
 
changed :: Int
 

Instances

data DrbdInstMinor Source

Data type representing the pairing of a DRBD minor with an instance.

Constructors

DrbdInstMinor 

Fields

dimNode :: String
 
dimMinor :: Int
 
dimInstName :: String
 
dimDiskIdx :: String
 
dimRole :: String
 
dimPeer :: String
 

Instances

Show DrbdInstMinor 
JSON DrbdInstMinor

The DrbdInstMinor instance of JSON.