How-to-add-disk-to-CDOM

How to add disk to LDOM

In this article, we are going to discuss how to add disk to ldom. So let us start the journey. Let me share the environment details so we have a better understanding.

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 disk to LDOM and have requests fulfilled. We are more focused here on the procedure at the CDOM server which we need to perform to how to add disk to LDOM. Once the disk is presented to LDOM it acts as a normal disk assigned to the standard Solaris environment. 

Example: We are adding two new disks aka LUN and we will see how to add disk to LDOM to understand the entire process. 

Considering the fact that you have already placed a request to the storage team to allocate LUN of demanded size to expand the file system as per request on CDOM and access to specified LDOM.

You have confirmation from the storage team they have assigned the requested storage with device ID “01e1 and 01e2” .The background storage system is Hitachi. 

How to add disk to LDOM

1. log in to Control Domain with elevated privilege like root level.

2. Scan storage on CDOM using below

# cfgadm –al |egrep “fabric”
# cfgadm –c configure <controller> 

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

At this stage you can see disks as nolabel.Disk is not leveled yet.

6.# format and label new disks assigned.

7.# vxdctl enable             – Veritas will re-scan lun with a label.

8. Initialize new LUN in VxVM

# /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 a new virtual device to LDOM and add a virtual disk to LDOM.

Save this output to validate the 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

Above output, it shows a new disk is assigned to the primary & secondary domain.

# ldm ls –o disk |grep <LDOMNAME> 

It will display the device is assigned to the specified LDOM. This was all about how to add disk to LDOM. That,s what we intended to discuss in this article.

14. Now you can log in to LDOM and configure LUN and expand volume using the standard procedure as standalone hosts by scanning LUN to the server using claim 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 procedure on how to scan and use new LUN to expand FS under VxVM you can refer to How to extend the VxFs file system.

Other Important Tutorials

Solaris 11 LDOM Recovery

How to unencapsulate the rootdisk in VxVM

How to Remove Veritas File Systems

How to check disk size in VxVM

How to check DG size in Veritas File System

Important Linux Commands

What is Inodes in Linux