Documentation ¶
Index ¶
- Constants
- func Init(root string, config map[string]string) (ConvoyDriver, error)
- type DMLogger
- type Device
- type Driver
- func (d *Driver) BackupOps() (convoydriver.BackupOperations, error)
- func (d *Driver) CloseSnapshot(id, volumeID string) error
- func (d *Driver) CompareSnapshot(id, compareID, volumeID string) (*metadata.Mappings, error)
- func (d *Driver) CreateBackup(snapshotID, volumeID, destURL, endpointURL string, opts map[string]string) (string, error)
- func (d *Driver) CreateSnapshot(req Request) error
- func (d *Driver) CreateVolume(req Request) error
- func (d *Driver) DeleteBackup(backupURL, endpointURL string) error
- func (d *Driver) DeleteSnapshot(req Request) error
- func (d *Driver) DeleteVolume(req Request) error
- func (d *Driver) GetBackupInfo(backupURL, endpointURL string) (map[string]string, error)
- func (d *Driver) GetSnapshotInfo(req Request) (map[string]string, error)
- func (d *Driver) GetVolumeDevice(id string) (string, error)
- func (d *Driver) GetVolumeInfo(id string) (map[string]string, error)
- func (d *Driver) HasSnapshot(id, volumeID string) bool
- func (d *Driver) Info() (map[string]string, error)
- func (d *Driver) ListBackup(destURL, endpointURL string, opts map[string]string) (map[string]map[string]string, error)
- func (d *Driver) ListSnapshot(opts map[string]string) (map[string]map[string]string, error)
- func (d *Driver) ListVolume(opts map[string]string) (map[string]map[string]string, error)
- func (d *Driver) MountPoint(req Request) (string, error)
- func (d *Driver) MountVolume(req Request) (string, error)
- func (d *Driver) Name() string
- func (d *Driver) OpenSnapshot(id, volumeID string) error
- func (d *Driver) ReadSnapshot(id, volumeID string, offset int64, data []byte) error
- func (d *Driver) SnapshotOps() (SnapshotOperations, error)
- func (d *Driver) UmountVolume(req Request) error
- func (d *Driver) VolumeOps() (VolumeOperations, error)
- type Snapshot
- type Volume
Constants ¶
View Source
const ( DRIVER_NAME = "devicemapper" DRIVER_CONFIG_FILE = "devicemapper.cfg" DEFAULT_THINPOOL_NAME = "convoy-pool" DEFAULT_BLOCK_SIZE = "4096" DM_DIR = "/dev/mapper/" MOUNTS_DIR = "mounts" THIN_PROVISION_TOOLS_BINARY = "convoy-pdata_tools" THIN_PROVISION_TOOLS_MIN_VERSION = "0.5.1" DM_DATA_DEV = "dm.datadev" DM_METADATA_DEV = "dm.metadatadev" DM_THINPOOL_NAME = "dm.thinpoolname" DM_THINPOOL_BLOCK_SIZE = "dm.thinpoolblocksize" DM_DEFAULT_VOLUME_SIZE = "dm.defaultvolumesize" DM_DEFAULT_FS_TYPE = "dm.fs" // as defined in device mapper thin provisioning BLOCK_SIZE_MIN = 128 BLOCK_SIZE_MAX = 2097152 BLOCK_SIZE_MULTIPLIER = 128 DEFAULT_VOLUME_SIZE = "100G" DEFAULT_FS_TYPE = "ext4" SECTOR_SIZE = 512 VOLUME_CFG_PREFIX = "volume_" IMAGE_CFG_PREFIX = "image_" DEVMAPPER_CFG_PREFIX = DRIVER_NAME + "_" CFG_POSTFIX = ".json" DM_LOG_FIELD_VOLUME_DEVID = "dm_volume_devid" DM_LOG_FIELD_SNAPSHOT_DEVID = "dm_snapshot_devid" MOUNT_BINARY = "mount" UMOUNT_BINARY = "umount" DMLogLevel = devicemapper.LogLevelDebug )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct { Root string DataDevice string MetadataDevice string ThinpoolDevice string ThinpoolSize int64 ThinpoolBlockSize int64 DefaultVolumeSize int64 LastDevID int Filesystem string }
func (*Device) ConfigFile ¶ added in v0.2.1
type Driver ¶
type Driver struct { Device // contains filtered or unexported fields }
func (*Driver) BackupOps ¶ added in v0.2.1
func (d *Driver) BackupOps() (convoydriver.BackupOperations, error)
func (*Driver) CloseSnapshot ¶
func (*Driver) CompareSnapshot ¶
func (*Driver) CreateBackup ¶ added in v0.2.1
func (*Driver) CreateSnapshot ¶
func (*Driver) CreateVolume ¶
func (*Driver) DeleteBackup ¶ added in v0.2.1
func (*Driver) DeleteSnapshot ¶
func (*Driver) DeleteVolume ¶
func (*Driver) GetBackupInfo ¶ added in v0.2.1
func (*Driver) GetSnapshotInfo ¶ added in v0.2.1
func (*Driver) GetVolumeInfo ¶ added in v0.2.1
func (*Driver) HasSnapshot ¶
func (*Driver) ListBackup ¶ added in v0.2.1
func (*Driver) ListSnapshot ¶ added in v0.2.1
func (*Driver) ListVolume ¶
func (*Driver) MountPoint ¶ added in v0.2.1
func (*Driver) MountVolume ¶ added in v0.2.1
func (*Driver) OpenSnapshot ¶
func (*Driver) ReadSnapshot ¶
func (*Driver) SnapshotOps ¶ added in v0.2.1
func (*Driver) UmountVolume ¶ added in v0.2.1
type Volume ¶
type Volume struct { Name string DevID int Size int64 Base string MountPoint string CreatedTime string Snapshots map[string]Snapshot Filesystem string // contains filtered or unexported fields }
func (*Volume) ConfigFile ¶ added in v0.2.1
func (*Volume) GenerateDefaultMountPoint ¶ added in v0.4.1
func (*Volume) GetMountOpts ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.