一,Cinder组件介绍

概念

cinder组件作用:

  • 块存储服务,为运行实例提供稳定的数据块存储服务
  • 块存储服务,提供对 volume 从创建到删除整个生命周期的管理

二,常用操作

1、Volume管理

# 卷列表查看
[root@controller ~]# cinder list
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+
| 9f9022f5-1b11-447e-bc0c-d3889712120a | available | test2 | 1 | - | false | |
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+ # 卷详情查看
[root@controller ~]# cinder show test2
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:16:13.000000 |
| description | None |
| encrypted | False |
| id | 9f9022f5-1b11-447e-bc0c-d3889712120a |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test2 |
| os-vol-host-attr:host | compute@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2021-11-14T02:16:14.000000 |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | None |
+--------------------------------+--------------------------------------+ # 卷创建 size只能是整数
cinder create [--name <name>, --volume-type <type>] <size(GB)>
[root@controller ~]# cinder create --name test --description 'new volume' --availability-zone nova 2
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:54:52.000000 |
| description | new volume |
| encrypted | False |
| id | 8190367e-4874-4e5e-86f7-0a3c4e2ae4cc |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test |
| os-vol-host-attr:host | None |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | None |
+--------------------------------+--------------------------------------+ # 卷删除
cinder delete <volume>
[root@controller ~]# cinder delete test
Request to delete volume test has been accepted. # 卷更新
# (1)重命名
cinder rename <volume> <name>
[root@controller ~]# cinder rename test test-volume-01
[root@controller ~]# cinder list
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | available | test-volume-01 | 2 | - | false | |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+ # (2)修改状态
# 可修改的状态:"available", "error", "creating", "deleting", "in-use", "attaching", "detaching", "error_deleting" and "maintenance".
# 附加状态:"attached" , "detached". 默认状态为:None.
cinder reset-state [--state <state>,--attach-status <attach-status>,--reset-migration-status] <volume>
[root@controller ~]# cinder reset-state --state deleting test-volume-01
[root@controller ~]# cinder list
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | deleting | test-volume-01 | 2 | - | false | |
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+ # (3)修改类型
# 注意:改状态卷状态必须是available状态
cinder retype <volume> <volume_type>
# a.修改卷状态为available
[root@controller ~]# cinder reset-state --state available test-volume-01
# b.查看(创建)卷类型
[root@controller ~]# cinder type-create lvm
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ [root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+
# c.修改为对应的类型
[root@controller ~]# cinder retype test-volume-01 5780bda0-0ac4-4f5a-a8c4-807980c28aaa
[root@controller ~]# cinder show test-volume-01
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:56:04.000000 |
| description | new volume |
| encrypted | False |
| id | 5b117210-9f6e-4d2c-94f4-66c2e3953584 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test-volume-01 |
| os-vol-host-attr:host | compute@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2021-11-14T03:00:07.000000 |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | 性能 |
+--------------------------------+--------------------------------------+ # (4)扩容
# 注意:可以从小改大,但是不可以从大改小。
# 注意:卷大小只能设置为整数值。
cinder extend <volume> <new size>
[root@controller ~]# cinder extend test-volume-01 5
[root@controller ~]# cinder list
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | available | test-volume-01 | 5 | 性能 | false | |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+ # (5)迁移
# 迁移一个卷到特定的主机,在请求体中指定 os-migrate_volume action。
# 一般不推荐对处于in-use状态,且挂载在多个虚机上的卷进行迁移。
# 默认只有管理员用户有迁移的权限,但是可以通过policy.json文件进行权限的设置。
cinder migrate <volume> <host>

2、Type管理

    type-create         Creates a volume type.   # 类型创建
type-default List the default volume type.
type-delete Deletes a volume type. # 类型删除
type-key Sets or unsets extra_spec for a volume type.
type-list Lists available 'volume types'. (Admin only will see private types) # 类型列表查看
type-show Show volume type details. # 类型详情查看
type-update Updates volume type name, description, and/or is_public. # 类型更新 # 查看类型
cinder type-list
[root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ # 创建类型
cinder type-create [ --description <description>, --is-public <is-public>] <name>
Positional arguments:
<name> Name of new volume type. Optional arguments:
--description <description>
Description of new volume type.
--is-public <is-public>
Make type accessible to the public (default true). [root@controller ~]# cinder type-create sata-hb-project
+--------------------------------------+-----------------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+-----------------+-------------+-----------+
| ac57dcb7-d157-419f-bd63-3ea0eb6ff940 | sata-hb-project | - | True |
+--------------------------------------+-----------------+-------------+-----------+ # 删除类型
# 注意:必须使用卷类型的id
cinder type-delete <type_id>
[root@controller ~]# cinder type-delete lvm
ERROR: Volume type lvm could not be found. (HTTP 404) (Request-ID: req-6144d4f5-61ee-4b83-b45d-f11ac54b8229)
[root@controller ~]# cinder type-delete ac57dcb7-d157-419f-bd63-3ea0eb6ff940
[root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ # 修改类型
cinder type-update [--name <name>,--description <description>,--is-public <is-public>] <type_id>
[root@controller ~]# cinder type-update b16ab5aa-f9d2-4402-89a8-1a72e9c51914 --name ssd --description 'best of all'
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | ssd | best of all | False |
+--------------------------------------+------+-------------+-----------+

3、Snapshot管理

cinder
snapshot-create #Creates a snapshot.
snapshot-delete #Removes one or more snapshots.
snapshot-list #Lists all snapshots.
snapshot-show #Shows snapshot details.
snapshot-rename #Renames a snapshot.
snapshot-reset-state #Explicitly updates the snapshot state.
snapshot-manage #Manage an existing snapshot.
snapshot-unmanage #Stop managing a snapshot.
snapshot-metadata #Sets or deletes snapshot metadata.
snapshot-metadata-show #Shows snapshot metadata.
snapshot-metadata-update-all #Updates snapshot metadata. # 创建快照
cinder snapshot-create [--name <name>,--force [<True|False>],--description <description>,--metadata [<key=value> [<key=value> ...]]] <volume>
[root@controller keystone]# cinder snapshot-create --name snapshot-01 --description 'test snapshot of a volume' 92ad953c-a7a1-4ef7-8929-85835143cb26
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| created_at | 2021-11-04T15:17:24.382623 |
| description | test snapshot of a volume |
| id | b360d2c0-9a32-4d5b-afe3-112f6cd0e215 |
| metadata | {} |
| name | snapshot-01 |
| size | 2 |
| status | creating |
| updated_at | None |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+-------------+--------------------------------------+ # 查看快照列表
cinder snapshot-list
[root@controller keystone]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+-------------+------+
| b360d2c0-9a32-4d5b-afe3-112f6cd0e215 | 92ad953c-a7a1-4ef7-8929-85835143cb26 | available | snapshot-01 | 2 |
+--------------------------------------+--------------------------------------+-----------+-------------+------+ # 查看快照详情
cinder snapshot-show <snapshot>
[root@controller keystone]# cinder snapshot-show snapshot-01
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:17:24.000000 |
| description | test snapshot of a volume |
| id | b360d2c0-9a32-4d5b-afe3-112f6cd0e215 |
| metadata | {} |
| name | snapshot-01 |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | available |
| updated_at | 2021-11-04T15:17:24.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 删除快照
cinder snapshot-delete <snapshot>
[root@controller keystone]# cinder snapshot-delete snapshot-01
[root@controller keystone]# cinder snapshot-list
+----+-----------+--------+------+------+
| ID | Volume ID | Status | Name | Size |
+----+-----------+--------+------+------+
+----+-----------+--------+------+------+ # 快照改名
cinder snapshot-rename [--description <description>] <snapshot> [<name>]
[root@controller keystone]# cinder snapshot-rename --description 'You Have Only One Life' snapshot-01 new-test-snapshot
[root@controller keystone]# cinder snapshot-show snapshot-01
ERROR: No snapshot with a name or ID of 'snapshot-01' exists.
[root@controller keystone]# cinder snapshot-show new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:19:39.000000 |
| description | You Have Only One Life |
| id | a54e8e02-911c-482f-bc49-fac2060ad7c3 |
| metadata | {} |
| name | new-test-snapshot |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | available |
| updated_at | 2021-11-04T15:36:26.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 更新快照状态
# 可更新的状态:"available", "error", "creating", "deleting", and "error_deleting".
cinder snapshot-reset-state [--state <state>] <snapshot> [<snapshot> ...]
[root@controller keystone]# cinder snapshot-reset-state --state error new-test-snapshot
[root@controller keystone]# cinder snapshot-show new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:19:39.000000 |
| description | You Have Only One Life |
| id | a54e8e02-911c-482f-bc49-fac2060ad7c3 |
| metadata | {} |
| name | new-test-snapshot |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | error |
| updated_at | 2021-11-04T15:39:40.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 管理快照
cinder snapshot-manage [--id-type <id-type>,--name <name>,--description <description>,] [--name <name>,--metadata [<key=value> [<key=value> ...]]] <volume> <identifier>
[root@controller keystone]# cinder snapshot-manage test2 new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:46:23.000000 |
| description | None |
| id | 26efb6e5-ff02-47c0-bb1c-6a36718bd68a |
| metadata | {} |
| name | None |
| os-extended-snapshot-attributes:progress | 0% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | creating |
| updated_at | None |
| volume_id | 456a40c6-65c4-41ee-9958-63bae91ec189 |
+--------------------------------------------+--------------------------------------+ # 停止管理快照
[root@controller keystone]# cinder snapshot-unmanage 26efb6e5-ff02-47c0-bb1c-6a36718bd68a
[root@controller keystone]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| a54e8e02-911c-482f-bc49-fac2060ad7c3 | 92ad953c-a7a1-4ef7-8929-85835143cb26 | available | new-test-snapshot | 2 |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+ # 设置或删除快照的meta数据
cinder snapshot-metadata <snapshot> <action> <key=value> [<key=value> ...]
Positional arguments:
<snapshot> ID of snapshot for which to update metadata.
<action> The action. Valid values are "set" or "unset."
<key=value> Metadata key and value pair to set or unset. For unset, specify
only the key.
# 设置快照meta
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 set function='Backup data'
+----------+-------------+
| Property | Value |
+----------+-------------+
| function | Backup data |
+----------+-------------+
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 set update-date='2022-1-1'
+-------------+-------------+
| Property | Value |
+-------------+-------------+
| function | Backup data |
| update-date | 2022-1-1 |
+-------------+-------------+
# 删除快照meta
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 unset update-date='2021-11-24'
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+-------------+
| Metadata-property | Value |
+-------------------+-------------+
| function | Backup data |
+-------------------+-------------+ # 查看快照meta数据
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+-------------+
| Metadata-property | Value |
+-------------------+-------------+
| function | Backup data |
| update-date | 2021-11-24 |
+-------------------+-------------+ # 更新快照meta数据
cinder snapshot-metadata-update-all <snapshot> <key=value> [<key=value> ...]
[root@controller keystone]# cinder snapshot-metadata-update-all a54e8e02-911c-482f-bc49-fac2060ad7c3 create-date='2021-11-1 12:00:11' update-date='2021/11/24 17:24:15' function='tank T-54'
+----------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+----------+------------------------------------------------------------------------------------------------------------+
| metadata | {u'function': u'tank T-54', u'update-date': u'2021/11/24 17:24:15', u'create-date': u'2021-11-1 12:00:11'} |
+----------+------------------------------------------------------------------------------------------------------------+
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+---------------------+
| Metadata-property | Value |
+-------------------+---------------------+
| create-date | 2021-11-1 12:00:11 |
| function | tank T-54 |
| update-date | 2021/11/24 17:24:15 |
+-------------------+---------------------+

4、Backup管理

# 开启卷备份服务
systemctl restart openstack-cinder-backup # 查看备份列表
cinder backup-list # 查看备份详情
cinder backup-show <backup> # 创建备份
cinder backup-create --name <name> [--container <container>] <volume> # 删除备份
cinder backup-delete <backup> # 恢复备份
cinder backup-restore [--volume <volume>] <backup> # 备份导出
cinder backup-export <backup> # 备份导入
cinder backup-import <backup_service> <backup_url>

openstack中Cinder组件简解的更多相关文章

  1. openstack中Nova组件简解

    一.Nova组件概述 计算节点通过Nova Computer进行虚拟机创建,通过libvirt调用kvm创建虚拟机,nova之间通信通过rabbitMQ队列进行通信. Nova位于Openstack架 ...

  2. openstack中Neutron组件简解

    一.Neutron概述 Neutron 的设计目标是实现"网络即服务(Networking as a Service)".为了达到这一目标,在设计上遵循了基于 SDN 实现网络虚拟 ...

  3. openstack中Keystone组件简解

    一.Keystone服务概述 在Openstack框架中,keystone(Openstack Identity Service)的功能是负责验证身份.校验服务规则和发布服务令牌的,它实现了Opens ...

  4. openstack中Glance组件简解

    一.Glance组件介绍 1.概念 Glance是OpenStack镜像服务,用来注册.登陆和检索虚拟机镜像.Glance服务提供了一个REST API,使你能够查询虚拟机镜像元数据和检索的实际镜像. ...

  5. Android中Intent组件详解

    Intent是不同组件之间相互通讯的纽带,封装了不同组件之间通讯的条件.Intent本身是定义为一个类别(Class),一个Intent对象表达一个目的(Goal)或期望(Expectation),叙 ...

  6. Java中日志组件详解

    avalon-logkit Java中日志组件详解 lanhy 发布于 2020-9-1 11:35 224浏览 0收藏 作为开发人员,我相信您对日志记录工具并不陌生. Java还具有功能强大且功能强 ...

  7. Cinder 组件详解 - 每天5分钟玩转 OpenStack(47)

    本节我们将详细讲解 Cinder 的各个子服务. cinder-api cinder-api 是整个 Cinder 组件的门户,所有 cinder 的请求都首先由 nova-api 处理.cinder ...

  8. OpenStack的Trove组件详解

    一:简介     一.背景 1. 对于公有云计算平台来说,只有计算.网络与存储这三大服务往往是不太够的,在目前互联网应用百花齐放的背景下,几乎所有应用都使用到数据库,而数据库承载的往往是应用最核心的数 ...

  9. O047、 Cinder 组件详解

    参考https://www.cnblogs.com/CloudMan6/p/5585637.html   cinder-api   cinder-api 是整个Cinder 组件的门户,所有cinde ...

随机推荐

  1. react native 0.6x 在创建项目时,CocoaPods 的依赖安装步骤卡解决方案

    前言 你需要做两件事 gem换源 pod repo 换源 实战 如果你已经成功安装了CocoaPods.那么这里你需要卸载它.gem换源1. 卸载CocoaPods 查看gem安装的东西 gem li ...

  2. UiPath视频教程

    UiPath机器人企业框架简介https://www.bilibili.com/video/BV1SK411L7u9 UiPath借助第三方Pdf软件工作https://www.bilibili.co ...

  3. RPA应用场景-公积金贷款业务数据整合和报送

    场景概述 公积金贷款业务数据整合和报送 所涉系统名称 个贷系统.公积金管理系统 人工操作(时间/次) 0.5小时 所涉人工数量1000操作频率 每日 场景流程 1.机器人整理个人贷款信息.个人贷款账户 ...

  4. VisionPro · C# · 加载与保存视觉工具包

    当项目程序被启动或更换程序产品型号时,我们需要提前加载对应的VisionPro的程序VPP文件,以提高程序调用效率. 加载代码: 1 using System; 2 using System.Wind ...

  5. 实现一个Prometheus exporter

    Prometheus 官方和社区提供了非常多的exporter,涵盖数据库.中间件.OS.存储.硬件设备等,具体可查看exporters.exporterhub.io,通过这些 exporter 基本 ...

  6. Java开发学习(九)----IOC之核心容器

    这里所说的核心容器,大家可以把它简单的理解为ApplicationContext,前面虽然已经用到过,但是并没有系统的介绍过,接下来咱们从以下几个问题入手来下容器的相关知识: 如何创建容器? 创建好容 ...

  7. IDEA的项目结构和IDEA的HelloWord

    IDEA首次驱动 1. 选择不导入任何设置,点击 OK 2. 选择 Create New Project 3. 点击 new 按钮,配置安装的 JDK9 版本 选择 JDK9 目录,点击确定 4. 不 ...

  8. 攻防世界MISC—进阶区21-30

    21.easycap 得到一个pcap文件,协议分级统计,发现都是TCP协议 直接追踪tcp流,得到FLAG 22.reverseMe 得到一张镜面翻转的flag,放入PS中,图像-图像旋转-水平翻转 ...

  9. 用VS Code搞Qt6:编译源代码与基本配置

    先说明一下,本水文老周仅讨论新版的 Qt 6,旧版的 Qt 不讨论. 尽管 Qt 有自己的开发环境,但老周必须说句不装逼的话:真的不好用.说起写代码,当然了,用记事本也能写.但是,有个高逼格的工具,写 ...

  10. flush方法和close方法的区别和字符输出流写数据的其他方法和字符输出流的续写和换行

    flush方法和close方法的区别 flush:刷新缓冲区,流对象可以继续使用 close:先刷新缓冲区,然后通知系统释放资源.刘对象不可以再被使用了. public class demo02 { ...