|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.backup.LvmHelper
public class LvmHelper
Implements a helper for running LVM commands across full life-cycle from creating a snapshot to mounting it to unmounting and discarding.
| Constructor Summary | |
|---|---|
LvmHelper(ProcessHelper processHelper)
Creates a new LVM helper. |
|
| Method Summary | |
|---|---|
void |
configure()
Configure the commands and locations to manage snapshots. |
void |
createSnapshot()
Creates a new snapshot, which is assumed not to exist already. |
java.lang.String |
getDataDir()
|
java.lang.String |
getLogicalVolume()
|
java.lang.String |
getLogicalVolumeMount()
|
java.lang.String |
getLvcreate()
|
java.lang.String |
getLvremove()
|
java.io.File |
getSnapshotDataDir()
|
java.lang.String |
getSnapshotMount()
|
java.lang.String |
getSnapshotName()
|
java.lang.String |
getSnapshotSize()
|
java.lang.String |
getVolumeGroup()
|
void |
mountSnapShot()
Mounts a snapshot and validates that the storage is readable. |
void |
removeSnapshot()
Removes an existing snapshot. |
void |
removeStorage()
Clears storage in preparation for restore operation. |
void |
setDataDir(java.lang.String dataDir)
|
void |
setLogicalVolume(java.lang.String logicalVolume)
|
void |
setLogicalVolumeMount(java.lang.String logicalVolumeMount)
|
void |
setLvcreate(java.lang.String lvcreate)
|
void |
setLvremove(java.lang.String lvremove)
|
void |
setSnapshotMount(java.lang.String snapshotMount)
|
void |
setSnapshotName(java.lang.String snapshotName)
|
void |
setSnapshotSize(java.lang.String snapshotSize)
|
void |
setVolumeGroup(java.lang.String volumeGroup)
|
void |
unmountSnapshot()
Unmounts a snapshot. |
void |
validateStorage(java.lang.String name,
java.io.File storageDir)
Ensure that indicated storage is a readable directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LvmHelper(ProcessHelper processHelper)
| Method Detail |
|---|
public java.lang.String getDataDir()
public void setDataDir(java.lang.String dataDir)
public java.lang.String getVolumeGroup()
public void setVolumeGroup(java.lang.String volumeGroup)
public java.lang.String getLogicalVolume()
public void setLogicalVolume(java.lang.String logicalVolume)
public java.lang.String getLogicalVolumeMount()
public void setLogicalVolumeMount(java.lang.String logicalVolumeMount)
public java.lang.String getSnapshotName()
public void setSnapshotName(java.lang.String snapshotName)
public java.lang.String getSnapshotSize()
public void setSnapshotSize(java.lang.String snapshotSize)
public java.lang.String getSnapshotMount()
public void setSnapshotMount(java.lang.String snapshotMount)
public java.lang.String getLvcreate()
public void setLvcreate(java.lang.String lvcreate)
public java.lang.String getLvremove()
public void setLvremove(java.lang.String lvremove)
public java.io.File getSnapshotDataDir()
public void configure()
throws BackupException
BackupException
public void createSnapshot()
throws BackupException
BackupException - If the snapshot creation fails, for example
because the snapshot already exists.
public void removeSnapshot()
throws BackupException
BackupException - If the snapshot removal fails, for example
because the snapshot does not exist.
public void mountSnapShot()
throws BackupException
BackupException - Thrown if the mount command is unsuccessful for
any reason
public void unmountSnapshot()
throws BackupException
BackupException - Thrown if the unmount command is unsuccessful for
any reason
public void removeStorage()
throws BackupException
BackupException - Thrown if rm command fails.
public void validateStorage(java.lang.String name,
java.io.File storageDir)
throws BackupException
BackupException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||