Unlocking and Locking VLDB Entries

As detailed in Synchronizing the VLDB and Volume Headers, The Volume Location (VL) Server locks the Volume Location Database (VLDB) entry for a volume before the Volume Server executes any operation on it. No other operation can affect a volume with a locked VLDB entry, so the lock prevents the inconsistency or corruption that can result from multiple simultaneous operations on a volume.

To verify that a VLDB entry is locked, issue the vos listvldb command as described in To display VLDB entries. The command has a -locked flag that displays locked entries only. If the VLDB entry is locked, the string Volume is currently LOCKED appears on the last line of the volume's output.

To lock a VLDB entry yourself, use the vos lock command. This is useful when you suspect something is wrong with a volume and you want to prevent any changes to it while you are investigating the problem.

To unlock a locked VLDB entry, issue the vos unlock command, which unlocks a single VLDB entry, or the vos unlockvldb command, which unlocks potentially many entries. This is useful when a volume operation fails prematurely and leaves a VLDB entry locked, preventing you from acting to correct the problems resulting from the failure.

To lock a VLDB entry

  1. Verify that you are listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the vos lock to lock the entry.

       % vos lock <volume name or ID>
    

    where

    lo

    Is the shortest acceptable abbreviation of lock.

    volume name or ID

    Identifies the volume to be locked, either by its complete name or volume ID number. It can be any of the three versions of the volume.

To unlock a single VLDB entry

  1. Verify that you are listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the vos unlock command to unlock the entry.

       % vos unlock <volume name or ID>
    

    where

    unlock

    Must be typed in full.

    volume name or ID

    Identifies the volume to be unlocked, either by its complete name or volume ID number. It can be any of the three versions of the volume.

To unlock multiple VLDB entries

  1. Verify that you are listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the vos unlockvldb command to unlock the desired entries.

       % vos unlockvldb [<machine name>] [<partition name>]
    

    where

    unlockv

    Is the shortest acceptable abbreviation of unlockvldb.

    machine name

    Specifies a file server machine. Provide this argument alone to unlock all VLDB entries that mention the machine in a site definition. Omit both this argument and the partition name argument to unlock all VLDB entries.

    partition name

    Specifies a partition. Provide this argument alone to unlock all VLDB entries that mention the partition (on any machine) in a site definition. Omit both this argument and the machine name argument to unlock all VLDB entries.