Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to operate Attach Volume

Shulou Source: shulou.com Published: 2022-06-01 00:38:57 10月04日 Update

How to operate Attach Volume, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Here we discuss how cinder-volume and nova-compute transfer volume attach to Instance.

Cinder-volume initializes the connection to volume

After receiving the initialize_connection message, cinder-volume will create a target through tgt and target export the corresponding LV of the volume. Log is / opt/stack/logs/c-vol.log

The following log shows that you can see that the LV / dev/stack-volumes-lvmdriver-1/volume-1e7f6bd7-ce11-4a73-b95e-aabd65a5b188 of 1GB (1074MB) has been released through Target 1 export through the command tgtadm-- lld iscsi-- op show-- mode target.

Initialize connection complete.

Nova-compute will volume attach to instance

The compute node accesses the volume on the storage node Iscsi Target as an iSCSI initiator and attach it to instance. The log file is / opt/stack/logs/n-cpu.log

Nova-compute accesses volume on target by performing new, update, login, and rescan operations of iscsiadm.

The compute node recognizes the volume on the iSCSI target as a disk file.

Then map volume to instance by updating instance's XML configuration file.

We can also view the updated XML through virsh edit.

As you can see, instance adds a virtual disk of type block, source is the volume of the attach, and the device name of the virtual disk is vdb.

Manual Shut off and Start instance. Through fdisk-l, we can see that volume has been attach, and the device is vdb.

The GUI interface will also update relevant attach information

Now if we execute tgt-admin-- show-- mode target on the storage node, we will see that the compute node is connected to target 1 as an initiator. When cinder-volume first created target, there was no initiator connection.

The answer to the question on how to operate Attach Volume is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel to learn more about it.

Tags: Nodes files logs disks questions updates more devices and will store help answer easy easy information content can be passed commands boys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information Linux Microsoft Redmi