Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Thursday, October 16, 2014

vmmodify ERROR (myvm) Incorrect backing device type - hpux

vmmodify: ERROR (myvm) : Incorrect backing device type - hpux

If we get below error while adding disk to HPVM guest machine:

Here
myvm = HPVM Host machine
vmguest = HPVM guest machine
disk to be added = /dev/rdisk/disk14204

myvm:/dev/disk] hpvmmodify -P vmguest -a disk:avio_stor::disk:/dev/rdisk/disk14204
hpvmmodify: ERROR (vmguest): Incorrect backing device type.
hpvmmodify: Unable to create device disk:avio_stor::disk:/dev/rdisk/disk14204.
hpvmmodify: Unable to modify the guest.

Solution:

Check the device files for the disk:

myvm:/dev/disk] ll /dev/disk/disk14204
brw-r-----   1 bin        sys          1 0x00011f Oct 13 15:57 /dev/disk/disk14204
myvm:/dev/disk]
myvm:/dev/disk] ll /dev/rdisk/disk14204
crw-r-----   1 bin        sys         13 0x00011f Oct 13 15:57 /dev/rdisk/disk14204
myvm:/dev/disk]

myvm:/dev/disk] ll /dev/pt/pt_disk14204
crw-r-----   1 bin        sys         12 0x00011c Sep 18 10:14 /dev/pt/pt_disk14204
myvm:/dev/disk]


See the there is difference between the device files so  it is giving error while adding the particular disk to VM guest.

Remove the device file and recreate it by below commands:

myvm:/dev/disk] rm /dev/pt/pt_disk14204


myvm:/dev/disk] rm /var/opt/hpvm/common/hpvm_devinit


myvm:/dev/disk] hpvmdevmgmt -I -V

hpvmdevmgmt: VERBOSE (host): Device /etc already exists in hpvm device database.
hpvmdevmgmt: VERBOSE (host): Device /stand already exists in hpvm device database.
myvm:/dev/disk]

myvm:/dev/disk] ll /dev/pt/pt_disk14204
crw-r-----   1 bin        sys         12 0x00011f Oct 15 12:32 /dev/pt/pt_disk14204

myvm:/dev/disk] hpvmmodify -P vmguest -a disk:avio_stor::disk:/dev/rdisk/disk14204

myvm:/dev/disk] hpvmdevinfo -P vmguest |grep 14204
vmguest                   disk            [0,0,103]               disk                    /dev/rdisk/disk14204    /dev/rdsk/c2t11d4
myvm:/dev/disk]


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

hpvm commands log file:

myvm:/] tail -f /var/opt/hpvm/common/command.log
10/15/14 12:11:12|SUMMARY|CLI|kiranj|hpvmdevmgmt -l all
10/15/14 12:11:31|SUMMARY|CLI|kiranj|hpvmstatus -v -P vmguest
10/15/14 12:11:38|SUMMARY|CLI|kiranj|hpvmstatus -v -P vmguest
10/15/14 12:22:21|SUMMARY|CLI|kiranj|hpvmdevmgmt -I -V
10/15/14 12:25:57|SUMMARY|CLI|kiranj|hpvmstatus
---------------------------------------------------------------------------

myvm:/] tail -f /var/opt/hpvm/common/hpvm_mon_log


Thanks...
Kiran Babu Jadhav








Friday, October 10, 2014

Steps to remove/destroy VG + HPUX

Steps to remove/destroy VG:

1. Do vgdisplay -v and not down lvs present in that VG.

   #vgdisplay -v vg16 |grep -i "LV Name"


2. Unmount all mount points present in that VG by using #umount

3. remove all lvs belongs to that VG by using #lvremove

4. deactivate that VG #vgchange -a n vg16

5. Remove that VG #vgremove vg16


or we can directly run vgremove command after unmounting FS.


We may get below error while unmounting filesystems:

[root@testing ~]# umount /u01/app
umount: /u01/app: device is busy
umount: /u01/app: device is busy

solution: check the mount points is in used or not

#fuser -cu /u01/app  ***** -c = to display the use of mount-points

