Get the App
SLTechnology News&Howtos  ›  Servers  › 

Configure Ceph to provide iSCSI storage externally

Shulou Source: shulou.com Published: 2022-06-02 21:45:16 09月22日 Update

Prepare the following ceph storage cluster (for specific establishment process, please refer to other articles on this blog)

The management node of the cluster is store1,ip address 10.8.20.11

Next, create a 40G image on the cluster and take this image as the target of the iscsi. Other machines on the LAN can access and mount the iscsi target.

The tgt mode is used.

First, create an image and do it visually.

Open the Dashboard (https://10.8.20.11:8443) of the ceph cluster and select the Block → images above the navigation bar

Click "New":

Enter the name and size of the image. Check only "layering" and "mutex" below, and then click "New RBD" in the lower right corner.

Remember its storage pool name: store-pool and mirror name: iscsi-disk, which will be used later

At this point, the mirror is created.

Install tgt and add support for rbd

Open shell on the management node of the ceph cluster (for example, the cluster above is store1), and type the following command to install tgt

Apt-y install tgt

Once installed, verify that tgt supports rbd using the following command

Tgtadm-- lld iscsi-- mode system-- op show | grep rbd

The output result is empty, indicating that tgt currently does not support rbd.

Install the rbd module for tgt using the following command:

Apt-y install tgt-rbd

Restart the tgt service. After checking again, it has been supported.

Third, establish iscsi goals

Edit / etc/tgt/targets.conf

Vim etc/tgt/targets.conf

Add the following:

Bs-type rbd

Backing-store store-pool/iscsi-disk # Storage pool name / image name written down above

Initiator-address 10.8.20.0 Compact 24 # allowed access to ip segments

Restart the tgt service

Systemctl restart tgt

IV. Client mount (windows client)

Open the iscsi initiator in another windows system management tool in the LAN

Enter the IP address of the destination provided by the above cluster, and click Quick Connect

Find the target and click finish

Open disk management and you can see the newly added iscsi disk. After formatting it, you can use it.

Tags: Mirror cluster target support management storage name command facet input address client local area local area network mode disk node service content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology macOS Huawei NVidia Apple