When trying to destroy diskgroup, or remove a volume, we receive an error that a volume is open. This occurs even when there are no volumes mounted.

book

Article ID: 100021405

calendar_today

Updated On:

Description

Error Message

VxVM vxdg ERROR V-5-1-584 Disk group tdg: Some volumes in the disk group are in use

VxVM vxedit ERROR V-5-1-1242 Volume tvol is opened, cannot remove

Resolution

This can occur in situations where a customer is using an application that may be accessing the raw volume. As is the case with applications such as Oracle ASM, which polls the raw volume device files to check for availability.  

When trying to remove the disk group, an error is displayed:

-bash-3.00# vxdisk list
DEVICE      TYPE            DISK        GROUP        STATUS
c0t0d0s2    auto:none      -            -            online invalid
c0t1d0s2    auto:cdsdisk    c0t1d0s2    tdg          online

-bash-3.00#vxdg destroy tdg
VxVM vxdg ERRORV-5-1-584 Disk group tdg: Some volumes in the disk group are in use

When we check df ,we can see that the volume tvol in thed iskgroup tdg is not mounted:

-bash-3.00# df-h
Filesystem            size   used  avail capacity  Mounted on
/dev/dsk/c0t0d0s0      16G   7.1G  8.3G    47%    /
/devices                0K     0K     0K    0%    /devices
ctfs                    0K     0K     0K    0%    /system/contract
proc                    0K     0K     0K    0%    /proc
mnttab                  0K     0K     0K    0%    /etc/mnttab
swap                  852M   1.6M   850M    1%    /etc/svc/volatile
objfs                    0K    0K     0K    0%    /system/object
sharefs                  0K    0K     0K    0%    /etc/dfs/sharetab
fd                      0K     0K     0K    0%    /dev/fd
swap                  850M     0K   850M    0%    /tmp
swap                  850M    40K   850M    1%    /var/run

When trying to remove the volumes in this diskgroup (depending on which raw volume device files are in use) the following error is printed:

-bash-3.00#vxprint -htq
Disk group:tdg

dg tdg          default      default  16000    1246902853.8.sprst1105a0-20

dmc0t1d0s2     c0t1d0s2     auto    65536    35302480-

v  tvol        -            ENABLED  ACTIVE  2097152  SELECT    -        fsgen
pl tvol-01      tvol        ENABLED  ACTIVE  2097152  CONCAT    -        RW
sd c0t1d0s2-01  tvol-01      c0t1d0s20        2097152  0        c0t1d0   ENA

-bash-3.00#vxedit -g tdg -rf rm tvol
VxVM vxedit ERROR V-5-1-1242 Volume tvol is opened, cannot remove

We can check to see if a process is holding the volume with fuser . Simply run fuser against the raw path to the volumes in the disk group that you are trying to destroy(or the volume you are trying to remove).

-bash-3.00# fuser /dev/vx/rdsk/tdg/tvol
/dev/vx/rdsk/tdg/tvol:    6481o

From this we can see that a process is holding open that volume. We can check which process by grepping for the number in the output of the fuser command:

-bash-3.00# ps -ef |grep 6481
   root  6481  5531  2 10:56:04 pts/2       0:02 dd if=/dev/zero of=/dev/vx/rdsk/tdg/tvol
   root  6498  6475  0 10:57:52 pts/3       0:00 grep 6481

Here we can see that dd is holding open the volume ( See above as an example ). Any process that fuser shows will prevent the disk group,or that particular volume from being removed, as Volume Manager will assume that the volume is in use.

The holding process will have to be terminated, or finish what it is doing before the disk group/volume can be removed.

In the case of Oracle ASM, there is a known issue that keeps these device files in use, even after they have been dropped/dismounted from ASM.

For more information on this issue, please see Oracle Metalink402526.1


 
 

 

Issue/Introduction

When trying to destroy a disk group, or remove a volume, we receive an error that a volume is open. This occurs even when there are no volumes mounted.