Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)
Showing posts with label disk. Show all posts
Showing posts with label disk. Show all posts

Wednesday, July 9, 2025

Basic important ODA (Oracle Database Appliance) commands:

Mastering Oracle Database Appliance (ODA): 15 Essential Commands Every Admin Should Know

As working ODA admin, one of the key responsibilities is ensuring the smooth operation of Oracle Database Appliances (ODA). Whether you're managing a Bare Metal (BM) or Virtualized ODA environment, having a solid grasp of the most frequently used commands can significantly enhance your efficiency and troubleshooting capabilities.

In this blog, I’ll walk you through 15 essential ODA commands that every administrator should keep in their toolkit.


🔍 System & Disk Insights

  1. odaadmcli show disk
    Displays the current status of all disks in the system.
    Useful for checking disk health and identifying potential issues.

  2. odaadmcli show server
    Provides server details including serial number and hardware specifications.
    Handy for inventory and support cases.

  3. odaadmcli show env_hw
    Reveals the ODA model and whether it's configured as Bare Metal or Virtualized.
    Crucial for understanding the deployment architecture.


🖥️ Virtual Machine (VM) Management

  1. odacli list-vms
    Lists all running VMs and their associated nodes.
    Helps track VM distribution across nodes.

  2. odacli stop-vm -n <VM_Name>
    Stops the specified VM gracefully.
    Ideal for maintenance or resource reallocation.

  3. odacli start-vm -n <VM_Name>
    Starts the specified VM.
    Quick recovery or scheduled startup.

  4. odacli start-vm -n odavm -nn node0
    Starts the VM odavm on a specific node (e.g., node0).
    Useful for node-specific operations or testing.

  5. virsh list or virsh list --all
    Lists all VMs, including inactive ones.
    A broader view of VM inventory.

  6. virsh domblklist <VM_Name>
    Displays all disk details attached to a VM.
    Essential for snapshot planning and storage audits.

  7. odacli describe-vm -n <VM_Name>
    Provides detailed information about a specific VM.
    Includes configuration, resource allocation, and status.

  8. virsh console <VM_ID>
    Accesses the console of a specific VM.
    Direct interaction for troubleshooting or configuration.


🗃️ Database System & Component Overview

  1. odacli list-dbsystems
    Lists all DB systems configured on the ODA.
    Helps monitor database deployments and usage.

  2. odacli describe-component
    Displays installed and available versions of components like DCS Controller, OS, ILOM, BIOS, etc.
    Vital for patching and version control.


📋 Job Monitoring & Troubleshooting

  1. odacli list-jobs
    Lists all jobs initiated via odacli commands.
    Tracks task execution and history.

  2. odacli describe-job -i <Job_ID>
    Provides detailed status (success/failure) of a specific job.
    Crucial for debugging and audit trails.


✅ Final Thoughts

These commands form the backbone of ODA administration. Whether you're provisioning VMs, monitoring disk health, or managing patch levels, having these commands at your fingertips can streamline operations and reduce downtime.

If you're new to ODA or looking to refine your command-line skills, start by practicing these commands in a test environment. Over time, they’ll become second nature and empower you to manage your Oracle infrastructure with confidence.


Author:
Kiran Jadhav
Mumbai, Maharashtra



 


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








Thursday, September 25, 2014

New disk addition on HPVM - hpux

New disk addition on HPVM - hpux

The storage team will allocate a new lun to the VM HOST (Physical server).

We will be using that disk on VM guest. We can do this by two methods 
i.e either using that entire disk on HPVM guest.
or by creating a LV on HPVM host and using that LV as a disk on HPVM guest.


1. On HPVM Host ( Where the VM machine is running )


#ioscan -fnC disk

#insf -eCdisk

After identifying the disk:

{ For LV --

#pvcreate /dev/disk/rdisk??

#vgcreate /dev/vg_name?? /dev/disk/disk??

#lvcreate -L "disk size in MB" -n /dev/vg_name??/lv_?? /dev/vg_name??

(Create a RAW Lvol only , no need to create a FS, since we are going to allocate this RAW lvol as disk to HPVM) }




2. # /opt/hpvm/bin/hpvmstatus -P {VMguest} = To check existing disk details for the VM machine


For LV :

#hpvmmodify -P {VMguest} -a disk:scsi::lv:/dev//rdisk/diskxx


For Disk : 

#hpvmmodify –P {VMguest}  -a disk:avio_stor::disk:/dev/rdisk/diskxx


3. Once disk is added on HPVM guest; check and confirm: 

#/opt/hpvm/bin/hpvmstatus -P {VMguest} = to check the new added disk details in o/p



Thanks...
Kalyanjit

Wednesday, August 27, 2014

Run 'scsimgr replace_wwid' command + HPUX

Run 'scsimgr replace_wwid' command + HPUX

Error:

class : lunpath, instance 269
Evpd inquiry page 83h/80h failed or the current page 83h/80h data do not match the previous known page 83h/80h data on LUN id 0x0 probed beneath the target path (class = tgtpath, instance = 12) The lun path is (class = lunpath, instance 269).Run 'scsimgr replace_wwid' command to validate the change

Solution:

If we see above error in #dmesg then

1. #scsimgr -f replace_wwid -C lunpath -I 269

