volume [-d | -D] [-1 | -u | -p | -U volume_letter]
This command is used to lock and unlock volumes on the Windows server. It may also be used to register with the LifeKeeper Service. When used in this fashion, it determines which volumes should be protected (locked) by LifeKeeper at startup. The lock provides LifeKeeper with exclusive access to the volume and will not allow any other process to access the volume.
LifeKeeper must be running in order for this command to succeed. The command interfaces with the LifeKeeper Service to provide the locking mechanism.
The following options are available where volume_letter is the drive letter to be locked\unlocked or protected\unprotected (i.e. C to Z).
|-d||Display the currently locked volumes.|
|-D||Display the volumes that are registered with LifeKeeper. This would display volumes that have been added with the -p option. Generally, -D displays a different list than the one shown by the -d option.|
|-l||Lock the volume for exclusive access. The lock will fail if a remote user has opened the volume or a local application has opened the volume for a write operation.|
|-u||Unlock the volume from exclusive access.|
|-p||Register the volume with LifeKeeper, so that on subsequent reboots or restarts of LifeKeeper, the volume is automatically locked.|
|-U||Unregister the volume with LifeKeeper so that it is not automatically locked on LifeKeeper startup.|
The following illustrates how the volume command should be used:
# Register drive volume e: to be locked by LifeKeeper
ret=`volume -p E`
if [ $ret -gt 0 ]
# Report error that it wasn’t protected
# Lock volume e: for exclusive access
ret=`volume -l E`
if [ $ret -gt 0 ]
# Report error that it wasn’t locked
The following exit codes could be returned by this command:
|0||The operation has succeeded.|
|greater than 0||The operation has failed. An error message is printed to standard error.|
Post your comment on this topic.