How to create new thin devices using symcli and add them to a masking view and a storage group

Below are the steps that I used recently to create and present a few thin devices. More precisely:

  • Boot disk – 50GB
  • Two TDEVs 150GB each. One for data and the other for logs.
  1. Create a nested initiator group:
  2. symaccess -sid VMAX-SID create -name IG_SERVERNAME_HBA0 -type initiator -consistent_lun
    symaccess -sid VMAX-SID -name IG_SERVERNAME_HBA0 -type initiator -wwn 50060b0000c30e38 add
    
    symaccess -sid VMAX-SID create -name IG_SERVERNAME_HBA1 -type initiator -consistent_lun
    symaccess -sid VMAX-SID -name IG_SERVERNAME_HBA1 -type initiator -wwn 50060b0000c30e3a add
    
    symaccess -sid VMAX-SID create -name IG_SERVERNAME -type initiator -consistent_lun
    symaccess -sid VMAX-SID -name IG_SERVERNAME -type initiator -ig IG_SERVERNAME_HBA0 add
    symaccess -sid VMAX-SID -name IG_SERVERNAME -type initiator -ig IG_SERVERNAME_HBA1 add
    
  3. Show initiator group’s details:
  4. symaccess -sid VMAX-SID show IG_SERVERNAME -type initiator -detail
    
  5. Create storage group:
  6. symaccess -sid VMAX-SID create -name SG_SERVERNAME -type storage
    
  7. Create thin devices and bind them to a pool:
  8. symconfigure -sid VMAX-SID -cmd "create dev count=1, size=50GB, emulation=fba, config=TDEV, binding to pool=Pool1;" prepare
    symconfigure -sid VMAX-SID -cmd "create dev count=1, size=50GB, emulation=fba, config=TDEV, binding to pool=Pool1;" commit
    
    symconfigure -sid VMAX-SID -cmd "create dev count=2, size=150GB, emulation=fba, config=TDEV, binding to pool=Pool1;" prepare
    symconfigure -sid VMAX-SID -cmd "create dev count=2, size=150GB, emulation=fba, config=TDEV, binding to pool=Pool1;" commit
    

    Don’t forget to record the device IDs. In my case they were the following: 016B (50GB),016C (150GB) and 005F (150GB) respectively.

  9. Add new devices to our storage group:
  10. Adding disks to the storage group and further masking require additional explanation. As all we know, boot device must be lun 0. But you can’t assign a specific LUN ID to every new device in one go during the masking step since there is only a single option, i.e. -lun, which tells the starting LUN ID. BUT, and that’s important, this option, -lun, would assign the starting LUN ID to a device with the smallest ID. And in my case that would be TDEV 005F and that wasn’t what my task was all about. To overcome that hurdle, I firstly added devices 016B (boot disk) and 016C (data disk) and masked them to a storage group with -lun 0 options. By doing that, I could guarantee that my boot device would be assigned LUN 0 (obviously 016B (hex) is smaller than 016C (hex)). After that all I had to do is to add the third data device to the storage group and it would be automatically assigned the next available LUN ID.

    symaccess -sid VMAX-SID -name SG_SERVERNAME -type storage add devs 016B,016C
    
  11. Create a new masking view and assign LUN IDs to the devices:
  12. symaccess -sid VMAX-SID create view -name MV_SERVERNAME -sg SG_SERVERNAME -pg PG_NAME -ig IG_SERVERNAME -lun 0
    
  13. Add third device to the storage group:
  14. symaccess -sid VMAX-SID -name SG_SERVERNAME -type storage add devs 005F
    
  15. Associate the storage group with a FAST VP policy:
  16. symfast -sid VMAX-SID -fp_name FAST_VP_NAME  associate -sg SG_SERVERNAME
    
  17. View the details of newly created masking view:
  18. symaccess -sid VMAX-SID show view MV_SERVERNAME
    

Job done!