Documentation
¶
Overview ¶
Package admin is a convenience layer to support the administration of CephFS volumes, subvolumes, etc.
Unlike the cephfs package this API does not map to APIs provided by ceph libraries themselves. This API is not yet stable and is subject to change.
This package only supports ceph "nautilus" and "octopus" at this time.
Index ¶
- Constants
- Variables
- type ByteCount
- type CloneFailure
- type CloneOptions
- type CloneProgressReport
- type CloneSource
- type CloneState
- type CloneStatus
- type DaemonID
- type DaemonStatusFileSystemInfo
- type DaemonStatusInfo
- type DaemonStatusPeer
- type DaemonStatusPeerInfo
- type DaemonStatusPeerStats
- type DaemonStatusResults
- type FSAdmin
- func (fsa *FSAdmin) CancelClone(volume, group, clone string) error
- func (fsa *FSAdmin) CloneStatus(volume, group, clone string) (*CloneStatus, error)
- func (fsa *FSAdmin) CloneSubVolumeSnapshot(volume, group, subvolume, snapshot, name string, o *CloneOptions) error
- func (fsa *FSAdmin) CreateSubVolume(volume, group, name string, o *SubVolumeOptions) error
- func (fsa *FSAdmin) CreateSubVolumeGroup(volume, name string, o *SubVolumeGroupOptions) error
- func (fsa *FSAdmin) CreateSubVolumeSnapshot(volume, group, source, name string) error
- func (fsa *FSAdmin) DisableMirroringModule() error
- func (fsa *FSAdmin) EnableMirroringModule(force bool) error
- func (fsa *FSAdmin) EnumerateVolumes() ([]VolumeIdent, error)
- func (fsa *FSAdmin) FSQuiesce(volume, group string, subvolumes []string, setId string, o *FSQuiesceOptions) (*FSQuiesceInfo, error)
- func (fsa *FSAdmin) FetchVolumeInfo(volume string) (*VolInfo, error)
- func (fsa *FSAdmin) ForceRemoveMetadata(volume, group, subvolume, key string) error
- func (fsa *FSAdmin) ForceRemoveSnapshotMetadata(volume, group, subvolume, snapname, key string) error
- func (fsa *FSAdmin) ForceRemoveSubVolume(volume, group, name string) error
- func (fsa *FSAdmin) ForceRemoveSubVolumeGroup(volume, name string) error
- func (fsa *FSAdmin) ForceRemoveSubVolumeSnapshot(volume, group, subvolume, name string) error
- func (fsa *FSAdmin) GetMetadata(volume, group, subvolume, key string) (string, error)
- func (fsa *FSAdmin) GetSnapshotMetadata(volume, group, subvolume, snapname, key string) (string, error)
- func (fsa *FSAdmin) ListFileSystems() ([]FSPoolInfo, error)
- func (fsa *FSAdmin) ListMetadata(volume, group, subvolume string) (map[string]string, error)
- func (fsa *FSAdmin) ListSnapshotMetadata(volume, group, subvolume, snapname string) (map[string]string, error)
- func (fsa *FSAdmin) ListSubVolumeGroups(volume string) ([]string, error)
- func (fsa *FSAdmin) ListSubVolumeSnapshots(volume, group, name string) ([]string, error)
- func (fsa *FSAdmin) ListSubVolumes(volume, group string) ([]string, error)
- func (fsa *FSAdmin) ListVolumes() ([]string, error)
- func (fsa *FSAdmin) PinSubVolume(volume, subvolume, pintype, pinsetting string) (string, error)
- func (fsa *FSAdmin) PinSubVolumeGroup(volume, group, pintype, pinsetting string) (string, error)
- func (fsa *FSAdmin) ProtectSubVolumeSnapshot(volume, group, subvolume, name string) error
- func (fsa *FSAdmin) RemoveMetadata(volume, group, subvolume, key string) error
- func (fsa *FSAdmin) RemoveSnapshotMetadata(volume, group, subvolume, snapname, key string) error
- func (fsa *FSAdmin) RemoveSubVolume(volume, group, name string) error
- func (fsa *FSAdmin) RemoveSubVolumeGroup(volume, name string) error
- func (fsa *FSAdmin) RemoveSubVolumeSnapshot(volume, group, subvolume, name string) error
- func (fsa *FSAdmin) RemoveSubVolumeWithFlags(volume, group, name string, o SubVolRmFlags) error
- func (fsa *FSAdmin) ResizeSubVolume(volume, group, name string, newSize QuotaSize, noShrink bool) (*SubVolumeResizeResult, error)
- func (fsa *FSAdmin) SetMetadata(volume, group, subvolume, key, value string) error
- func (fsa *FSAdmin) SetSnapshotMetadata(volume, group, subvolume, snapname, key, value string) error
- func (fsa *FSAdmin) SnapshotMirror() *SnapshotMirrorAdmin
- func (fsa *FSAdmin) SubVolumeGroupPath(volume, name string) (string, error)
- func (fsa *FSAdmin) SubVolumeInfo(volume, group, name string) (*SubVolumeInfo, error)
- func (fsa *FSAdmin) SubVolumePath(volume, group, name string) (string, error)
- func (fsa *FSAdmin) SubVolumeSnapshotInfo(volume, group, subvolume, name string) (*SubVolumeSnapshotInfo, error)
- func (fsa *FSAdmin) UnprotectSubVolumeSnapshot(volume, group, subvolume, name string) error
- func (fsa *FSAdmin) VolumeStatus(name string) (*VolumeStatus, error)
- type FSPoolInfo
- type FSQuiesceInfo
- type FSQuiesceOptions
- type Feature
- type FileSystemID
- type NotImplementedError
- type NotProtectedError
- type PeerInfo
- type PeerListResults
- type PeerUUID
- type PoolInfo
- type PoolType
- type QuiesceInfo
- type QuiesceInfoMember
- type QuiesceState
- type QuotaSize
- type RadosCommander
- type SnapshotMirrorAdmin
- func (sma *SnapshotMirrorAdmin) Add(fsname, path string) error
- func (sma *SnapshotMirrorAdmin) CreatePeerBootstrapToken(fsname, client, site string) (string, error)
- func (sma *SnapshotMirrorAdmin) DaemonStatus(fsname string) (DaemonStatusResults, error)
- func (sma *SnapshotMirrorAdmin) Disable(fsname string) error
- func (sma *SnapshotMirrorAdmin) Enable(fsname string) error
- func (sma *SnapshotMirrorAdmin) ImportPeerBoostrapToken(fsname, token string) error
- func (sma *SnapshotMirrorAdmin) PeerList(fsname string) (PeerListResults, error)
- func (sma *SnapshotMirrorAdmin) Remove(fsname, path string) error
- type SubVolRmFlags
- type SubVolumeGroupOptions
- type SubVolumeInfo
- type SubVolumeOptions
- type SubVolumeResizeResult
- type SubVolumeSnapshotInfo
- type SubVolumeState
- type TimeStamp
- type VolInfo
- type VolumeIdent
- type VolumePool
- type VolumeStatus
Constants ¶
const ( // ClonePending is the state of a pending clone. ClonePending = CloneState("pending") // CloneInProgress is the state of a clone in progress. CloneInProgress = CloneState("in-progress") // CloneComplete is the state of a complete clone. CloneComplete = CloneState("complete") // CloneFailed is the state of a failed clone. CloneFailed = CloneState("failed") )
const ( // SnapshotCloneFeature indicates a subvolume supports cloning. SnapshotCloneFeature = Feature("snapshot-clone") // SnapshotAutoprotectFeature indicates a subvolume does not require // manually protecting a subvolume before cloning. SnapshotAutoprotectFeature = Feature("snapshot-autoprotect") // SnapshotRetentionFeature indicates a subvolume supports retaining // snapshots on subvolume removal. SnapshotRetentionFeature = Feature("snapshot-retention") )
const ( // StateUnset indicates a subvolume without any state. StateUnset = SubVolumeState("") // StateInit indicates that the subvolume is in initializing state. StateInit = SubVolumeState("init") // StatePending indicates that the subvolume is in pending state. StatePending = SubVolumeState("pending") // StateInProgress indicates that the subvolume is in in-progress state. StateInProgress = SubVolumeState("in-progress") // StateFailed indicates that the subvolume is in failed state. StateFailed = SubVolumeState("failed") // StateComplete indicates that the subvolume is in complete state. StateComplete = SubVolumeState("complete") // StateCanceled indicates that the subvolume is in canceled state. StateCanceled = SubVolumeState("canceled") // StateSnapRetained indicates that the subvolume is in // snapshot-retained state. StateSnapRetained = SubVolumeState("snapshot-retained") )
const Infinite = specialSize("infinite")
Infinite is a special QuotaSize value that can be used to clear size limits on a subvolume.
const NoGroup = ""
NoGroup should be used when an optional subvolume group name is not specified.
Variables ¶
var ( // ErrStatusNotEmpty is an alias for commands.ErrStatusNotEmpty ErrStatusNotEmpty = commands.ErrStatusNotEmpty // ErrBodyNotEmpty is an alias for commands.ErrBodyNotEmpty ErrBodyNotEmpty = commands.ErrBodyNotEmpty )
Functions ¶
This section is empty.
Types ¶
type CloneFailure ¶
CloneFailure reports details of a failure after a subvolume clone failed.
type CloneOptions ¶
CloneOptions are used to specify optional values to be used when creating a new subvolume clone.
type CloneProgressReport ¶
type CloneProgressReport struct { PercentageCloned string `json:"percentage cloned"` AmountCloned string `json:"amount cloned"` FilesCloned string `json:"files cloned"` }
CloneProgressReport contains the progress report of a subvolume clone.
type CloneSource ¶
type CloneSource struct { Volume string `json:"volume"` Group string `json:"group"` SubVolume string `json:"subvolume"` Snapshot string `json:"snapshot"` }
CloneSource contains values indicating the source of a clone.
type CloneState ¶
type CloneState string
CloneState is used to define constant values used to determine the state of a clone.
type CloneStatus ¶
type CloneStatus struct { State CloneState `json:"state"` Source CloneSource `json:"source"` ProgressReport CloneProgressReport `json:"progress_report"` // contains filtered or unexported fields }
CloneStatus reports on the status of a subvolume clone.
func (*CloneStatus) GetFailure ¶
func (cs *CloneStatus) GetFailure() *CloneFailure
GetFailure returns details about the CloneStatus when in CloneFailed state.
Similar To:
Reading the .failure object from the JSON returned by "ceph fs subvolume snapshot clone"
type DaemonStatusFileSystemInfo ¶
type DaemonStatusFileSystemInfo struct { FileSystemID FileSystemID `json:"filesystem_id"` Name string `json:"name"` DirectoryCount int64 `json:"directory_count"` Peers []DaemonStatusPeerInfo `json:"peers"` }
DaemonStatusFileSystemInfo represents information about a mirrored file system.
type DaemonStatusInfo ¶
type DaemonStatusInfo struct { DaemonID DaemonID `json:"daemon_id"` FileSystems []DaemonStatusFileSystemInfo `json:"filesystems"` }
DaemonStatusInfo maps file system IDs to information about that file system.
type DaemonStatusPeer ¶
type DaemonStatusPeer struct { ClientName string `json:"client_name"` ClusterName string `json:"cluster_name"` FSName string `json:"fs_name"` }
DaemonStatusPeer contains fields detailing a remote peer.
type DaemonStatusPeerInfo ¶
type DaemonStatusPeerInfo struct { UUID PeerUUID `json:"uuid"` Remote DaemonStatusPeer `json:"remote"` Stats DaemonStatusPeerStats `json:"stats"` }
DaemonStatusPeerInfo contains fields representing information about a remote peer.
type DaemonStatusPeerStats ¶
type DaemonStatusPeerStats struct { FailureCount uint64 `json:"failure_count"` RecoveryCount uint64 `json:"recovery_count"` }
DaemonStatusPeerStats contains fields detailing the a remote peer's stats.
type DaemonStatusResults ¶
type DaemonStatusResults []DaemonStatusInfo
DaemonStatusResults maps mirroring daemon IDs to information about that mirroring daemon.
type FSAdmin ¶
type FSAdmin struct {
// contains filtered or unexported fields
}
FSAdmin is used to administrate CephFS within a ceph cluster.
func NewFromConn ¶
func NewFromConn(conn RadosCommander) *FSAdmin
NewFromConn creates an FSAdmin management object from a preexisting rados connection. The existing connection can be rados.Conn or any type implementing the RadosCommander interface. This may be useful if the calling layer needs to inject additional logging, error handling, fault injection, etc.
func (*FSAdmin) CancelClone ¶
CancelClone stops the background processes that populate a clone. CancelClone does not delete the clone.
Similar To:
ceph fs clone cancel <volume> --group_name=<group> <clone>
func (*FSAdmin) CloneStatus ¶
func (fsa *FSAdmin) CloneStatus(volume, group, clone string) (*CloneStatus, error)
CloneStatus returns data reporting the status of a subvolume clone.
Similar To:
ceph fs clone status <volume> --group_name=<group> <clone>
func (*FSAdmin) CloneSubVolumeSnapshot ¶
func (fsa *FSAdmin) CloneSubVolumeSnapshot(volume, group, subvolume, snapshot, name string, o *CloneOptions) error
CloneSubVolumeSnapshot clones the specified snapshot from the subvolume. The group, subvolume, and snapshot parameters specify the source for the clone, and only the source. Additional properties of the clone, such as the subvolume group that the clone will be created in and the pool layout may be specified using the clone options parameter.
Similar To:
ceph fs subvolume snapshot clone <volume> --group_name=<group> <subvolume> <snapshot> <name> [...]
func (*FSAdmin) CreateSubVolume ¶
func (fsa *FSAdmin) CreateSubVolume(volume, group, name string, o *SubVolumeOptions) error
CreateSubVolume sends a request to create a CephFS subvolume in a volume, belonging to an optional subvolume group.
Similar To:
ceph fs subvolume create <volume> --group-name=<group> <name> ...
func (*FSAdmin) CreateSubVolumeGroup ¶
func (fsa *FSAdmin) CreateSubVolumeGroup(volume, name string, o *SubVolumeGroupOptions) error
CreateSubVolumeGroup sends a request to create a subvolume group in a volume.
Similar To:
ceph fs subvolumegroup create <volume> <group_name> ...
func (*FSAdmin) CreateSubVolumeSnapshot ¶
CreateSubVolumeSnapshot creates a new snapshot from the source subvolume.
Similar To:
ceph fs subvolume snapshot create <volume> --group-name=<group> <source> <name>
func (*FSAdmin) DisableMirroringModule ¶
DisableMirroringModule will disable the mirroring module for cephfs.
Similar To:
ceph mgr module disable mirroring
func (*FSAdmin) EnableMirroringModule ¶
EnableMirroringModule will enable the mirroring module for cephfs.
Similar To:
ceph mgr module enable mirroring [--force]
func (*FSAdmin) EnumerateVolumes ¶
func (fsa *FSAdmin) EnumerateVolumes() ([]VolumeIdent, error)
EnumerateVolumes returns a list of volume-name volume-id pairs.
func (*FSAdmin) FSQuiesce ¶
func (fsa *FSAdmin) FSQuiesce(volume, group string, subvolumes []string, setId string, o *FSQuiesceOptions) (*FSQuiesceInfo, error)
FSQuiesce will quiesce the specified subvolumes in a volume. Quiescing a fs will prevent new writes to the subvolumes. Similar To:
ceph fs quiesce <volume>
func (*FSAdmin) FetchVolumeInfo ¶
FetchVolumeInfo fetches the information of a CephFS volume.
Similar To:
ceph fs volume info <vol_name>
func (*FSAdmin) ForceRemoveMetadata ¶
ForceRemoveMetadata attempt to forcefully remove custom metadata set on the subvolume in a volume belonging to an optional subvolume group using the metadata key.
Similar To:
ceph fs subvolume metadata rm <vol_name> <sub_name> <key_name> [--group_name <subvol_group_name>] --force
func (*FSAdmin) ForceRemoveSnapshotMetadata ¶
func (fsa *FSAdmin) ForceRemoveSnapshotMetadata(volume, group, subvolume, snapname, key string) error
ForceRemoveSnapshotMetadata attempt to forcefully remove custom metadata set on the subvolume snapshot in a volume belonging to an optional subvolume group using the metadata key.
Similar To:
ceph fs subvolume snapshot metadata rm <vol_name> <sub_name> <snap_name> <key_name> [--group_name <subvol_group_name>] --force
func (*FSAdmin) ForceRemoveSubVolume ¶
ForceRemoveSubVolume will delete a CephFS subvolume in a volume and optional subvolume group.
Similar To:
ceph fs subvolume rm <volume> --group-name=<group> <name> --force
func (*FSAdmin) ForceRemoveSubVolumeGroup ¶
ForceRemoveSubVolumeGroup will delete a subvolume group in a volume. Similar To:
ceph fs subvolumegroup rm <volume> <group_name> --force
func (*FSAdmin) ForceRemoveSubVolumeSnapshot ¶
ForceRemoveSubVolumeSnapshot removes the specified snapshot from the subvolume.
Similar To:
ceph fs subvolume snapshot rm <volume> --group-name=<group> <subvolume> <name> --force
func (*FSAdmin) GetMetadata ¶
GetMetadata gets custom metadata on the subvolume in a volume belonging to an optional subvolume group based on provided key name.
Similar To:
ceph fs subvolume metadata get <vol_name> <sub_name> <key_name> [--group_name <subvol_group_name>]
func (*FSAdmin) GetSnapshotMetadata ¶
func (fsa *FSAdmin) GetSnapshotMetadata(volume, group, subvolume, snapname, key string) (string, error)
GetSnapshotMetadata gets custom metadata on the subvolume snapshot in a volume belonging to an optional subvolume group based on provided key name.
Similar To:
ceph fs subvolume snapshot metadata get <vol_name> <sub_name> <snap_name> <key_name> [--group_name <subvol_group_name>]
func (*FSAdmin) ListFileSystems ¶
func (fsa *FSAdmin) ListFileSystems() ([]FSPoolInfo, error)
ListFileSystems lists file systems along with the pools occupied by those file systems.
Similar To:
ceph fs ls
func (*FSAdmin) ListMetadata ¶
ListMetadata lists custom metadata (key-value pairs) set on the subvolume in a volume belonging to an optional subvolume group.
Similar To:
ceph fs subvolume metadata ls <vol_name> <sub_name> [--group_name <subvol_group_name>]
func (*FSAdmin) ListSnapshotMetadata ¶
func (fsa *FSAdmin) ListSnapshotMetadata(volume, group, subvolume, snapname string) (map[string]string, error)
ListSnapshotMetadata lists custom metadata (key-value pairs) set on the subvolume snapshot in a volume belonging to an optional subvolume group.
Similar To:
ceph fs subvolume snapshot metadata ls <vol_name> <sub_name> <snap_name> [--group_name <subvol_group_name>]
func (*FSAdmin) ListSubVolumeGroups ¶
ListSubVolumeGroups returns a list of subvolume groups belonging to the specified volume.
Similar To:
ceph fs subvolumegroup ls cephfs <volume>
func (*FSAdmin) ListSubVolumeSnapshots ¶
ListSubVolumeSnapshots returns a listing of snapshots for a given subvolume.
Similar To:
ceph fs subvolume snapshot ls <volume> --group-name=<group> <name>
func (*FSAdmin) ListSubVolumes ¶
ListSubVolumes returns a list of subvolumes belonging to the volume and optional subvolume group.
Similar To:
ceph fs subvolume ls <volume> --group-name=<group>
func (*FSAdmin) ListVolumes ¶
ListVolumes return a list of volumes in this Ceph cluster.
Similar To:
ceph fs volume ls
func (*FSAdmin) PinSubVolume ¶
PinSubVolume pins subvolume to ranks according to policies. A valid pin setting value depends on the type of pin as described in the docs from https://docs.ceph.com/en/latest/cephfs/multimds/#cephfs-pinning and https://docs.ceph.com/en/latest/cephfs/multimds/#setting-subtree-partitioning-policies
Similar To:
ceph fs subvolume pin <vol_name> <sub_name> <pin_type> <pin_setting>
func (*FSAdmin) PinSubVolumeGroup ¶
PinSubVolumeGroup pins subvolume to ranks according to policies. A valid pin setting value depends on the type of pin as described in the docs from https://docs.ceph.com/en/latest/cephfs/multimds/#cephfs-pinning and https://docs.ceph.com/en/latest/cephfs/multimds/#setting-subtree-partitioning-policies
Similar To:
ceph fs subvolumegroup pin <vol_name> <group_name> <pin_type> <pin_setting>
func (*FSAdmin) ProtectSubVolumeSnapshot ¶
ProtectSubVolumeSnapshot protects the specified snapshot.
Similar To:
ceph fs subvolume snapshot protect <volume> --group-name=<group> <subvolume> <name>
func (*FSAdmin) RemoveMetadata ¶
RemoveMetadata removes custom metadata set on the subvolume in a volume belonging to an optional subvolume group using the metadata key.
Similar To:
ceph fs subvolume metadata rm <vol_name> <sub_name> <key_name> [--group_name <subvol_group_name>]
func (*FSAdmin) RemoveSnapshotMetadata ¶
RemoveSnapshotMetadata removes custom metadata set on the subvolume snapshot in a volume belonging to an optional subvolume group using the metadata key.
Similar To:
ceph fs subvolume snapshot metadata rm <vol_name> <sub_name> <snap_name> <key_name> [--group_name <subvol_group_name>]
func (*FSAdmin) RemoveSubVolume ¶
RemoveSubVolume will delete a CephFS subvolume in a volume and optional subvolume group.
Similar To:
ceph fs subvolume rm <volume> --group-name=<group> <name>
func (*FSAdmin) RemoveSubVolumeGroup ¶
RemoveSubVolumeGroup will delete a subvolume group in a volume. Similar To:
ceph fs subvolumegroup rm <volume> <group_name>
func (*FSAdmin) RemoveSubVolumeSnapshot ¶
RemoveSubVolumeSnapshot removes the specified snapshot from the subvolume.
Similar To:
ceph fs subvolume snapshot rm <volume> --group-name=<group> <subvolume> <name>
func (*FSAdmin) RemoveSubVolumeWithFlags ¶
func (fsa *FSAdmin) RemoveSubVolumeWithFlags(volume, group, name string, o SubVolRmFlags) error
RemoveSubVolumeWithFlags will delete a CephFS subvolume in a volume and optional subvolume group. This function accepts a SubVolRmFlags type that can be used to specify flags that modify the operations behavior. Equivalent to RemoveSubVolume with no flags set. Equivalent to ForceRemoveSubVolume if only the "Force" flag is set.
Similar To:
ceph fs subvolume rm <volume> --group-name=<group> <name> [...flags...]
func (*FSAdmin) ResizeSubVolume ¶
func (fsa *FSAdmin) ResizeSubVolume( volume, group, name string, newSize QuotaSize, noShrink bool) (*SubVolumeResizeResult, error)
ResizeSubVolume will resize a CephFS subvolume. The newSize value may be a ByteCount or the special Infinite constant. Setting noShrink to true will prevent reducing the size of the volume below the current used size.
Similar To:
ceph fs subvolume resize <volume> --group-name=<group> <name> ...
func (*FSAdmin) SetMetadata ¶
SetMetadata sets custom metadata on the subvolume in a volume belonging to an optional subvolume group as a key-value pair.
Similar To:
ceph fs subvolume metadata set <vol_name> <sub_name> <key_name> <value> [--group_name <subvol_group_name>]
func (*FSAdmin) SetSnapshotMetadata ¶
func (fsa *FSAdmin) SetSnapshotMetadata(volume, group, subvolume, snapname, key, value string) error
SetSnapshotMetadata sets custom metadata on the subvolume snapshot in a volume belonging to an optional subvolume group as a key-value pair.
Similar To:
ceph fs subvolume snapshot metadata set <vol_name> <sub_name> <snap_name> <key_name> <value> [--group_name <subvol_group_name>]
func (*FSAdmin) SnapshotMirror ¶
func (fsa *FSAdmin) SnapshotMirror() *SnapshotMirrorAdmin
SnapshotMirror returns a new SnapshotMirrorAdmin to be used for the administration of snapshot mirroring features.
func (*FSAdmin) SubVolumeGroupPath ¶
SubVolumeGroupPath returns the path to the subvolume from the root of the file system.
Similar To:
ceph fs subvolumegroup getpath <volume> <group_name>
func (*FSAdmin) SubVolumeInfo ¶
func (fsa *FSAdmin) SubVolumeInfo(volume, group, name string) (*SubVolumeInfo, error)
SubVolumeInfo returns information about the specified subvolume.
Similar To:
ceph fs subvolume info <volume> --group-name=<group> <name>
func (*FSAdmin) SubVolumePath ¶
SubVolumePath returns the path to the subvolume from the root of the file system.
Similar To:
ceph fs subvolume getpath <volume> --group-name=<group> <name>
func (*FSAdmin) SubVolumeSnapshotInfo ¶
func (fsa *FSAdmin) SubVolumeSnapshotInfo(volume, group, subvolume, name string) (*SubVolumeSnapshotInfo, error)
SubVolumeSnapshotInfo returns information about the specified subvolume snapshot.
Similar To:
ceph fs subvolume snapshot info <volume> --group-name=<group> <subvolume> <name>
func (*FSAdmin) UnprotectSubVolumeSnapshot ¶
UnprotectSubVolumeSnapshot removes protection from the specified snapshot.
Similar To:
ceph fs subvolume snapshot unprotect <volume> --group-name=<group> <subvolume> <name>
func (*FSAdmin) VolumeStatus ¶
func (fsa *FSAdmin) VolumeStatus(name string) (*VolumeStatus, error)
VolumeStatus returns a VolumeStatus object for the given volume name.
Similar To:
ceph fs status cephfs <name>
type FSPoolInfo ¶
type FSPoolInfo struct { Name string `json:"name"` MetadataPool string `json:"metadata_pool"` MetadataPoolID int `json:"metadata_pool_id"` DataPools []string `json:"data_pools"` DataPoolIDs []int `json:"data_pool_ids"` }
FSPoolInfo contains the name of a file system as well as the metadata and data pools. Pool information is available by ID or by name.
type FSQuiesceInfo ¶
type FSQuiesceInfo struct { Epoch int `json:"epoch"` SetVersion int `json:"set_version"` Sets map[string]QuiesceInfo `json:"sets"` }
FSQuiesceInfo reports various informational values about quiesced volumes.
type FSQuiesceOptions ¶
type FSQuiesceOptions struct { Timeout float64 Expiration float64 AwaitFor float64 Await bool IfVersion int Include bool Exclude bool Reset bool Release bool Query bool All bool Cancel bool }
FSQuiesceOptions are used to specify optional, non-identifying, values to be used when quiescing a cephfs volume.
type Feature ¶
type Feature string
Feature is used to define constant values for optional features on subvolumes.
type NotImplementedError ¶
type NotImplementedError = commands.NotImplementedError
NotImplementedError is an alias for commands.NotImplementedError.
type NotProtectedError ¶
type NotProtectedError struct {
// contains filtered or unexported fields
}
NotProtectedError error values will be returned by CloneSubVolumeSnapshot in the case that the source snapshot needs to be protected but is not. The requirement for a snapshot to be protected prior to cloning varies by Ceph version.
type PeerInfo ¶
type PeerInfo struct { ClientName string `json:"client_name"` SiteName string `json:"site_name"` FSName string `json:"fs_name"` MonHost string `json:"mon_host"` }
PeerInfo includes information about a cephfs mirroring peer.
type PeerListResults ¶
PeerListResults maps a peer's UUID to information about that peer.
type PoolInfo ¶
type PoolInfo struct { Available int `json:"avail"` Name string `json:"name"` Used int `json:"used"` }
PoolInfo reports various properties of a pool.
type PoolType ¶
type PoolType struct { DataPool []PoolInfo `json:"data"` MetadataPool []PoolInfo `json:"metadata"` }
PoolType indicates the type of pool related to a volume.
type QuiesceInfo ¶
type QuiesceInfo struct { Version int `json:"version"` AgeRef float64 `json:"age_ref"` State QuiesceState `json:"state"` Timeout float64 `json:"timeout"` Expiration float64 `json:"expiration"` Members map[string]QuiesceInfoMember `json:"members"` }
QuiesceInfo reports various informational values about a quiesced volume. This is returned as sets object array in the json.
type QuiesceInfoMember ¶
type QuiesceInfoMember struct { Excluded bool `json:"excluded"` State QuiesceState `json:"state"` }
QuiesceInfoMember is used to report the state of a quiesced fs volume. This is part of sets members object array in the json.
type QuiesceState ¶
QuiesceState is used to report the state of a quiesced fs volume.
type QuotaSize ¶
type QuotaSize interface {
// contains filtered or unexported methods
}
QuotaSize interface values can be used to change the size of a volume.
type RadosCommander ¶
type RadosCommander = ccom.RadosCommander
RadosCommander provides an interface to execute JSON-formatted commands that allow the cephfs administrative functions to interact with the Ceph cluster.
type SnapshotMirrorAdmin ¶
type SnapshotMirrorAdmin struct {
// contains filtered or unexported fields
}
SnapshotMirrorAdmin helps administer the snapshot mirroring features of cephfs. Snapshot mirroring is only available in ceph pacific and later.
func (*SnapshotMirrorAdmin) Add ¶
func (sma *SnapshotMirrorAdmin) Add(fsname, path string) error
Add a path in the file system to be mirrored.
Similar To:
ceph fs snapshot mirror add <fs_name> <path>
func (*SnapshotMirrorAdmin) CreatePeerBootstrapToken ¶
func (sma *SnapshotMirrorAdmin) CreatePeerBootstrapToken( fsname, client, site string) (string, error)
CreatePeerBootstrapToken returns a token that can be used to create a peering association between this site an another site.
Similar To:
ceph fs snapshot mirror peer_bootstrap create <fs_name> <client_entity> <site-name>
func (*SnapshotMirrorAdmin) DaemonStatus ¶
func (sma *SnapshotMirrorAdmin) DaemonStatus(fsname string) ( DaemonStatusResults, error)
DaemonStatus returns information on the status of cephfs mirroring daemons associated with the given file system.
Similar To:
ceph fs snapshot mirror daemon status <fs_name>
func (*SnapshotMirrorAdmin) Disable ¶
func (sma *SnapshotMirrorAdmin) Disable(fsname string) error
Disable snapshot mirroring for the given file system.
Similar To:
ceph fs snapshot mirror disable <fs_name>
func (*SnapshotMirrorAdmin) Enable ¶
func (sma *SnapshotMirrorAdmin) Enable(fsname string) error
Enable snapshot mirroring for the given file system.
Similar To:
ceph fs snapshot mirror enable <fs_name>
func (*SnapshotMirrorAdmin) ImportPeerBoostrapToken ¶
func (sma *SnapshotMirrorAdmin) ImportPeerBoostrapToken(fsname, token string) error
ImportPeerBoostrapToken creates an association between another site, one that has provided a token, with the current site.
Similar To:
ceph fs snapshot mirror peer_bootstrap import <fs_name> <token>
func (*SnapshotMirrorAdmin) PeerList ¶
func (sma *SnapshotMirrorAdmin) PeerList(fsname string) ( PeerListResults, error)
PeerList returns information about peers associated with the given file system.
Similar To:
ceph fs snapshot mirror peer_list <fs_name>
func (*SnapshotMirrorAdmin) Remove ¶
func (sma *SnapshotMirrorAdmin) Remove(fsname, path string) error
Remove a path in the file system from mirroring.
Similar To:
ceph fs snapshot mirror remove <fs_name> <path>
type SubVolRmFlags ¶
SubVolRmFlags may be used to specify behavior modifying flags when removing sub volumes.
type SubVolumeGroupOptions ¶
SubVolumeGroupOptions are used to specify optional, non-identifying, values to be used when creating a new subvolume group.
type SubVolumeInfo ¶
type SubVolumeInfo struct { Type string `json:"type"` Path string `json:"path"` State SubVolumeState `json:"state"` Uid int `json:"uid"` Gid int `json:"gid"` Mode int `json:"mode"` BytesPercent string `json:"bytes_pcent"` BytesUsed ByteCount `json:"bytes_used"` BytesQuota QuotaSize `json:"-"` DataPool string `json:"data_pool"` PoolNamespace string `json:"pool_namespace"` Atime TimeStamp `json:"atime"` Mtime TimeStamp `json:"mtime"` Ctime TimeStamp `json:"ctime"` CreatedAt TimeStamp `json:"created_at"` Features []Feature `json:"features"` }
SubVolumeInfo reports various informational values about a subvolume.
type SubVolumeOptions ¶
type SubVolumeOptions struct { Size ByteCount Uid int Gid int Mode int PoolLayout string NamespaceIsolated bool }
SubVolumeOptions are used to specify optional, non-identifying, values to be used when creating a new subvolume.
type SubVolumeResizeResult ¶
type SubVolumeResizeResult struct { BytesUsed ByteCount `json:"bytes_used"` BytesQuota ByteCount `json:"bytes_quota"` BytesPercent string `json:"bytes_pcent"` }
SubVolumeResizeResult reports the size values returned by the ResizeSubVolume function, as reported by Ceph.
type SubVolumeSnapshotInfo ¶
type SubVolumeSnapshotInfo struct { CreatedAt TimeStamp `json:"created_at"` DataPool string `json:"data_pool"` HasPendingClones string `json:"has_pending_clones"` Protected string `json:"protected"` Size ByteCount `json:"size"` }
SubVolumeSnapshotInfo reports various informational values about a subvolume.
type SubVolumeState ¶
type SubVolumeState string
SubVolumeState is used to define constant value for the state of a subvolume.
type TimeStamp ¶
TimeStamp abstracts some of the details about date+time stamps returned by ceph via JSON.
func (*TimeStamp) UnmarshalJSON ¶
UnmarshalJSON implements the json Unmarshaler interface.
type VolInfo ¶
type VolInfo struct { MonAddrs []string `json:"mon_addrs"` PendingSubvolDels int `json:"pending_subvolume_deletions"` Pools PoolType `json:"pools"` UsedSize int `json:"used_size"` }
VolInfo holds various informational values about a volume.
type VolumeIdent ¶
VolumeIdent contains a pair of file system identifying values: the volume name and the volume ID.
type VolumePool ¶
type VolumePool struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Available uint64 `json:"avail"` Used uint64 `json:"used"` }
VolumePool reports on the pool status for a CephFS volume.
type VolumeStatus ¶
type VolumeStatus struct { MDSVersion string `json:"mds_version"` Pools []VolumePool `json:"pools"` }
VolumeStatus reports various properties of a CephFS volume. TODO: Fill in.