diff options
| author | Simon Rettberg | 2025-10-24 09:35:24 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-12-09 15:33:20 +0100 |
| commit | 1ccbbac6d235d3246a42d0f1706ae3a23059729c (patch) | |
| tree | 2910c1a1878f9023b5eb74690a283a71141c284d /pkg | |
| parent | Fix AFL build (diff) | |
| download | dnbd3-1ccbbac6d235d3246a42d0f1706ae3a23059729c.tar.gz dnbd3-1ccbbac6d235d3246a42d0f1706ae3a23059729c.tar.xz dnbd3-1ccbbac6d235d3246a42d0f1706ae3a23059729c.zip | |
Update README and sample config
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/config/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | pkg/config/iscsi.conf | 249 | ||||
| -rw-r--r-- | pkg/config/server.conf | 200 |
3 files changed, 2 insertions, 448 deletions
diff --git a/pkg/config/CMakeLists.txt b/pkg/config/CMakeLists.txt index b39bbac..efbd2bf 100644 --- a/pkg/config/CMakeLists.txt +++ b/pkg/config/CMakeLists.txt @@ -6,7 +6,6 @@ project(dnbd3-config # define all configuration files set(DNBD3_CONFIG_FILES ${CMAKE_CURRENT_SOURCE_DIR}/alt-servers - ${CMAKE_CURRENT_SOURCE_DIR}/iscsi.conf ${CMAKE_CURRENT_SOURCE_DIR}/rpc.acl ${CMAKE_CURRENT_SOURCE_DIR}/server.conf) diff --git a/pkg/config/iscsi.conf b/pkg/config/iscsi.conf deleted file mode 100644 index a3b1e8d..0000000 --- a/pkg/config/iscsi.conf +++ /dev/null @@ -1,249 +0,0 @@ -; Using this file is recommended for actual iSCSI and SCSI emulation settings. This file will be -; parsed after server.conf and all values here will override the ones in server.conf. -; Also it is strictly recommended to set SCSI device specific details here. -; All SCSI device specific details start with a section scsi-device- following a pattern which -; can either be the full image name or a matching pattern like debian*.iso, e.g. -; [scsi-device-debian*.iso] will match all images starting with debian and end with the .iso -; file extension. -; scsi-device- sections will be processed in order, always inherit from the [iscsi] and [scsi] -; sections and are matched case sensitive - -[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 - -; SCSI device specific configuration for *.iso (case sensitive), i.e. all image files which -; end with .iso extension. Block sizes are set to 2 KiB for CD-ROM, DVD and BluRay type devices -; and the physical read only emulation flag is enabled -[scsi-device-*.iso] -; 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=2048 - -; 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=2048 - -; 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 physically read only. No possibility to enable writes in any case. Use -; for CD-ROM, DVD and BluRay devices. Default is false -PhysicalReadOnly=true - -; SCSI device specific configuration for *.ISO (case sensitive), i.e. all image files which -; end with .ISO extension. Block sizes are set to 2 KiB for CD-ROM, DVD and BluRay type devices -; and the physical read only emulation flag is enabled -[scsi-device-*.ISO] -; 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=2048 - -; 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=2048 - -; 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 physically read only. No possibility to enable writes in any case. Use -; for CD-ROM, DVD and BluRay devices. Default is false -PhysicalReadOnly=true diff --git a/pkg/config/server.conf b/pkg/config/server.conf index 78ec3e7..c287682 100644 --- a/pkg/config/server.conf +++ b/pkg/config/server.conf @@ -58,8 +58,8 @@ pretendClient=false ; 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 +; Specifies whether the server will also speak the iSCSI protocol +iScsiServer=true [limits] maxClients=2000 @@ -92,199 +92,3 @@ consoleMask=ERROR WARNING MINOR INFO ; 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 |
