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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. How to assign CPU/Memory/MAU resources to Guest LDOMs [OVM for SPARC]
  2. How to create an I/O domain
  3. How to clone LDOMs using ZFS
  4. OVM for SPARC (LDOMs) : Troubleshooting console issues
  5. The Ultimate LDOMs troubleshooting guide
  6. LDOMs troubleshooting : guest and control domains can not talk to each other but can talk with anyone else on the network
  7. How to install and configure LDOMs (Oracle VM for SPARC)
  8. LDOMs (OVM for SPARC) Command line reference [cheat sheet]
  9. How to rename a LDOM (OVM for SPARC)
  10. How to Collect a Forced Crash Dump of a Hanging Solaris Guest LDom

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright