Chinaunix首页 | 论坛 | 博客
  • 博客访问: 55778
  • 博文数量: 21
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-11 08:40
个人简介

努力过着轻松日子的苦逼IT工程师……

文章分类

全部博文(21)

文章存档

2013年(21)

我的朋友

分类: LINUX

2013-08-15 16:10:54

Problem



Clearing putil/tutil fields: What are they, and why are they set in the first place?


Error



vxvm:vxplex: ERROR: Volume is locked by another utility
 

Cause



The lock is set when a a recovery or administration operation within Volume Manager is interrupted.


Solution



The putil/tutil fields are used for "locks" on volumes, plexes, subdisks, and disks, during most types of configuration changes and/or recoveries.
 

 
For example, if attaching a plex to a volume, the plex will have its "tutil0" field set to "ATT". Once the attach is complete, the "tutil0" field is cleared automatically.
 

 
If you attempt to perform a function on an entity with a set putil/tutil flag, you'll get this error message:
 
vxvm:vxplex: ERROR: Volume is locked by another utility
 

 
Putil fields are permanent, and will stay set, even after a reboot. Tutil fields are temporary, and will not survive a reboot.
 

 
To textually list the tutil/putil fields, use the command:
 

 
# vxprint -h vol01
 
Disk group: test
 

 
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
 
v vol01 fsgen ENABLED 8919040 - ACTIVE -
 
vol01-01 vol01 DETACHED 8919470 - STALE - -
 
sd test01-01 vol01-01 ENABLED 8919470 0 - - -
 

 
This only lists the 0 fields (there are also 1 and 2 fields as well), but these are usually the ones that get set anyway.
 

 
The recognized generic field names are:
 
tutil
 
A set of strings representing all of the temporary utility fields.
 
tutil0 or t0
 
A string representing the first temporary utility field.
 
tutil1 or t1
 
A string representing the second temporary utility field.
 
tutil2 or t2
 
A string representing the third temporary utility field.
 
putil
 
A set of strings representing all of the permanent utility fields.
 
putil0 or p0
 
A string containing the first permanent utility field.
 
putil1 or p1
 
A string containing the second permanent utility field.
 
putil2 or p2
 
A string containing the third permanent utility field
 

 

 
What should you do before clearing the lock?
 

 
Make sure that no recover command is taking place.
 

 
# ps -ef | grep vx
 
# vxtask list

 
If there is a "vxvol", or "vxplex", or "vxrecover", going on, then the putil/tutil fields are probably set for a reason.
 

 

 
What command do you use to clear the lock?
 

 
#vxmend -g clear all
 

 
*where itemname is the volume, plex, subdisk or disk that has a tutil/putil flag set
 



Legacy ID



239251


Article URL


阅读(548) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~