Synopsis

volume [-d | -D] [-1 | -u | -p | -U volume_letter]

Description

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.

Example

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 ]

then

# Report error that it wasn’t protected

fi

#

#  Lock volume e: for exclusive access

#

ret=`volume -l E`

if [ $ret -gt 0 ]

then

# Report error that it wasn’t locked

fi

Exit Codes

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.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment