code: func CreateDevice(poolName string, deviceID int) error {
  	logrus.Debugf("devicemapper: CreateDevice(poolName=%v, deviceID=%v)", poolName, deviceID)
  	task, err := TaskCreateNamed(deviceTargetMsg, poolName)
  	if task == nil {
  		return err
  	}
  
  	if err := task.setSector(0); err != nil {
  		return fmt.Errorf("devicemapper: Can't set sector %s", err)
  	}
  
  	if err := task.setMessage(fmt.Sprintf("create_thin %d", deviceID)); err != nil {
  		return fmt.Errorf("devicemapper: Can't set message %s", err)
  	}
  
  	dmSawExist = false // reset before the task is run
  	if err := task.run(); err != nil {
  		// Caller wants to know about ErrDeviceIDExists so that it can try with a different device id.
  		if dmSawExist {
  			return ErrDeviceIDExists
  		}
  
  		return fmt.Errorf("devicemapper: Error running CreateDevice %s", err)
  
  	}
  	return nil
  }
docs: // CreateDevice creates a device with the specified poolName with the specified device id.