[dnbd3] ; port to listen on (default: 5003) listenPort=5003 ; relative root directory for images, ending in .r[1-9][0-9]* basePath=/mnt/storage ; artificial connection delay for connecting servers serverPenalty=100000 ; artificial connection delay for connecting clients clientPenalty=0 ; is this server a proxy? if true, requests for non-existing images will be relayed to known alt-servers isProxy=true ; if proxy is true and an image is incomplete, should idle bandwidth be used to replicate missing blocks? backgroundReplication=true ; minimum amount of connected clients for background replication to kick in bgrMinClients=0 ; if another proxy requests and image that we don't have, should we ask our alt-servers for it? lookupMissingForProxy=true ; create sparse files instead of preallocating; ignored if backgroundReplication=true ; -- only recommended if cache space is small sparseFiles=false ; if true (which is the default), images will automatically be removed from the list if they can't be accessed removeMissingImages=true ; timeout in ms for send/recv on connections to uplink servers (used for replication) uplinkTimeout=5000 ; timeout in ms for send/recv on connections to clients (using an image on this server) clientTimeout=15000 ; set this to true to close handles of unused images after some timeout closeUnusedFd=false ; set this to true to load files without the .r[0-9]+ extension too, assuming RID=1 vmdkLegacyMode=false ; Don't set the server flag when connecting to alt-servers ; Intended for if the proxy is used for on-client caching pretendClient=false ; When running in proxy mode and running out of space, automatically delete oldest image(s) to make ; the newly replicated image fit. In sparse mode, this will make sure at least 2GB of free space are ; available when replicating a new image. During normal operation, it will free at least 256MB whenever ; an attempt to write more data to cache fails. In non-sparse mode, whenever a new image is replicated, ; as much space as is required to store the entire image will be made available. ; However, after startup the proxy will refuse to delete any images for the time span given below, to be ; able to gather up to date usage information for the images available. If unitless, the value is ; interpreted in seconds. Valid suffixes are m, h, d. ; Setting this to -1 disables deletion of images. If the cache partition is full, no more images will ; be replicated unless you manually free up more disk space. autoFreeDiskSpaceDelay=10h ; Specifies whether the iSCSI server should be initialized, enabled and used upon start of DNBD3 server. iSCSIServer=true [limits] maxClients=2000 maxImages=1000 maxPayload=9M maxReplicationSize=150G ; Maximum number of bytes to prefetch when relaying client request to upstream server maxPrefetch=256k [logging] ; log file path and name ; comment out to disable logging to file ; protip: use SIGUSR2 to reopen log file file=./dnbd3.log ; which type of messages to log to file fileMask=ERROR WARNING MINOR INFO DEBUG1 ; which type of messages to log to console (stdout) consoleMask=ERROR WARNING MINOR INFO ; Valid types (warning: specifying invalid types will not yield an error!) ; ERROR Fatal error, server will terminate ; WARNING Major issue, something is broken but keep running ; MINOR Minor issue, more of a hickup than serious problem ; INFO Informational message ; DEBUG1 Debug information, used for medium verbosity ; DEBUG2 Used for debug messages that would show up a lot ; Whether timestamps should be output to console too (or just to file if false) consoleTimestamps=false [iscsi] ; Target name check level (warning) specifying invalid check levels will default to full ; validation!). Default is Full ; Full Target name is checked for full standaard compliance (recommended) ; Relaxed All invalid characters according to standard will be allowed if not an IQN, NAA or EUI. ; None No checking at all (be careful) TargetNameCheck=Full ; Header digest (warning) specifying invalid digest type will default to None!). ; Default is None ; CRC32C Use CRC32C for header validation ; None No digest and therefore no checking will be done (be careful) HeaderDigest=None ; Data digest (warning) specifying invalid digest type will default to None!). ; Default is None ; CRC32C Use CRC32C for data validation ; None No digest and therefore no checking will be done (be careful) DataDigest=None ; Login/Text Operational Session Text Key: Maximum receive DataSegmentLength. ; * The initiator or target declares the maximum data segment length in bytes it can receive in an ; iSCSI PDU. * The transmitter (initiator or target) is required to send PDUs with a data segment that does not ; exceed MaxRecvDataSegmentLength of the receiver. A target receiver is additionally limited by ; MaxBurstLength for solicited data and FirstBurstLength for unsolicited dataAn initiator MUST NOT ; send solicited PDUs exceeding MaxBurstLength nor unsolicited PDUs exceeding FirstBurstLength (or ; FirstBurstLength-Immediate Data Length if immediate data were sent). Valid values range from 512 ; to 16777215 bytes. Default is 8192 bytes (8 KiB) MaxRecvDataSegmentLength=8192 ; Maximum number of connections allowed per session. Default is 1 MaxConnectionsPerSession=1 ; Login/Text Operational Session Text Key: Maximum outstanding Ready To Transfer. ; ; The initiator and target negotiate the maximum number of outstanding R2Ts per task, excluding any ; implied initial R2T that might be part of that task. An R2T is considered outstanding until the last ; data PDU (with the F bit set to 1) is transferred or a sequence reception timeout is encountered for ; that data sequence. Allowed values range from 1 to 65536. Default is 1 MaxOutstandingR2T=1 ; Login/Text Operational Session Text Key: Default time to wait. ; ; The initiator and target negotiate the minimum time, in seconds, to wait before attempting an ; explicit/implicit logout or an active task reassignment after an unexpected connection termination ; or a connection reset. ; A value of 0 indicates that logout or active task reassignment can be attempted immediately. ; Valid values are from 0 to 3600 seconds (one hour). Default is 2 seconds DefaultTime2Wait=2 ; Login/Text Operational Session Text Key: Default time to retain. ; ; The initiator and target negotiate the maximum time, in seconds, after an initial wait (Time2Wait), ; before which an active task reassignment is still possible after an unexpected connection ; termination or a connection reset. ; This value is also the session state timeout if the connection in question is the last LOGGED_IN ; connection in the session. ; A value of 0 indicates that connection/task state is immediately discarded by the target. ; Valid values are from 0 to 3600 seconds (one hour). Default is 20 seconds DefaultTime2Retain=20 ; Login/Text Operational Session Text Key: First burst length. ; ; The initiator and target negotiate the maximum amount in bytes of unsolicited data an iSCSI ; initiator may send to the target during the execution of a single SCSI command. This covers the ; immediate data (if any) and the sequence of unsolicited Data-Out PDUs (if any) that follow the ; command. ; FirstBurstLength MUST NOT exceed MaxBurstLength. Valid lengths range from 512 to 16777215 bytes. ; Default is 65536 bytes (64 KiB) FirstBurstLength=65536 ; Login/Text Operational Session Text Key: Maximum burst length. ; ; The initiator and target negotiate the maximum SCSI data payload in bytes in a Data-In or a ; solicited Data-Out iSCSI sequence. A sequence consists of one or more consecutive Data-In or ; Data-Out PDUs that end with a Data-In or Data-Out PDU with the F bit set to 1. Valid lengths ; range from 512 to 16777215 bytes. Default is 262144 bytes (256 KiB) MaxBurstLength=262144 ; Login/Text Operational Session Text Key: Initial Ready To Transfer. ; ; The InitialR2T key is used to turn off the default use of R2T for unidirectional operations ; and the output part of bidirectional commands, thus allowing an initiator to start sending data ; to a target as if it has received an initial R2T with Buffer Offset=Immediate Data Length and ; Desired Data Transfer Length=(min(FirstBurstLength, Expected Data Transfer Length) - Received ; Immediate Data Length). ; The default action is that R2T is required, unless both the initiator and the target send this ; key-pair attribute specifying InitialR2T=No. Only the first outgoing data burst (immediate data ; and/or separate PDUs) can be sent unsolicited (i.e., not requiring an explicit R2T). Default is ; true InitialR2T=true ; Login/Text Operational Session Text Key: Immediate data. ; ; The initiator and target negotiate support for immediate data. To turn immediate data off, the ; initiator or target must state its desire to do soImmediateData can be turned on if both the ; initiator and target have ImmediateData=Yes. ; If ImmediateData is set to Yes and InitialR2T is set to Yes (default), then only immediate data ; are accepted in the first burst. If ImmediateData is set to No and InitialR2T is set to Yes, ; then the initiator MUST NOT send unsolicited data and the target MUST reject unsolicited data ; with the corresponding response code. ; If ImmediateData is set to No and InitialR2T is set to No, then the initiator MUST NOT send ; unsolicited immediate data but MAY send one unsolicited burst of Data-OUT PDUs. ; If ImmediateData is set to Yes and InitialR2T is set to No, then the initiator MAY send ; unsolicited immediate data and/or one unsolicited burst of Data-OUT PDUs. ; The following table is a summary of unsolicited data options: ; ; InitialR2T | ImmediateData | Unsolicited Data-Out PDUs | ImmediateData ; +----------+---------------+---------------------------+-------------+ ; | No | No | Yes | No | ; | No | Yes | Yes | Yes | ; | Yes | No | No | No | ; | Yes | Yes | No | Yes | ; ; Default is true ImmediateData=true ; Login/Text Operational Session Text Key: Data Protocol Data Unit (PDU) in order. ; ; "No" is used by iSCSI to indicate that the data PDUs within sequences can be in any order. ; "Yes" is used to indicate that data PDUs within sequences have to be at continuously ; increasing addresses and overlays are forbidden. Default is true DataPDUInOrder=true ; Login/Text Operational Session Text Key: Data sequence in order. ; ; A data sequence is a sequence of Data-In or Data-Out PDUs that end with a Data-In or Data-Out ; PDU with the F bit set to 1. A Data-Out sequence is sent either unsolicited or in response to ; an R2T. ; Sequences cover an offset-range. ; If DataSequenceInOrder is set to No, data PDU sequences may be transferred in any order. ; If DataSequenceInOrder is set to Yes, data sequences MUST be transferred using continuously ; non-decreasing sequence offsets (R2T buffer offset for writes, or the smallest SCSI Data-In ; buffer offset within a read data sequence). ; If DataSequenceInOrder is set to Yes, a target may retry at most the last R2T, and an ; initiator may at most request retransmission for the last read data sequence. For this reason, ; if ErrorRecoveryLevel is not 0 and DataSequenceInOrder is set to Yes, then MaxOutstandingR2T ; MUST be set to 1. Default is true DataSequenceInOrder=true ; Login/Text Operational Session Text Key: Error recovery level. ; ; The initiator and target negotiate the recovery level supported. Recovery levels represent a ; combination of recovery capabilities. Each recovery level includes all the capabilities of the ; lower recovery levels and adds some new ones to them. ; In the description of recovery mechanisms, certain recovery classes are specified. Allowed ; error levels are 0, 1 and 2. Default is 0 ErrorRecoveryLevel=0 [scsi] ; Valid devices types for emulated device (warning) specifying invalid types will default to direct ; access device!). Default is Direct ; Direct Direct access device (e.g. hard drive) ; Sequential Sequential access device (e.g. tape) ; WriteOnce Write once device (WORM) ; ReadOnlyDirect Read only direct access device ; OpticalMemory Optical memory device (e.g. CD-ROM, DVD, BluRay) ; MediaChanger Media changer device DeviceType=Direct ; Physical block size of emulated device, rounded up to nearest power of two). Default is 512 for ; supporting ancient systems. Should be set to 2048 for CD-ROM, DVD and BluRay devices. Allowed ; physical block sizes range from 256 to 32768 bytes (32 KiB). Default is 512 bytes PhysicalBlockSize=512 ; Logical block size of emulated device, rounded up to nearest power of two). Default is 4096 for ; supporting modern systems. Should be set to 2048 for CD-ROM, DVD and BluRay devices. Allowed ; logical block sizes range from 256 to 32768 bytes (32 KiB). Default is 4096 bytes (4 KiB) LogicalBlockSize=4096 ; Device is emulated as removable. Should be enabled for CD-ROM, DVD and BluRay and disabled for ; hard drives. Default is true Removable=true ; Device is emulated as supporting UNMAP. Should alwas be disabled, since writing is NOT supported ; yet. Default is false UNMAP=false ; Device is emulated as non-rotating (e.g. SSD or NVMe), recommended to enable if image is stoed ; on a non-rotating device like a SSD or NVMe. Default is false NoRotation=false ; Device is emulated as physically read only. No possibility to enable writes in any case. Use ; for CD-ROM, DVD and BluRay devices. Default is false PhysicalReadOnly=false ; Device is emulated as write protected. Should always be enabled, since writing is NOT supported ; yet. Unlike physical read only, write protect state can be changed. Default is true WriteProtect=true ; Device is emulated supporting write cache. Should always be disabled, since writing is NOT ; supported yet. Default is false WriteCache=false