今天学习如何扩大volume的容量,为了保护现有的数据,cinder不允许缩小volume。
 
Extend 操作用于扩大Volume的容量,状态为Available的volume才能够被extend。如果volume当前已经attach给Instance,需要先detach后才能extend。extend实现比较简单,流程图如下:
 
 
1、向cinder-api 发送extend请求
2、cinder-api发送消息
3、cinder-scheduler选择合适的节点
4、cinder-scheduler将选择的存储节点信息发送出来
3、cinder-volume执行extend操作
 
[root@DevStack-Rocky-Compute-22 stack-volumes-lvmdriver-1]# lvdisplay stack-volumes-lvmdriver-1
  --- Logical volume ---
  LV Name                stack-volumes-lvmdriver-1-pool
  VG Name                stack-volumes-lvmdriver-1
  LV UUID                YR0lEg-mbfE-BOpN-Qgyo-rcVR-dwtD-avj1sB
  LV Write Access        read/write
  LV Creation host, time DevStack-Rocky-Compute-22, 2019-06-11 19:38:29 +0800
  LV Pool metadata       stack-volumes-lvmdriver-1-pool_tmeta
  LV Pool data           stack-volumes-lvmdriver-1-pool_tdata
  LV Status              available
  # open                 2
  LV Size                22.80 GiB
  Allocated pool data    0.00%
  Allocated metadata     0.52%
  Current LE             5837
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:5
   
  --- Logical volume ---
  LV Path                /dev/stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912
  LV Name                volume-fe3d0886-6dfb-4cc6-898a-72e902fba912
  VG Name                stack-volumes-lvmdriver-1
  LV UUID                aNEzS8-y7u3-aq6l-PqcM-MbSg-901Q-yLdhXZ
  LV Write Access        read/write
  LV Creation host, time DevStack-Rocky-Compute-22, 2019-06-20 17:15:57 +0800
  LV Pool name           stack-volumes-lvmdriver-1-pool
  LV Status              available
  # open                 1
  LV Size                1.00 GiB
  Mapped size            0.00%
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:7
 
 
 
