Iscsi Cake 18 Install (2024)

The Ultimate Guide to iSCSI Cake 18 Install: Step-by-Step Setup for High-Performance Storage

Creating the Storage Backend (The "Cake Sponge")

The "Cake" layer needs a sponge to absorb writes. Let's create a logical volume.

# Create a physical volume (if using a spare disk /dev/sdb)
sudo pvcreate /dev/sdb
# Create a volume group named 'iscsi-vg'
sudo vgcreate iscsi-vg /dev/sdb
# Create a logical volume named 'cake-lun'
sudo lvcreate -L 50G -n cake-lun iscsi-vg

Now launch the targetcli shell:

sudo targetcli

Inside targetcli, run these commands:

/> backstores/block create cake_disk /dev/iscsi-vg/cake-lun
/> cd /iscsi
/iscsi> create iqn.2024.com.example:cake18target
/iscsi> set global auto_add_default_portal=false
/iscsi> cd iqn.2024.com.example:cake18target/tpg1/
/iscsi/iqn...tpg1> luns create /backstores/block/cake_disk
/iscsi/iqn...tpg1> portals create 192.168.100.10 3260
/iscsi/iqn...tpg1> set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1
/iscsi/iqn...tpg1> saveconfig
/iscsi/iqn...tpg1> exit

Explanation of "Cake" attributes:

Step 8 — Save and Exit

/> saveconfig
/> exit

Part 2: Installing iSCSI Target on CakeOS 18

The keyword iscsi cake 18 install primarily refers to setting up the target side. We’ll use targetcli, the standard Linux userspace tool for managing iSCSI targets. iscsi cake 18 install

Step 11 — Make Persistent (Client Side)

sudo iscsiadm -m node --op=update --name node.startup --value automatic

2. Key Features in iSCSI Cake 1.8

Version 1.8 is a mature build that focuses on stability and caching. Here are the primary features:

4.1 CHAP Authentication (Two-Way)

On target, enable mutual CHAP:

targetcli
/iscsi/iqn.2024-05.cakeos18:storage.target1/tpg1 set attribute authentication=1
/iscsi/iqn.2024-05.cakeos18:storage.target1/tpg1 set attribute generate_node_acls=0
/iscsi/iqn.2024-05.cakeos18:storage.target1/tpg1/acls/iqn.1994-05.com.redhat:client1 set auth userid=targetuser
/iscsi/iqn.2024-05.cakeos18:storage.target1/tpg1/acls/iqn.1994-05.com.redhat:client1 set auth password=targetpass

Then on initiator, configure /etc/iscsi/iscsid.conf:

node.session.auth.authmethod = CHAP
node.session.auth.username = targetuser
node.session.auth.password = targetpass

10. Troubleshooting checklist