Binding of LUN path with new LUN validated successfully

2. Scan the disk again so new id which was assigned to the disk, will get reflacted.

    #ioscan –fnNC disk    

     -N displays output using the agile view instead of legacy view

3. #insf -e -C disk

4. #dmesg


Thanks...
Kiran Jaddhav

Wednesday, June 11, 2014

Root Disk mirroring on Integrity servers (HPUX 11.31)

Root Disk mirroring on Integrity servers (HPUX 11.31)

Please take below few outputs before proceeding:

#lvlnboot –v

# cat /stand/bootconf

#ioscan –m dsf |egrep ‘p1|p2|p3’

1.            Use the following commands to determine the size of the EFI, HP-UX, and HPSP partitions in megabytes on the current boot disk:
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p1 | awk '{print $1 / (1024)}'    
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p2 | awk '{print $1 / (1024)}'
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p3 | awk '{print $1 / (1024)}'


2.            Identify a disk that is not currently in use to be used as the mirror. This EFI partition should be as large as the EFI partition on the current disk. The HP-UX partition should be large enough to hold all the logical volumes in the clone. Although the HPSP partition is optional, if it is created, it should be the same size as the HPSP on the clone.


3.       Create a temporary file, for example /tmp/partitionfile , containing the number of partitions and the size of each partition to be created on the mirror disk. Use the information from steps 1 and 2 to determine partition sizes. Here is a sample command to create the file, indicating three partitions with an EFI partition size of 500 MB, an HPSP partition size of 400 MB, and the remaining space allocated to the HP-UX partition:

# print '3\nEFI 500MB\nHPUX 100%\nHPSP 400MB' > /tmp/partitionfile

See idisk(1M) for more information about partitioning disks.
4.       Use the file created in step 3 to partition the mirror disk with idisk .

(The echo will reply to the confirmation request from the idisk command.)

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/mirror_disk
/tmp/partitionfile may be removed if desired.

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/disk140

Check it by using command:

5.       Use ioscan –fnkC disk to determine the hardware path to the mirror disk.
  1. Use the insf command to create device files for all the newly-created partitions:
# /usr/sbin/insf -e -H hardware_path_to_mirror_disk

7.       Run the pvcreate command on the character device file for the HP-UX (second) partition of the mirror disk using the -B option to make the disk bootable and the -f option to overwrite any pre-existing data on the disk:
# /usr/sbin/pvcreate -f -B /dev/rdisk/mirror_disk_p2

8.       Extend the root volume group to the HP-UX partition of the mirror disk using the block device file of the second (HP-UX) partition in the following command:

# /usr/sbin/vgextend /dev/vg00 /dev/disk/mirror_disk_p2

9.       Run mkboot to complete the setup of the disk as a boot disk. The -e option tells mkboot to use EFI layout, and the -l option tells mkboot that this volume will be used by a volume manager even if it is not currently used by one.


NOTE:
No partition number is given to this command; it looks at the whole disk.
  1. # /usr/sbin/mkboot -e -l /dev/disk/mirror_disk
  1. Create a temporary AUTO file and use the efi_cp command to copy it to the mirror using the block device of the first (EFI) partition. The –lq option ensures that the system will boot without quorum. In the event of the primary boot disk failing, this will allow the mirror disk to boot.
# print 'boot vmunix -lq' > /tmp/AUTO
# /usr/sbin/efi_cp -d /dev/disk/mirror_disks2_p1 /tmp/AUTO /EFI/HPUX/AUTO
Finish with (for either) the following:  # /usr/bin/rm /tmp/AUTO

12.   Starting with the boot, swap, and root logical volumes, run lvextend to mirror each logical volume:

# /usr/sbin/lvextend m 1 /dev/vg00/lvol1 /dev/dsk/mirror_disk_p2
# /usr/sbin/lvextend m 1 /dev/vg00/lvol2 /dev/dsk/mirror_disk_p2 . .  . . .  . . .  . . .  . . .  . . .

Note down all LV name in /tmp/lvanme file.

13.   Run the following lvlnboot commands to re-establish LVM’s knowledge of the root and boot file systems and primary swap and dump.

# /usr/sbin/lvlnboot -b /dev/vg00/lvol1
# /usr/sbin/lvlnboot -r /dev/vg00/lvol3                  
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2                  
# /usr/sbin/lvlnboot -d /dev/vg00/lvol2                    
# /usr/sbin/lvlnboot –R
  1. Add the block device special file of the HP-UX (second) partition of the mirror to the /stand/bootconf file. The lower case l in the following command indicates that the disk is managed by LVM or VxVM.
# /usr/bin/echo "l /dev/disk/mirror_disk_p2" >> /stand/bootconf
  1. If desired, set the alternate boot path to the mirror_disk , using the hardware address determined in step 5. For HP-UX 11iv3, you can just use the block device special file name.
# /usr/sbin/setboot -a mirror_disk
  1. If the mirror disk includes an HPSP partition, use the efi_fsinit command on the character device file for the HPSP (third) partition to initialize it with an EFI file system:
# /usr/sbin/efi_fsinit -d /dev/rdisk/mirror_disk_p3


Thanks...
Kalyanjit

**Let's Share our knowledge**