Operating System - HP-UX
1752805 Members
5481 Online
108789 Solutions
New Discussion юеВ

Re: Adding a LV to an HP-VM: Duplicate backing device

 
TEC-HP
Frequent Advisor

Adding a LV to an HP-VM: Duplicate backing device

We're experiencing a problem when adding a newly created logical volume to an existing HP Virtual Machine.

hpvmdevmgmt does not show the device, and yet when we try to add the lvol to a virtual machine, it says "Duplicate backing device"

We've already added logical volumes (from the same volume group) to the virtual machine without problems. We extended the volume group with a new disk and created a new lvol on that new disk, in the existing volume group.

Below, output from the commands we use to do this:

# lvol info:
root@emrih4s2:/hroot# vgdisplay -v vg_vh4s4_rdtp
--- Volume groups ---
VG Name /dev/vg_vh4s4_rdtp
VG Write Access read/write
VG Status available
...
...

LV Name /dev/vg_vh4s4_rdtp/rdtprt
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 512
Used PV 1
...
...


root@emrih4s2:/hroot# fstyp /dev/vg_vh4s4_rdtp/rdtprt
vxfs

# the lvol is not in hpvmdevmgmt:
root@emrih4s2:/hroot# hpvmdevmgmt -l all | grep rdtprt
root@emrih4s2:/hroot#

# vm info:
root@emrih4s2:/hroot# hpvmstatus -P vh4s4
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
vh4s4 1 HPUX On (OS)

[Authorized Administrators]
Oper Groups :
Admin Groups :
Oper Users :
Admin Users :

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
2 20.0% 100.0%

[Memory Details]
Total Reserved
Memory Memory
======= ========
12 GB 64 MB

[Dynamic Memory Information]
NOTE: Dynamic data unavailable, configured values only
Minimum Target Maximum
Memory Memory Memory
=========== =========== ===========
1024 MB 5120 MB 12288 MB

[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk avio_stor 0 0 0 0 0 lv /dev/vg_vh4s4/rvg00
disk avio_stor 0 0 0 1 0 lv /dev/vg_vh4s4/ross
disk avio_stor 0 0 0 2 0 lv /dev/vg_vh4s4/rrosy2_d
disk avio_stor 0 0 0 3 0 lv /dev/vg_vh4s4_rdtp/rrdtp
disk avio_stor 0 0 0 4 0 lv /dev/vg_vh4s4_rdtp/rdbs
disk avio_stor 0 0 0 5 0 lv /dev/vg_vh4s4_rdtp/rdata
disk avio_stor 0 0 0 6 0 lv /dev/vg_vh4s4_rdtp/rindex
disk avio_stor 0 0 0 7 0 lv /dev/vg_vh4s4_rdtp/rarch
disk avio_stor 0 0 0 8 0 lv /dev/vg_vh4s4_rdtp/rrdt
disk avio_stor 0 0 0 9 0 lv /dev/vg_vh4s4_rdtp/rtivp
disk avio_stor 0 1 0 0 0 lv /dev/vg_vh4s4/rdrd
disk avio_stor 0 1 0 1 0 lv /dev/vg_vh4s4/rsysopt
disk avio_stor 0 1 0 2 0 lv /dev/vg_vh4s4/rswap
disk avio_stor 0 1 0 3 0 lv /dev/vg_vh4s4/rrdta

[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch avio_lan swlan900 3 0 2 0 4e-ef-1e-76-ba-c5
vswitch avio_lan swlan1 4 0 4 0 f6-f6-47-ac-5a-b5

[Misc Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
serial com1 tty console

# adding a lvol to the vm (fails):
root@emrih4s2:/hroot# hpvmmodify -P vh4s4 -a disk:avio_stor:1,0,5:lv:/dev/vg_vh4s4_rdtp/rrdtprt
hpvmmodify: ERROR (vh4s4): Duplicate backing device '/dev/vg_vh4s4_rdtp/rrdtprt'.
hpvmmodify: ERROR (vh4s4): Unable to add device '/dev/vg_vh4s4_rdtp/rrdtprt'.
hpvmmodify: Unable to create device disk:avio_stor:1,0,5:lv:/dev/vg_vh4s4_rdtp/rrdtprt.
hpvmmodify: Unable to modify the guest.

# the dev is added to hpvmdevmgmt:
root@emrih4s2:/hroot# hpvmdevmgmt -l all | grep rdtprt
/dev/vg_vh4s4_rdtp/rrdtprt:CONFIG=gdev,EXIST=YES,SHARE=NO,DEVTYPE=LV:vh4s4:HPVM_LVOL_TYPE1_0x01.0x00.0x03.0x60060480000290104444533030414535$$8$$/dev/vg_vh4s4_rdtp/rrdtprt

# deleting it from hpvmdevmgmt:
root@emrih4s2:/hroot# hpvmdevmgmt -d gdev:/dev/vg_vh4s4_rdtp/rrdtprt:depend:vh4s4
root@emrih4s2:/hroot#

We have tried numerous times, with different HW path specifications for hpvmmodify, but without any result.

Anyone have an idea on what we could try next? Shutting down the machine would be the less preferable option.
5 REPLIES 5
melvyn burnard
Honored Contributor

Re: Adding a LV to an HP-VM: Duplicate backing device

Have you tried adding it without specifying Bus/Target etc?
hpvmmodify -P vh4s4 -a disk:avio_stor::lv:/dev/vg_vh4s4_rdtp/rrdtprt
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
TEC-HP
Frequent Advisor

Re: Adding a LV to an HP-VM: Duplicate backing device

Yes, we've tried that. Now it seemed that even though the deviced didn't show up in hpvmdevmgmt, they were still in the configuration of the vm itself.

So we did root@emrih4s2:/hroot# hpvmmodify -P vh4s4 -d disk:scsi::lv:/dev/vg_vh4s4_rdtp/rrdtprt and hpvmmodify -P vh4s4 -d disk:avio_lan::lv:/dev/vg_vh4s4_rdtp/rrdtprt to remove them from the invisible config. After that, the adding of the disk worked.

First we got an error saying that we had to reboot first, but removing and adding it again on a different HW path (0,1,4) did work (because we didn't target a new storage adapter) (using a new storage adapter (not hot swappable) requires a vm reboot) (fyi, 127 avio_stor devices are allowed per adapter).

So, when you have problems with this, try to remove the devices that you tried to add using hpvmmodify -d. Even if the device is nowhere to be seen, the guest remembers that you tried to add it before and will report "Duplicate device" when you try again.
TEC-HP
Frequent Advisor

Re: Adding a LV to an HP-VM: Duplicate backing device

So, when you have problems with this, try to remove the devices that you tried to add using hpvmmodify -d. Even if the device is nowhere to be seen, the guest remembers that you tried to add it before and will report "Duplicate device" when you try again.
VK2COT
Honored Contributor

Re: Adding a LV to an HP-VM: Duplicate backing device

Hello,

The HPVM database keeps some old information
somehow.

This trick might help you clean up the HPVM database:

# cd /var/opt/hpvm/common/
# rm -f hpvm_devinit
# cd /dev/pt
# rm -f *
# hpvmdevmgmt -I

It certainly works for physical devices when
things go wrong or when one wants to add agile-view disks to VMs...

It won't hurt you to try.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Eric SAUBIGNAC
Honored Contributor

Re: Adding a LV to an HP-VM: Duplicate backing device

Well hpvmstatus with option -D (D as deferred) can sometimes help to understand that invisible things do not exist ... ;-)

Check with 'man hpvmstatus'

HTH

Eric