top of page

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

Writer's picture: Hanh NguyenHanh Nguyen

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  
/virtual-devices@100/channel-devices@200/disk@0 
1. c0d1  
/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.

 
 
 

Recent Posts

See All

LDOM BASIC

1)How to Enable the Logical Domains Manager Daemon # svcadm enable ldmd # /opt/SUNWldm/bin/ldm list 2)Upgrading a System That Is Already...

Change hostname in Solaris 11

Change homename to dev svccfg -s system/identity:node setprop config/nodename=”dev” svccfg -s system/identity:node setprop...

Comments


bottom of page