欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Cinder iSACI演示

程序员文章站 2022-05-11 15:42:35
...
一 前提
Cinder组件已安装好

二 演示过程
[[email protected] ~(keystone_demo)]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/loop1
  VG Name               cinder-volumes
  PV Size               <20.60 GiB / not usable 2.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              5273
  Free PE               4761
  Allocated PE          512
  PV UUID               wU4Frc-i3NL-i301-fA2x-MGXS-uSoz-qQ4zga
   
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               cl
  PV Size               <63.00 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              16127
  Free PE               1
  Allocated PE          16126
  PV UUID               AanOA8-ALkx-A1ai-Yxs0-J3ef-RK3W-2SFYS0
[[email protected] ~(keystone_demo)]# vgdisplay
  --- Volume group ---
  VG Name               cinder-volumes
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <20.60 GiB
  PE Size               4.00 MiB
  Total PE              5273
  Alloc PE / Size       512 / 2.00 GiB
  Free  PE / Size       4761 / <18.60 GiB
  VG UUID               7eMx7r-cUHy-A2eV-0gMn-DZzc-aVHW-OVxo76
   
  --- Volume group ---
  VG Name               cl
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <63.00 GiB
  PE Size               4.00 MiB
  Total PE              16127
  Alloc PE / Size       16126 / 62.99 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               FwCUMV-Pezj-0JtC-nRTf-scg0-CH53-lMGEWB
在dashboard删除一个1G的卷后,再次查询,发现Free Size多了1G
[[email protected] ~(keystone_demo)]# vgdisplay
  --- Volume group ---
  VG Name               cinder-volumes
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <20.60 GiB
  PE Size               4.00 MiB
  Total PE              5273
  Alloc PE / Size       256 / 1.00 GiB
  Free  PE / Size       5017 / <19.60 GiB
  VG UUID               7eMx7r-cUHy-A2eV-0gMn-DZzc-aVHW-OVxo76
   
  --- Volume group ---
  VG Name               cl
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <63.00 GiB
  PE Size               4.00 MiB
  Total PE              16127
  Alloc PE / Size       16126 / 62.99 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               FwCUMV-Pezj-0JtC-nRTf-scg0-CH53-lMGEWB
对应关系如下图所示
Cinder iSACI演示
将卷挂载到虚拟机上
Cinder iSACI演示
再查询
Cinder iSACI演示
[[email protected] nodes(keystone_demo)]# iscsiadm -m discovery -t sendtargets -p 192.168.0.120
192.168.0.120:3260,1 iqn.2010-10.org.openstack:volume-b64fedef-d528-435f-9256-414b44aa9bc5
192.168.0.120:3260,1 iqn.2010-10.org.openstack:volume-7236ed4b-bf0a-423f-bc7a-bb213c0e9853
[[email protected] nodes(keystone_demo)]# cd /dev/disk/by-path/
[[email protected] by-path(keystone_demo)]# ls
ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-7236ed4b-bf0a-423f-bc7a-bb213c0e9853-lun-0        pci-0000:00:0d.0-ata-1.0
ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-b64fedef-d528-435f-9256-414b44aa9bc5-lun-0        pci-0000:00:0d.0-ata-1.0-part1
ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-b64fedef-d528-435f-9256-414b44aa9bc5-lun-0-part1  pci-0000:00:0d.0-ata-1.0-part2
pci-0000:00:01.1-ata-2.0


相关标签: cinder