Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error removing physical disk

798463Dec 4 2018 — edited Dec 6 2018

Hello,

I'm on 3.4.4 with a guest that i in Oracle Linux 6.10 and configured as Xen PVM domain type.

In this guest I have an Oracle 11gR2 database and a physical disk connected and used with ASM

I have to migrate to another SAN, so I connected another physical disk and used ASM functionalities to move/drop the disk.

SO I dropped from ASM and also

# oracleasm delete old_disk

The old disk is seen as /dev/xvdc from the OS.

I have tried to remove the physical disk but I receive this error:

OVMAPI_4010E Attempt to send command:

configure_vm to server: shq-hyp-012 failed. OVMAPI_4004E Sync command failed on server: 10.23.10.12.

Command: configure_vm, Server error: org.apache.xmlrpc.XmlRpcException: <type 'exceptions.RuntimeError'>:disk:setup_error:

Command: ['xm', 'block-detach', '0004fb00000600009bec72eba6fb0a6e', '51744'] failed (1): stderr: Error: Device 51744 (vbd) could not be disconnected. Device busy.

stdout: Usage: xm block-detach <Domain> <DevId> [-f|--force] Destroy a domain's virtual block device. [Tue Dec 04 12:44:11 CET 2018]

In /var/log/messages of guest:

Dec  4 12:44:10 guest_hostname kernel: [91801.988019] vbd vbd-51744: 16 Device in use; refusing to close

Do I have to exec any command on guest os before removing disk from VM in Oracle VM manager gui?

The fuser command doesn't show any use of /dev/xvdc and /dev/xvdc1

How to check what is using it?

Is this supported when guest is running in 3.4.4?

Thanks,

Gianluca

Comments

budachst

Hi Gianluca,

yeah… I have had something similar as well, although it's been years ago. You might have to stop the guest to free the lock on the drive, but since it's a RAC, you should be able to fail over your ASM to another RAC node.

Cheers,

budy

Simon Coter-Oracle

Two comments:

1. PVM shouldn't be used anymore (3.4.6 dropped the support for them, due to known security issues with this domain-type).

2. The vdisk should be removed from the VM without any kind of reboot; did you check by an "lsof" is some process is still using the device ?

I've the suspect that ASM is still using that disk in some way....

Simon

798463

It is a standalone server where datafiles are on ASM, mapped as physical disk to optimize performance.

So I have no option as in RAC. Thanks anyway

798463

Hi Simon, thanks for your reply.

1. I agree with you. I inherited this environment and my main target is to move storage from old SAN to new SAN.

I also think that in origin a P2V was done to get this system into Oracle VM

I will pass the information about the dropped support in 3.4.6

BTW: what will happen in case I try to update this environment to 3.4.6? Will Oracle tell me I cannot due to leak of support or what?

In case I'm going to read release notes and upgrade guide about the just released 3.4.6 version too.

2. I suspected it too, but I don't find a way to check what

The source physical disk was mapped as /dev/xvdc with a partition /dev/xvdc1 for ASM formatting

ASMCMD> lsdsk

Path

/dev/oracleasm/disks/DATA01

ASMCMD>

with

ASMCMD> lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512   4096  1048576   1048570   265502                0          265502              0             N  DATA/

ASMCMD>

The new disk is /dev/xvdg with /dev/xvdg1 for ASM formatting and created a /dev/oracleasm/disks/DATA02

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/DATA02' rebalance power 1;

Diskgroup altered.

SQL>

waited so that the rebalance has finished

SQL> select * from v$asm_operation;

no rows selected

SQL>

ASMCMD> lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512   4096  1048576   2097162  1314083                0         1314083              0             N  DATA/

ASMCMD>

and

SQL> select group_number,name,total_mb,free_mb from v$asm_disk_stat;

GROUP_NUMBER NAME                             TOTAL_MB    FREE_MB

------------ ------------------------------ ---------- ----------

           1 DATA_0000                         1048570     657033

           1 DATA_0001                         1048592     657050

SQL>

SQL> alter diskgroup DATA drop disk 'DATA_0000' rebalance power 1;

Diskgroup altered.

SQL>

at the end

SQL> select * from v$asm_operation;

no rows selected

SQL>

SQL> select TOTAL_MB, FREE_MB, disk_number, name from v$asm_disk;

  TOTAL_MB    FREE_MB DISK_NUMBER NAME

---------- ---------- ----------- ------------------------------

         0          0           0

   1048592     265524           1 DATA_0001

SQL>

ASMCMD> lsdsk -p

Group_Num  Disk_Num      Incarn  Mount_Stat  Header_Stat  Mode_Stat  State   Path

        1         1  3916009906  CACHED      MEMBER       ONLINE     NORMAL  /dev/oracleasm/disks/DATA02

ASMCMD>

Then

# oracleasm deletedisk DATA01

Clearing disk header: done

Dropping disk: done

# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

# oracleasm listdisks

DATA02

[root@mimbdst03 ~]#

I verified that smartd is not in execution so it doesn't lock the disks.

The fuser and lsof commands didn't seem to show /dev/xvdc or /dev/xvdc1 in use

Anything could be with any Oracle VM agent inside guest locking the disks?

budachst

The issue with dropping support for PVM is just, that if you still have guests, say pre OL6.x, which needs to be PVM, than you can't upgrade until you got that out of the way. It's no license issue.

Regarding your disk issue, have you checked device mapper, maybe dm still has a handle on that drive and won't give it up.

Cheers,

budy

1 - 5

Post Details

Added on Dec 4 2018
5 comments
1,710 views