[root@DevStack-Rocky-Compute-22 ~]# lvdisplay stack-volumes-lvmdriver-1
  --- Logical volume ---
  LV Name                stack-volumes-lvmdriver-1-pool
  VG Name                stack-volumes-lvmdriver-1
  LV UUID                YR0lEg-mbfE-BOpN-Qgyo-rcVR-dwtD-avj1sB
  LV Write Access        read/write
  LV Creation host, time DevStack-Rocky-Compute-22, 2019-06-11 19:38:29 +0800
  LV Pool metadata       stack-volumes-lvmdriver-1-pool_tmeta
  LV Pool data           stack-volumes-lvmdriver-1-pool_tdata
  LV Status              available
  # open                 2
  LV Size                22.80 GiB
  Allocated pool data    0.00%
  Allocated metadata     0.52%
  Current LE             5837
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:5
   
  --- Logical volume ---
  LV Path                /dev/stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912
  LV Name                volume-fe3d0886-6dfb-4cc6-898a-72e902fba912
  VG Name                stack-volumes-lvmdriver-1
  LV UUID                aNEzS8-y7u3-aq6l-PqcM-MbSg-901Q-yLdhXZ
  LV Write Access        read/write
  LV Creation host, time DevStack-Rocky-Compute-22, 2019-06-20 17:15:57 +0800
  LV Pool name           stack-volumes-lvmdriver-1-pool
  LV Status              available
  # open                 0
  LV Size                2.00 GiB
  Mapped size            0.00%
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:7
 
 
 
 
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.api.openstack.wsgi [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] POST http://10.12.30.21/volume/v3/9ed27f1df9814f91b370d1003b066b0a/volumes/fe3d0886-6dfb-4cc6-898a-72e902fba912/action
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: DEBUG cinder.api.openstack.wsgi [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] Action body: {"os-extend": {"new_size": 2}} {{(pid=21070) get_method /opt/stack/cinder/cinder/api/openstack/wsgi.py:986}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: DEBUG cinder.api.openstack.wsgi [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] Action: 'action', calling method: _extend, body: {"os-extend": {"new_size": 2}} {{(pid=21070) _process_stack /opt/stack/cinder/cinder/api/openstack/wsgi.py:869}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.volume.api [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] Volume info retrieved successfully.
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: DEBUG cinder.quota [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] Created reservations ['398ae6bd-ebf5-4849-b2c8-446543775e53', '485274bf-1f36-41df-bc77-91d081f39dda'] {{(pid=21070) reserve /opt/stack/cinder/cinder/quota.py:1029}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.volume.api [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] Extend volume request issued successfully.
Jul  2 19:34:20 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.api.openstack.wsgi [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin admin] http://10.12.30.21/volume/v3/9ed27f1df9814f91b370d1003b066b0a/volumes/fe3d0886-6dfb-4cc6-898a-72e902fba912/action returned with HTTP 202
 
 
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Updating capabilities for DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1: {u'pool_name': u'lvmdriver-1', u'filter_function': None, u'goodness_function': None, u'multiattach': True, u'total_volumes': 3, u'provisioned_capacity_gb': 2.0, 'timestamp': datetime.datetime(2019, 7, 2, 11, 34, 3, 242033), u'allocated_capacity_gb': 2, 'volume_backend_name': u'lvmdriver-1', u'thin_provisioning_support': True, u'free_capacity_gb': 22.76, 'driver_version': u'3.0.0', u'location_info': u'LVMVolumeDriver:DevStack-Rocky-Controller-21:stack-volumes-lvmdriver-1:thin:0', u'total_capacity_gb': 22.8, u'thick_provisioning_support': False, u'reserved_percentage': 0, u'QoS_support': False, u'max_over_subscription_ratio': u'20.0', 'vendor_name': u'Open Source', 'storage_protocol': u'iSCSI', u'backend_state': u'up'} {{(pid=21820) update_from_volume_capability /opt/stack/cinder/cinder/scheduler/host_manager.py:358}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Updating capabilities for DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1: {u'pool_name': u'lvmdriver-1', u'filter_function': None, u'goodness_function': None, u'multiattach': True, u'total_volumes': 2, u'provisioned_capacity_gb': 1.0, 'timestamp': datetime.datetime(2019, 7, 2, 11, 33, 47, 154308), u'allocated_capacity_gb': 1, 'volume_backend_name': u'lvmdriver-1', u'thin_provisioning_support': True, u'free_capacity_gb': 22.8, 'driver_version': u'3.0.0', u'location_info': u'LVMVolumeDriver:DevStack-Rocky-Compute-22:stack-volumes-lvmdriver-1:thin:0', u'total_capacity_gb': 22.8, u'thick_provisioning_support': False, u'reserved_percentage': 0, u'QoS_support': False, u'max_over_subscription_ratio': u'20.0', 'vendor_name': u'Open Source', 'storage_protocol': u'iSCSI', u'backend_state': u'up'} {{(pid=21820) update_from_volume_capability /opt/stack/cinder/cinder/scheduler/host_manager.py:358}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Starting with 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:95}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Filter AvailabilityZoneFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Checking if host DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1 can extend the volume fe3d0886-6dfb-4cc6-898a-72e902fba912 in 1 GB {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:55}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Checking provisioning for request of 1 GB. Backend: host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 1, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 1.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-07-02 11:33:47.154308 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:134}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Space information for volume creation on host DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1 (requested / avail): 1/22.8 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:172}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Checking if host DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1 can extend the volume fe3d0886-6dfb-4cc6-898a-72e902fba912 in 1 GB {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:55}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Checking provisioning for request of 1 GB. Backend: host 'DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.76, total_capacity_gb: 22.8,allocated_capacity_gb: 2, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 2.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-07-02 11:34:03.242033 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:134}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Space information for volume creation on host DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1 (requested / avail): 1/22.76 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:172}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Filter CapacityFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Filter CapabilitiesFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filter_scheduler [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Filtered [host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 1, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 1.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-07-02 11:33:47.154308, host 'DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.76, total_capacity_gb: 22.8,allocated_capacity_gb: 2, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 2.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-07-02 11:34:03.242033] {{(pid=21820) _get_weighted_candidates /opt/stack/cinder/cinder/scheduler/filter_scheduler.py:342}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_weight [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Weigher CapacityWeigher returned, weigher value is {max: 455.0, min: 454.0} {{(pid=21820) get_weighed_objects /opt/stack/cinder/cinder/scheduler/base_weight.py:153}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Weighed [WeighedHost [host: DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1, weight: 1.0], WeighedHost [host: DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1, weight: 0.0]] {{(pid=21820) get_weighed_backends /opt/stack/cinder/cinder/scheduler/host_manager.py:500}}
Jul  2 19:34:20 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Consumed 1 GB from backend: host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 21.8, total_capacity_gb: 22.8,allocated_capacity_gb: 2, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 2.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-07-02 11:34:20.758667 {{(pid=21820) consume_from_volume /opt/stack/cinder/cinder/scheduler/host_manager.py:316}}
 
 
Jul  2 19:34:20 DevStack-Rocky-Compute-22 cinder-volume: DEBUG oslo_concurrency.processutils [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvdisplay --noheading -C -o Attr stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912 {{(pid=27933) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372}}
Jul  2 19:34:20 DevStack-Rocky-Compute-22 cinder-volume: DEBUG oslo_concurrency.processutils [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvdisplay --noheading -C -o Attr stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912" returned: 0 in 0.257s {{(pid=27933) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:409}}
Jul  2 19:34:20 DevStack-Rocky-Compute-22 cinder-volume: DEBUG oslo_concurrency.processutils [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvextend -L 2g stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912 {{(pid=27933) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372}}
Jul  2 19:34:21 DevStack-Rocky-Compute-22 cinder-volume: DEBUG oslo_concurrency.processutils [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvextend -L 2g stack-volumes-lvmdriver-1/volume-fe3d0886-6dfb-4cc6-898a-72e902fba912" returned: 0 in 0.405s {{(pid=27933) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:409}}
Jul  2 19:34:21 DevStack-Rocky-Compute-22 cinder-volume: INFO cinder.volume.manager [None req-7ea10883-3241-4d66-b3dc-e8cbe1dfea4b admin None] Extend volume completed successfully.
 
 
 

O056、Extend Volume 操作的更多相关文章

  1. Extend Volume 操作 - 每天5分钟玩转 OpenStack(56)

    前面我们讨论了 volume 的 attach 和 detach 操作,今天讨论如何扩大 volume 的容量.为了保护现有数据,cinder 不允许缩小 volume. Extend 操作用于扩大 ...

  2. Detach Volume 操作 - 每天5分钟玩转 OpenStack(55)

    上一节我们成功地通过 attach 操作为 instance 添加了 volume,而与之相对的操作是 detach,就是将 volume 从 instance 上卸载下来. 下图是 Detach 操 ...

  3. Create Volume 操作(Part I) - 每天5分钟玩转 OpenStack(50)

    前面已经学习了 Cinder 的架构和相关组件,从本节我们开始详细分析 Cinder 的各种操作,首先讨论 Cinder 如何创建 volume. Create 操作流程如下: 客户(可以是 Open ...

  4. O050、Create Volume 操作 (Part I)

    参考https://www.cnblogs.com/CloudMan6/p/5603312.html   前面已经学习了Cinder的架构和相关组件,从本节开始详细分析 Cinder 的各种操作,首先 ...

  5. Delete Volume 操作 - 每天5分钟玩转 OpenStack(57)

    今天讨论 cinder 如何删除 volume . 状态为 Available 的 volume 才能够被 delete.如果 volume 当前已经 attach 到 instance,需要先 de ...

  6. Restore Volume 操作 - 每天5分钟玩转 OpenStack(60)

    前面我们 backup 了 voluem,今天我们将讨论如何 restore volume. restore 的过程其实很简单,两步走: 在存储节点上创建一个空白 volume. 将 backup 的 ...

  7. Backup Volume 操作 - 每天5分钟玩转 OpenStack(59)

    本节我们讨论 volume 的 Backup 操作. Backup 是将 volume 备份到别的地方(备份设备),将来可以通过 restore 操作恢复. Backup VS Snapshot 初看 ...

  8. Snapshot Volume 操作 - 每天5分钟玩转 OpenStack(58)

    Snapshot 可以为 volume 创建快照,快照中保存了 volume 当前的状态,以后可以通过 snapshot 回溯.snapshot 操作实现比较简单,流程图如下: 向 cinder-ap ...

  9. Attach Volume 操作(Part II) - 每天5分钟玩转 OpenStack(54)

    上一节我们讨论了 attach volume 操作中 cinder-api 的工作,本节讨论 cinder-volume 和 nova-compute 如何将 volume attach 到 Inst ...

随机推荐

  1. 发布js插件zhen-chek(用来检测数据类型)到npm上

    今天想到js本身是弱类型,在实际项目中很多时候需要数据类型检测.于是打算做一个判断数据类型的js插件,发布到npm上面. 基本思路: 1,输入参数,便返回数据类型,所有数据类型如下 '[object ...

  2. linux下如何查看某个容器的详细信息?

    答: 使用docker inspect <CONTAINER ID>即可

  3. springmvc快速入门(XML版本)

    1)springmvc快速入门(传统版) 步一:创建springmvc-day01这么一个web应用 步二:导入springioc,springweb , springmvc相关的jar包 步三:在/ ...

  4. python之scrapy爬取数据保存到mysql数据库

    1.创建工程 scrapy startproject tencent 2.创建项目 scrapy genspider mahuateng 3.既然保存到数据库,自然要安装pymsql pip inst ...

  5. 一百二十二:CMS系统之页面抽离和登录页面

    将登录和注册需要的共性标签抽离出来做父模板 将css改名为base base模板 {% from 'common/_macros.html' import static %}<!DOCTYPE ...

  6. spring boot系列(七)spring boot 使用mongodb

    1 pom.xml配置 增加包依赖:spring-boot-starter-data-mongodb <dependency> <groupId>org.springframe ...

  7. Xib设置label自动换行和Label的顶部对齐

    真的是不想说自己了,一个Xib纠结了一天,简直了,整整被虐了一上午啊...... 不知道这是Xcode8的问题呢....还是我的Xib约束什么的问题..... 只想说的是,以前也是这么设置的,明明可以 ...

  8. C#大文件流式压缩加解密

    * * , CancellationToken token=default) { try { FileStream zipStream = new FileStream(writeFile, File ...

  9. mysql主主、mysql-proxy读写分离、keepalived高可用完美组合

    配置mysql主主复制 服务器A:172.16.100.9 服务器B:172.16.100.10 首先在服务器A和服务器B上各安装好单机版mysql5.7,安装好后,再继续下面的操作. 在服务器A和服 ...

  10. 决策树、随机森林与k-means聚类算法

    决策树的构建满足信息熵增益最大化原则 决策树的优点: 可解释性高 能处理非线性的数据 不需要数据归一化 可以用于特征工程 对数据分布没有偏好 广泛使用 容易软件实现 可以转化为规则 决策树的弱点 启发 ...