Add the volume to a RAID system. The RAID array is activated as soon as the array can be activated.

        :raises NoLoopbackAvailableError: if no loopback device was found
502275
def mount(self, volume):
        

        volume._find_loopback()

        raid_status = None
        try:
            # use mdadm to mount the loopback to a md device
            # incremental and run as soon as available
            output = _util.check_output_(['mdadm', '-IR', volume.loopback], stderr=subprocess.STDOUT)

            match = re.findall(r"attached to ([^ ,]+)", output)
            if match:
                volume._paths['md'] = os.path.realpath(match[0])
                if 'which is already active' in output:
                    logger.info("RAID is already active in other volume, using %s", volume._paths['md'])
                    raid_status = 'active'
                elif 'not enough to start' in output:
                    volume._paths['md'] = volume._paths['md'].replace("/dev/md/", "/dev/md")
                    logger.info("RAID volume added, but not enough to start %s", volume._paths['md'])
                    raid_status = 'waiting'
                else:
                    logger.info("RAID started at {0}".format(volume._paths['md']))
                    raid_status = 'active'
        except Exception as e:
            logger.exception("Failed mounting RAID.")
            volume._free_loopback()
            raise SubsystemError(e)

        # search for the RAID volume
        for v in volume.disk.parser.get_volumes():
            if v._paths.get("md") == volume._paths['md'] and v.volumes:
                logger.debug("Adding existing volume %s to volume %s", v.volumes[0], volume)
                v.volumes[0].info['raid_status'] = raid_status
                volume.volumes.volumes.append(v.volumes[0])
                return v.volumes[0]
        else:
            logger.debug("Creating RAID volume for %s", self)
            container = volume.volumes._make_single_subvolume(flag='alloc', offset=0, size=volume.size)
            container.info['fsdescription'] = 'RAID Volume'
            container.info['raid_status'] = raid_status
            return container
193195
def volume_attach(name, server_name, device='/dev/xvdb', **kwargs):
    '''
    
    '''
    conn = get_conn()
    return conn.volume_attach(
        name,
        server_name,
        device,
        timeout=300
    )
1113581
def add_callback(self, callback=None, errorback=None):
        
        self._callback = callback
        self._errorback = errorback
345483
def append_volume(runtime, source, target, writable=False):
        # type: (List[Text], Text, Text, bool) -> None
        """"""
        runtime.append(u"--volume={}:{}:{}".format(
            docker_windows_path_adjust(source), target,
            "rw" if writable else "ro"))
484948
def create(self, volume_id, backup_id=None, timestamp=None):
        
        backup_id = backup_id or str(uuid.uuid4())
        timestamp = timestamp or int(time())
        return self.http_put('/volumes/%s/backups/%s' % (volume_id, backup_id),
                             params={'timestamp': timestamp})
709674
async def set_volume(self, volume: int):
        
        self._volume = max(min(volume, 150), 0)
        await self.node.volume(self.channel.guild.id, self.volume)
1249984
async def SetVolumeInfo(self, volumes):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='StorageProvisioner',
                   request='SetVolumeInfo',
                   version=4,
                   params=_params)
        _params['volumes'] = volumes
        reply = await self.rpc(msg)
        return reply
1363566
async def AddToUnit(self, storages):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='AddToUnit',
                   version=4,
                   params=_params)
        _params['storages'] = storages
        reply = await self.rpc(msg)
        return reply
380684
async def add(self, device, recursive=None):
        
        device, created = await self._find_device_losetup(device)
        if created and recursive is False:
            return device
        if device.is_filesystem:
            success = await self.mount(device)
        elif device.is_crypto:
            success = await self.unlock(device)
            if success and recursive:
                await self.udisks._sync()
                device = self.udisks[device.object_path]
                success = await self.add(
                    device.luks_cleartext_holder,
                    recursive=True)
        elif (recursive
              and device.is_partition_table
              and self.is_handleable(device)):
            tasks = [
                self.add(dev, recursive=True)
                for dev in self.get_all_handleable()
                if dev.is_partition and dev.partition_slave == device
            ]
            results = await gather(*tasks)
            success = all(results)
        else:
            self._log.info(_('not adding {0}: unhandled device', device))
            return False
        return success
760459
static void addCodec(RaidCodec codec) {
    List<RaidCodec> newCodecs = new ArrayList<RaidCodec>();
    newCodecs.addAll(codecs);
    newCodecs.add(codec);
    codecs = Collections.unmodifiableList(newCodecs);

    Map<String, RaidCodec> newIdToCodec = new HashMap<String, RaidCodec>();
    newIdToCodec.putAll(idToCodec);
    newIdToCodec.put(codec.id, codec);
    idToCodec = Collections.unmodifiableMap(newIdToCodec);
  }
1278099
def add(self, data):
		
		if len(self) + len(data) > self.sizelimit:
			raise OmapiSizeLimitError()
		self.buff.write(data)
		return self
10856
def mount_volume(volume, device='/dev/xvdf', mountpoint='/mnt/data', fstype='ext4'):
    '''
    
    '''
    _ec2().attach_volume(volume, _host_node()['id'], device)
    time.sleep(1)
    sudo('mkdir -p "%s"' % mountpoint)
    sudo('mount -t "%s" "%s" "%s"' % (fstype, device, mountpoint))
1284666
def set_volume(self, volume):
        
        volume = min(max(0, volume), 1)
        self.logger.info("Receiver:setting volume to %.1f", volume)
        self.send_message({MESSAGE_TYPE: 'SET_VOLUME',
                           'volume': {'level': volume}})
        return volume
1036823
def add_bus(self, bus):
        
        if self._loop is not None and hasattr(bus, 'fileno') and bus.fileno() >= 0:
            # Use file descriptor to watch for messages
            reader = bus.fileno()
            self._loop.add_reader(reader, self._on_message_available, bus)
        else:
            reader = threading.Thread(target=self._rx_thread, args=(bus,),
                name='can.notifier for bus "{}"'.format(bus.channel_info))
            reader.daemon = True
            reader.start()
        self._readers.append(reader)
933279
def add_volume(volume)
      raise ArgumentError, "Invalid argument 'volume'. Expected DoseVolume, got #{volume.class}." unless volume.is_a?(DoseVolume)
      @volumes << volume unless @associated_volumes[volume.uid]
      @associated_volumes[volume.uid] = volume
    end
449209
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Implementation Use Volume Descriptor Implementation Use field already initialized')

        self.char_set = _unicodecharset()
        self.log_vol_ident = _ostaunicode_zero_pad('CDROM', 128)
        self.lv_info1 = b'\x00' * 36
        self.lv_info2 = b'\x00' * 36
        self.lv_info3 = b'\x00' * 36
        self.impl_ident = UDFEntityID()
        self.impl_ident.new(0, b'*pycdlib', b'')
        self.impl_use = b'\x00' * 128

        self._initialized = True
1186249
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Logical Volume Implementation Use already initialized')

        self.impl_id = UDFEntityID()
        self.impl_id.new(0, b'*pycdlib')

        self.num_files = 0
        self.num_dirs = 1
        self.min_udf_read_revision = 258
        self.min_udf_write_revision = 258
        self.max_udf_write_revision = 258

        self.impl_use = b'\x00' * 378  # FIXME: let the user set this

        self._initialized = True