#fuser -ku /u01/app  **** -k = to display the use of mount-points


While running vgremove command we may get below error:

[root@testing ~]# vgremove -f vg16
  Can't remove open logical volume "swap02"


[root@testing ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/mapper/vg00-swap01               partition       3071992 12      -1
/dev/mapper/vg16-swap02               partition       26214392        0       -2

[root@testing ~]# swapoff /dev/mapper/vg16-swap02


Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Wednesday, October 8, 2014

How to find Disk SCSI ID in Virtual Machine + Linux

How to find Disk SCSI ID in Virtual Machine + Linux

1. By command line:

a. To see scsi id of all the disks:

#cat /proc/scsi/scsi

root@test ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 1.0

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

b. to find the scsi id of the particular disk:


root@test ~]# ls -d /sys/block/sda/device/scsi_device*

/sys/block/sda/device/scsi_device:0:0:0:0

root@test ~]# ls -d /sys/block/sdc/device/scsi_device*
/sys/block/sdc/device/scsi_device:1:0:0:0

Here: 1:0:0:0 --> scsi1; chaneel 0; id: 0 Lun: 0

or


root@test ~]# ls -d /sys/block/*/device/scsi_device*
/sys/block/sda/device/scsi_device:0:0:0:0  /sys/block/sdc/device/scsi_device:1:0:0:0  /sys/block/sde/device/scsi_device:2:0:0:0  /sys/block/sdg/device/scsi_device:3:0:0:0

/sys/block/sdb/device/scsi_device:0:0:1:0  


2. Through vSphere client:

a. In the vSphere Client, Select the virtual machine and and right-click the select Edit Settings.

b. Select each hard disk to see its SCSI address.


Thanks...
Kirann Jadhav


**Let's Share our knowledge and keep visiting here**

Thursday, October 2, 2014

How to confirm disk is bootable or not + HPUX

How to confirm disk is bootable or not + HPUX


1. The disk which are bootable must be having entry in bootconf file

#cat /stand/bootconf

test:/] cat /stand/bootconf
l  /dev/disk/disk5_p2
l  /dev/disk/disk7_p2


3. We also confirm it by verbose listing of lvlnboot

test:/] lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk5_p2 -- Boot Disk
        /dev/disk/disk7_p2 -- Boot Disk
Boot: lvol1     on:     /dev/disk/disk5_p2
                        /dev/disk/disk7_p2
Root: lvol3     on:     /dev/disk/disk5_p2
                        /dev/disk/disk7_p2
Swap: lvol2     on:     /dev/disk/disk5_p2
                        /dev/disk/disk7_p2
Dump: lvol2     on:     /dev/disk/disk5_p2, 0

2. If the disk is bootable then it will show below output if we do lifls on that disk


test:/] lifls -l /dev/rdisk/disk7_p2
volume ISL10 data size 7984 directory size 8 11/06/03 01:11:06
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          11/06/03 01:11:06
AUTO       -12289 832     1        0          11/06/03 01:11:06
HPUX       -12928 840     1024     0          11/06/03 01:11:06
PAD        -12290 1864    1468     0          11/06/03 01:11:06
LABEL      BIN    3336    8        0          13/07/16 11:40:28

test:/] lifls -l /dev/rdisk/disk5_p2
volume ISL10 data size 7984 directory size 8 11/06/03 01:11:06
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          11/06/03 01:11:06
AUTO       -12289 832     1        0          11/06/03 01:11:06
HPUX       -12928 840     1024     0          11/06/03 01:11:06
PAD        -12290 1864    1468     0          11/06/03 01:11:06
LABEL      BIN    3336    8        0          11/11/30 21:47:44

The LIF (Logical Interchange Format) volume contains files necessary to boot: ISL, HPUX, LABEL and AUTO (for automatic boot).

It confirms that both disks mentioned in bootconf file are bootable disks.

4. While a non bootable disk reports:

test:/] lifls -l /dev/rdisk/disk4
lifls: Can't list /dev/rdisk/disk4; not a LIF volume



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**