How to add vdisk from CDOM to LDOM Online

How to add vdisk from CDOM to LDOM Online

RSY Digital World Logo

How to add vdisk from CDOM to LDOM Online

Environment : Solaris 10/VxVM for Volume Management/Hitachi Storage/Control Domain 
Primary & Secondary Domain configured for availability

If you are using Control Domains in your environment as many applications or databases still prefer to use the Solaris environment for its robustness and suitability especially oracle database-based applications. You might be getting a request to expand the file system used in CDOM.

We are going to discuss in this article how to add vdisk from CDOM to LDOM Online and have requests fulfilled. We are more focused here about the procedure at the CDOM server which we need to perform to how to add vdisk from CDOM to LDOM Online. Once the disk is presented to LDOM it acts as normal disk assigned to standard Solaris environment. 

Example: We are adding two new disk aka LUN and we will see how to add vdisk from CDOM 
to LDOM Online to understand the entire process. 
Considering the fact that you have already placed request to storage team to allocate LUN of 
demanded size to expand file system as per request on CDOM and access to specified LDOM.
You have confirmation from storage team they have assigned requested storage 
with device ID “01e1 and 01e2” .Background storage system is Hitachi. 

Procedure at CDOM

1. Login to Control Domain with elevated privilege like root level.
2. Scan storage on CDOM using below
# cfgadm –al |egrep “fabric”
# cfgadm –c configure <controller>        - You can refer fibre channel from previous step.
3. # echo | format                                  - Disk will be visible to OS now.
4. # vxdctl enable                                 - Veritas will scan new lun in VxVM.
5. # vxdisk -eo alldgs list |egrep "01e2|01e1”
tagmastore-usp0_01e1 auto           -            -    nolabel    c1t50060E8012A20E0Bd84s2 lun fc
tagmastore-usp0_01e2 auto           -            -    nolabel    c1t50060E8012A20E1Bd85s2 lun fc
 In this step you can see disks as nolabel.
6.# format and label new disks assigned.
7.# vxdctl enable              - Veritas will re-scan lun with label.
8. Initialize new LUN
# /etc/vx//bin/vxdisksetup -i  tagmastore-usp0_01e1
# /etc/vx//bin/vxdisksetup -i  tagmastore-usp0_01e2
9. Validate Disk Details it becomes online to get it assigned to LDOM.
#  vxdisk -eo alldgs list |egrep "01e2|01e1”
tagmastore-usp0_01e1 auto:cdsdisk           -    -   online c1t50060E8012A20E0Bd84s2 lun fc
tagmastore-usp0_01e2 auto:cdsdisk           -    -   online  c1t50060E8012A20E1Bd85s2 lun fc
10. Now we will assign new virtual device to domain and then add virtual disk to LDOM. Save 
this output to validate disk assigned to your LDOM as of now.
# ldm ls –o disk |grep <LDOMNAME> 
11. Adding Virtual Device to Domains 
Please remember you need to assign disk to Primary and Secondary Domain as well.     
# ldm add-vdsdev /dev/vx/dmp/tagmastore-usp0_01e1 [email protected]
# ldm add-vdsdev /dev/vx/dmp/tagmastore-usp0_01e2 [email protected]
# ldm add-vdsdev /dev/vx/dmp/tagmastore-usp0_01e1 [email protected]
# ldm add-vdsdev /dev/vx/dmp/tagmastore-usp0_01e2 [email protected]
12. Adding Virtual Disk to LDOM
# ldm add-vdisk usp0_01e1-p1 [email protected] <LDOMNAME>
# ldm add-vdisk usp0_01e2-p1 [email protected] <LDOMNAME>
# ldm add-vdisk usp0_01e1-p2 [email protected] <LDOMNAME>
# ldm add-vdisk usp0_01e2-p2 [email protected] <LDOMNAME>
13. Validation
# ldm ls -o disk <LDOMNAME> |egrep "01e1|01e2"
usp0_01e1-p1 [email protected]      111  [email protected] primary
usp0_01e2-p1 [email protected]      112  [email protected] primary
usp0_01e1-p2 [email protected]      115  [email protected] secondary
usp0_01e2-p2 [email protected]      116  [email protected] secondary
See above output it will show new disk is assigned to primary and secondary domain.
# ldm ls –o disk |grep <LDOMNAME>  
It will display device is assigned to specified LDOM.

This was all about How to add vdisk from CDOM to LDOM Online.That,s what we intended to 
discuss in this article.
14.Now you can login to LDOM and configure LUN and expand volume using standard procedure 
as standalone hosts by scanning LUN to server using cfadm or devfsadm and then initialize lun to 
veritas using vxdctl enable and adding it to required disk group and expand file system using vxassist.
If you still need full procesdure how to scan and use new LUN to expand FS under VxVM you can 
refer how to extend VxFs file system .
 .

RSY Digital World

RSY Digital World Founder & [email protected] Digital World. A UNIX Linux expert having a more than 20 years of experience in Solaris Red Hat Linux HP-UX AIX Unixware Open Server Veritas Storage Cloud Bigdata and many more in UNIX LINUX Infrastructure technologies.

Leave a Reply