Problem description:
By mistake some non-alphanumeric characters (such as control and escaped characters) were entered while adding a disk to the disk group. This is what was entered:
# vxdg -g oradg adddisk oracle^H^H?1=c1t13d0s2
# vxdisk list | grep c1t13d0
c1t13d0s2 sliced orac?1 oradg online
When trying to rename this disk, it errors out.
# vxedit -g oradg rename orac?1 oracle06
vxvm:vxedit: ERROR: Failed to obtain locks:
orac?1: no such object in the configuration
Solution:
To find out what escaped characters have been entered, do the following:
# vxdisk list | cat -v
c1t13d0s2 sliced oracle^H^H?1 oradg online
where "^H" is the control character for the key in this case. Now rename the disk, typing the control characters exactly as they appear above, as "oracle?1". The escape sequence can vary depending on the stty setting for the particular user profile.
# vxedit -g oradg rename "oracle^H^H?1" oracle06
#vxdisk list | grep c1t13d0s2
c1t13d0s2 sliced oracle06 oradg online
An alternative method is to use a script. For example,
dm=`vxdisk list | grep c1t13d0s3 | awk '{ print $3 }'`
vxedit -g oradg rename $dm oracle06