• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to add/remove vdisk to/from Guest LDOMS online

By admin

Prerequisites

In order to add vdisk online to a guest LDOM, the SMF service svc:/platform/sun4v/drd must be online in Guest LDOM :

ldom01 # svcs drd
STATE STIME FMRI
online Feb_12 svc:/platform/sun4v/drd:default

1. Adding ZFS volume

primary # zpool list 
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT 
ldom 86.5G 14.6G 71.9G 16% 1.00x ONLINE - 
rpool 136G 20.5G 115G 15% 1.00x ONLINE -

primary # zfs create -V 5G ldom/disk2 
primary # ldm add-vdsdev /dev/zvol/dsk/ldom/disk2 disk2@primary-vds0 
primary # ldm add-vdisk disk2 disk2@primary-vds0 ldom01

2. Adding a disk

primary # ldm add-vdsdev /dev/dsk/c1t0d0s2 disk2G@primary-vds0
primary # ldm add-vdisk disk2 disk2@primary-vds0 ldom01

3. Adding a file as vdisk

primary # mkfile 5g /ldom/disk2 
primary # ldm add-vdsdev /ldom/disk2 disk2@primary-vds0 
primary # ldm add-vdisk disk2 disk2@primary-vds0 ldom01

Saving the changes permanently

Make sure you save the configuration changes permanently to the SP-config :

primary# ldm add-spconfig config-feb122014

primary# ldm ls-spconfig
factory-default
config-feb122014 [current]

Verify

Make sure that the vdisk addition is successful in the guest LDOM :

ldom01 # devfsadm -Cv

ldom01 # echo | format 
Searching for disks...done

AVAILABLE DISK SELECTIONS: 
0. c0d0 [SUN-DiskImage-20GB cyl 566 alt 2 hd 96 sec 768] 
/virtual-devices@100/channel-devices@200/disk@0 
1. c0d1 [SUN-DiskImage-5GB cyl 17474 alt 2 hd 1 sec 600]
/virtual-devices@100/channel-devices@200/disk@1 
Specify disk (enter its number):

We can also verify the addition of vdisks from the control domain :

primary# ldm list -o disk ldom01 
NAME 
ldom01

DISK 
NAME VOLUME TOUT ID DEVICE SERVER MPGROUP 
vdisk1 vol1@primary-vds0 0 disk@0 primary 
disk2 disk2@primary-vds0 1 disk@1 primary

Removing vdisk from Guest LDOM

Make sure that the vdisk is not being used in the guest LDOM.

primary # ldm rm-vdisk disk2 ldom01

Filed Under: LDOMs

Some more articles you might also be interested in …

  1. OVM for SPARC (LDOMs) : Troubleshooting console issues
  2. Oracle VM Server for SPARC (Ldoms) : How to Change Primary/Control Domain’s UUID
  3. LDOMs (OVM for SPARC) Command line reference [cheat sheet]
  4. How to rename a LDOM (OVM for SPARC)
  5. The Ultimate LDOMs troubleshooting guide
  6. How to install and configure LDOMs (Oracle VM for SPARC)
  7. LDOMs troubleshooting : guest and control domains can not talk to each other but can talk with anyone else on the network
  8. Solaris 11 : Increasing the size of a vdisk in LDom ( with backend device as ZFS volume )
  9. How to reset LDOM configuration to factory default
  10. LDOM live migration basics explained

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary